• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Kernel][11.01.2022][Android 11] Kirisakura 1.0.9_R for Asus Rog Phone 3 aka OBIWAN

Search This thread

Lossani

Member
Sep 13, 2021
10
1
No last commit was on August 27th.
Hello
I'm trying to compile your kernel but I get these errors I don't know what it is exactly:

Code:
CC      drivers/staging/qcacld-3.0/core/dp/txrx3.0/dp_txrx.o
  CC      drivers/staging/qcacld-3.0/core/dp/txrx3.0/dp_rx_thread.o
  AR      drivers/staging/qcacld-3.0/built-in.a
  AR      drivers/staging/built-in.a
  AR      drivers/built-in.a
make[1]: Leaving directory '/home/lossani/Desktop/tools/kernel/out'
make: *** [Makefile:146: sub-make] Error 2
I'm using kirisakura_defconfig and proton toolchains

Can you tell me what toolchains or compile options you use? Any guide you have around?
Also, do you know what is the stock Asus ROG Phone 3 kernel compiled with, seems to be GCC and not CLANG? I see two paths "kernel/msm-4.19" and "vendor"

Code:
VDSOA   arch/arm64/kernel/vdso/note.o
  VDSOA   arch/arm64/kernel/vdso/sigreturn.o
/home/lossani/Desktop/tools/proton/bin/as: unrecognized option '-EL'
/home/lossani/Desktop/tools/proton/bin/as: unrecognized option '-EL'
clang-13clang-13: : error: error: assembler command failed with exit code 1 (use -v to see invocation)assembler command failed with exit code 1 (use -v to see invocation)

/home/lossani/Desktop/tools/proton/bin/as: unrecognized option '-EL'
clang-13: error: assembler command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../arch/arm64/kernel/vdso/Makefile:57: arch/arm64/kernel/vdso/note.o] Error 1

Thank you in advance!
 
Last edited:

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,297
17,175
Hello
I'm trying to compile your kernel but I get these errors I don't know what it is exactly:

Code:
CC      drivers/staging/qcacld-3.0/core/dp/txrx3.0/dp_txrx.o
  CC      drivers/staging/qcacld-3.0/core/dp/txrx3.0/dp_rx_thread.o
  AR      drivers/staging/qcacld-3.0/built-in.a
  AR      drivers/staging/built-in.a
  AR      drivers/built-in.a
make[1]: Leaving directory '/home/lossani/Desktop/tools/kernel/out'
make: *** [Makefile:146: sub-make] Error 2
I'm using kirisakura_defconfig and proton toolchains

Can you tell me what toolchains or compile options you use? Any guide you have around?
Also, do you know what is the stock Asus ROG Phone 3 kernel compiled with, seems to be GCC and not CLANG? I see two paths "kernel/msm-4.19" and "vendor"

Thank you in advance!
The actual error happens probably earlier during compilation already.

Tool chains are prebuilt clang found on google repo, as well as GCC. Check my buildscript for the exact clang versions I use.
DTC ext called by the buildscript, is dtc built from aosp source.

The stock source as it is, is not compilable for a standalone build.
Don't know which toolchains the stock kernel is built with. I think some older clang supplied by QCOM to the oems.
 

Lossani

Member
Sep 13, 2021
10
1
The actual error happens probably earlier during compilation already.

Tool chains are prebuilt clang found on google repo, as well as GCC. Check my buildscript for the exact clang versions I use.
DTC ext called by the buildscript, is dtc built from aosp source.

The stock source as it is, is not compilable for a standalone build.
Don't know which toolchains the stock kernel is built with. I think some older clang supplied by QCOM to the oems.

Hello again,
I'm sorry to ask for this but I'm really stuck trying to compile your kernel, CleanSlate as well as stock one.
Seems to keep giving built-in.a errors in drivers.
Could you please link me to the toolchains you use? I got DTC from here https://android.googlesource.com/platform/external/dtc/ and compiled it and still get the same error. I only changed the paths for the other stuff, I'm also using these binaries as it is, just downloaded it and pointed to path bin:
I don't know if this is needed: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/ as it seems to be commented out.

With your kernel reached some good point pass built-in.a error but it stopped at some WireGuard compilation error of a redefinition. Not sure if it is toolchain related.

In other topic, can I just directly update through zip file on ROG Phone 3 website to new version WW-18.0410.2109.172? Will it replace with no errors the custom kernel with stock one or do I need to go back to stock kernel first, also what about Magisk, do you know if it gets deleted when applying manual update?

Please help me out, I will really appreciate it.
Thanks!
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,297
17,175
Hello again,
I'm sorry to ask for this but I'm really stuck trying to compile your kernel, CleanSlate as well as stock one.
Seems to keep giving built-in.a errors in drivers.
Could you please link me to the toolchains you use? I got DTC from here https://android.googlesource.com/platform/external/dtc/ and compiled it and still get the same error. I only changed the paths for the other stuff, I'm also using these binaries as it is, just downloaded it and pointed to path bin:
I don't know if this is needed: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/ as it seems to be commented out.

With your kernel reached some good point pass built-in.a error but it stopped at some WireGuard compilation error of a redefinition. Not sure if it is toolchain related.

In other topic, can I just directly update through zip file on ROG Phone 3 website to new version WW-18.0410.2109.172? Will it replace with no errors the custom kernel with stock one or do I need to go back to stock kernel first, also what about Magisk, do you know if it gets deleted when applying manual update?

Please help me out, I will really appreciate it.
Thanks!

clang you can get from here:
compare the versioning in my script with that repo to see the exact build I´m using.

the links to GCC are correct. Clone the repos and reset the histories before GCC was deprecated on master branch. (so before remove GCC) It´s still needed for how the kernel is compiled on 4.19 for us.

32bit toolchain is not commented out in my buildscript, I´m not sure where you saw that:


the error you added to your post after I quoted it, seems to be a toolchain problem. Either you need different changes for proton clang or need to adjust your build commands for proton clang. I don´t have any experience with proton clang so I can´t help you there.

If you adjust my buildscript to reflect your environment there should be no problems. for LTO at the end to be successful you need 32GB of RAM.

for the update, put full firmware.zip in internal sdcard (root of sdcard). reboot, press notification to trigger the update. when it asks to reboot, say you want to reboot later. then go to magisk manager, choose install, then install to inactive slot. Disable your magisk modules just in case and reboot.
Now you´ll be rooted on new firmware with stock kernel.
 

Lossani

Member
Sep 13, 2021
10
1
clang you can get from here:
compare the versioning in my script with that repo to see the exact build I´m using.

the links to GCC are correct. Clone the repos and reset the histories before GCC was deprecated on master branch. (so before remove GCC) It´s still needed for how the kernel is compiled on 4.19 for us.

32bit toolchain is not commented out in my buildscript, I´m not sure where you saw that:


the error you added to your post after I quoted it, seems to be a toolchain problem. Either you need different changes for proton clang or need to adjust your build commands for proton clang. I don´t have any experience with proton clang so I can´t help you there.

If you adjust my buildscript to reflect your environment there should be no problems. for LTO at the end to be successful you need 32GB of RAM.

for the update, put full firmware.zip in internal sdcard (root of sdcard). reboot, press notification to trigger the update. when it asks to reboot, say you want to reboot later. then go to magisk manager, choose install, then install to inactive slot. Disable your magisk modules just in case and reboot.
Now you´ll be rooted on new firmware with stock kernel.
Oh sorry, I mixed out about the 32 bit toolchain which was commented in CleanSlate build script.
Now that you mention about LTO, is 32 GB RAM the minimum possible? I guess with -j8 flag it requires more RAM?
Thank you again.
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,297
17,175
Update to 1.0.7_R

Hey guys and girls,


So here´s the next update.
The kernel is now made for the firmware 18.0410.2109.172. Please make sure to update to this firmware before flashing the kernel to avoid potential issues. You can always flash the previous kernel, before I find time to update the kernel with the latest source, just don´t report issues if you decide to do so.

Link to full firmware zip: https://dlcdnets.asus.com/pub/ASUS/...S_I003_1-ASUS-18.0410.2109.172-1.1.5-user.zip

More details in the changelog below and on GitHub as usual.

I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

Enjoy!


Changelog:
- Include Source for 18.0410.2109.172
- Adjust battery saver (accessible via cleanslate config app) cpufreqs to most efficient ones according to freqbench


I wish you all a nice day/evening!


Download is below :)

Download is in this folder:
Instructions how to flash the kernel can be found in the OP!
But look at this post too :)

To make use of the CleanSlate features you need to download both CleanSlate Apps:
Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.
If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)


Have fun, enjoy the kernel and your phone.

Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
 
Hi @Freak07! Is there any chance you could update Android 10 kernel with new security patches and drivers?
For some reason Android 11 doesn't work for me. I mean it's working but phone is freezing when unplugged from usb3 dock. And I'm docking it many times a day in my work place.
Have to hard reboot after which makes me really mad 😡 Would be really grateful and I will defo buy you a coffee or even breakfast if you could help 😜
 

Lossani

Member
Sep 13, 2021
10
1
Update to 1.0.7_R

Hey guys and girls,


So here´s the next update.
The kernel is now made for the firmware 18.0410.2109.172. Please make sure to update to this firmware before flashing the kernel to avoid potential issues. You can always flash the previous kernel, before I find time to update the kernel with the latest source, just don´t report issues if you decide to do so.

Link to full firmware zip: https://dlcdnets.asus.com/pub/ASUS/...S_I003_1-ASUS-18.0410.2109.172-1.1.5-user.zip

More details in the changelog below and on GitHub as usual.

I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

Enjoy!


Changelog:
- Include Source for 18.0410.2109.172
- Adjust battery saver (accessible via cleanslate config app) cpufreqs to most efficient ones according to freqbench


I wish you all a nice day/evening!


Download is below :)

Download is in this folder:
Instructions how to flash the kernel can be found in the OP!
But look at this post too :)

To make use of the CleanSlate features you need to download both CleanSlate Apps:
Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.
If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)


Have fun, enjoy the kernel and your phone.

Donations are not mandatory but very welcome.
If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07

Thanks a lot for your hard work! Much appreciated.
I have few questions about the customization you did in your kernel source code. Does the module that requires root for this kernel (the one that gets installed as a Magisk module) is referenced or written in any way in the kernel source code? For example the UCI from Clean Slate is there as code. If so, what are the key parts included? You upstreamed from Google AOSP and included CodeAurora tags right?
I finally compiled your kernel but I tried to compile the stock one, including the techpack and other "missing" stuff following the Clean Slate structure but it never boots, well, I tried to implement parts of code from your kernel to compile with LTO and that one seems to not boot at all, so I tried to compile the most stock-like one without LTO and it boots but it takes a lot of time to boot and when it does the UI and other stuff like WiFi doesn't work or crashes.
I read somewhere in ROG Phone 5 forum that I needed to disable module signature check, I did but still same result with LTO compilation, didn't try the one that boots without module signature check though, but the question is: What else should I look at in order to compile stock one?

Thank you!
 

Freak07

Recognized Developer / Recognized Contributor
Jan 2, 2011
5,297
17,175
Hi @Freak07! Is there any chance you could update Android 10 kernel with new security patches and drivers?
For some reason Android 11 doesn't work for me. I mean it's working but phone is freezing when unplugged from usb3 dock. And I'm docking it many times a day in my work place.
Have to hard reboot after which makes me really mad 😡 Would be really grateful and I will defo buy you a coffee or even breakfast if you could help 😜
hey,

unfortunately I´m usually only updating the kernel, that´s matching the android version the device is currently running from as official firmware.
The reason is that I´m not able to test a build for Android 10 prior to releasing it here. On one hand I lack the time (and motivation) to switch between Android 10 and Android 11 on the other I lack the time to maintain two kernel branches for a device.

If you´re running the latest A10 release from this thread you´re far ahead on CAF-Upstream and Linux-Stable upstream compared to the stock A11 kernel. Both contain most security patches that end up in the monthly security bulletin.
Of course at one point there might be something you´re missing, but it´s still a good option.

I´m also curious, can you link me the usb3 dock you´re having problems with and try to describe the exact configuration you have problems with? Do you utilize some mods or settings not exposed on the official settings?
Does that problem also happen on A11 stock kernel?

If there´s an obvious bug we might be able to forward this to asus and try to get it fixed.



Thanks a lot for your hard work! Much appreciated.
I have few questions about the customization you did in your kernel source code. Does the module that requires root for this kernel (the one that gets installed as a Magisk module) is referenced or written in any way in the kernel source code? For example the UCI from Clean Slate is there as code. If so, what are the key parts included? You upstreamed from Google AOSP and included CodeAurora tags right?
I finally compiled your kernel but I tried to compile the stock one, including the techpack and other "missing" stuff following the Clean Slate structure but it never boots, well, I tried to implement parts of code from your kernel to compile with LTO and that one seems to not boot at all, so I tried to compile the most stock-like one without LTO and it boots but it takes a lot of time to boot and when it does the UI and other stuff like WiFi doesn't work or crashes.
I read somewhere in ROG Phone 5 forum that I needed to disable module signature check, I did but still same result with LTO compilation, didn't try the one that boots without module signature check though, but the question is: What else should I look at in order to compile stock one?

Thank you!

The magisk helper module doesn´t require root per se, it requires a working magisk environment as we need to replace a few kernel modules during bootup.
The functionality of creating that module is part of the anykernel3, you find the source code for this on github.

Drivers can be compiled either directly into the zImage or outside the zImage as kernel modules. Those kernel modules (.ko files) need to be replaced with the ones that are compiled during compilation of my kernel, because they have to match the kernel they´re compiled against. That´s what the magisk helper module does.

That´s also the reason your compiled stock kernel has broken WiFi. WiFi driver gets compiled as a kernel module on stock firmware that´s loaded (insmod) during bootup.
Those modules always have to match the exact kernel. So insmoding will fail because you compiled your kernel and now it tries to insmod the stock kernel´s wifi driver module.

You have a few options. On a kernel like CleanSlate that´s very close to stock, except the added UX features, you can "force load" those modules and override the check. Depending on the code changes this can be fine, introduce bugs or not work at all depending how far you stray from the stock kernel.
My kernel has wifi driver built into the zImage instead of externally as a kernel module. You need to change the wifi driver to work when not being built as a kernel module though.
Due to how the fan is handled in asus OS, this driver needs to be shipped as a kernel module. The only way for me is to compile the kernel module, and replace it via magisk during bootup, as I can´t resort to force loading kernel modules.

Similar problems might apply to other drivers if you try to get the released kernel source into a compilable standalone kernel. Audio drivers need to be compiled also inline for example. :)
But if you already got it booting, the hardest step is done. Take kernel logs and compare with the stock one and I hope you will eventually get there.
 
Thank you for your input Freak, understand you're not maintaining two branches :)
I'm back to 10 already so not able to do any tests but I think I got some logs collected from A11.
It's happening on stock and with your kernel as well. I'm running Panda Mouse and I think this makes my phone to freeze.
Dock link got one of those and it's working on A10 with no problems.
 

Lossani

Member
Sep 13, 2021
10
1
hey,

unfortunately I´m usually only updating the kernel, that´s matching the android version the device is currently running from as official firmware.
The reason is that I´m not able to test a build for Android 10 prior to releasing it here. On one hand I lack the time (and motivation) to switch between Android 10 and Android 11 on the other I lack the time to maintain two kernel branches for a device.

If you´re running the latest A10 release from this thread you´re far ahead on CAF-Upstream and Linux-Stable upstream compared to the stock A11 kernel. Both contain most security patches that end up in the monthly security bulletin.
Of course at one point there might be something you´re missing, but it´s still a good option.

I´m also curious, can you link me the usb3 dock you´re having problems with and try to describe the exact configuration you have problems with? Do you utilize some mods or settings not exposed on the official settings?
Does that problem also happen on A11 stock kernel?

If there´s an obvious bug we might be able to forward this to asus and try to get it fixed.





The magisk helper module doesn´t require root per se, it requires a working magisk environment as we need to replace a few kernel modules during bootup.
The functionality of creating that module is part of the anykernel3, you find the source code for this on github.

Drivers can be compiled either directly into the zImage or outside the zImage as kernel modules. Those kernel modules (.ko files) need to be replaced with the ones that are compiled during compilation of my kernel, because they have to match the kernel they´re compiled against. That´s what the magisk helper module does.

That´s also the reason your compiled stock kernel has broken WiFi. WiFi driver gets compiled as a kernel module on stock firmware that´s loaded (insmod) during bootup.
Those modules always have to match the exact kernel. So insmoding will fail because you compiled your kernel and now it tries to insmod the stock kernel´s wifi driver module.

You have a few options. On a kernel like CleanSlate that´s very close to stock, except the added UX features, you can "force load" those modules and override the check. Depending on the code changes this can be fine, introduce bugs or not work at all depending how far you stray from the stock kernel.
My kernel has wifi driver built into the zImage instead of externally as a kernel module. You need to change the wifi driver to work when not being built as a kernel module though.
Due to how the fan is handled in asus OS, this driver needs to be shipped as a kernel module. The only way for me is to compile the kernel module, and replace it via magisk during bootup, as I can´t resort to force loading kernel modules.

Similar problems might apply to other drivers if you try to get the released kernel source into a compilable standalone kernel. Audio drivers need to be compiled also inline for example. :)
But if you already got it booting, the hardest step is done. Take kernel logs and compare with the stock one and I hope you will eventually get there.
Thanks for your reply, you made me notice some stuff I was not counting on.
By the way, do you think Interactive Governor is still worth to try? Or schedutil is better for 4.19? I can't find an updated cpufreq_interactive.c for 4.19 kernel though, ones from Yoda (4.9) and below has some errors when I try to port to 4.19 Obiwan source code directly, I might attempt to fix it I guess but I'm wondering if it's still worth to use, do you have any info about that?

Also, do you know any good efficient CPU freqs for Snapdragon 865+? I mean, in the Franco Kernel app there are some freqs not used at all but instead it makes primer core to jump straight to 3.09 GHz, I was wondering if I might just cap it at a few lower freqs for all 3 core types.

Thank you again!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Update to 1.0.9_R

    Hey guys and girls,


    So here´s the next update.
    The kernel is now made for the firmware 18.0410.2111.185. Please make sure to update to this firmware before flashing the kernel to avoid potential issues. You can always flash the previous kernel, before I find time to update the kernel with the latest source, just don´t report issues if you decide to do so.

    Link to full firmware zip: https://dlcdnets.asus.com/pub/ASUS/...S_I003_1-ASUS-18.0410.2111.185-1.1.5-user.zip

    More details in the changelog below and on GitHub as usual.

    I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
    Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

    Enjoy!


    Changelog:
    - Include Source for 18.0410.2111.185
    - update f2fs fsck patch, to match new stock kernel version from .185 firmware
    - update anykernel3.zip, to fix the issue report earlier in the thread (thanks to @Captain_Throwback for testing)


    I wish you all a nice day/evening!


    Download is below :)

    Download is in this folder:
    Instructions how to flash the kernel can be found in the OP!
    But look at this post too :)

    To make use of the CleanSlate features you need to download both CleanSlate Apps:
    Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.
    If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)


    Have fun, enjoy the kernel and your phone.

    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
    1
    Thanks for the update
  • 14
    Kirisakura-Kernel for the Rog Phone 3

    Hello everyone,

    To keep it short: Here is Kirisakura - Kernel for the Rog Phone 3 aka OBIWAN.
    I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.

    Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!

    This project aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security and performance, while keeping stability as the foucs during testing! This includes Linux-Stable, CAF-Upstream and kernel/common.
    Kernel Control Flow Integrity (Kernel-CFI), which is achieved by linking the kernel with LLD and Link Time Optimization (LTO), more precisely ThinLTO, are quite unique security features. In fact this, alongside Kirisakura-Kernel for the OnePlus 8 Pro, may be (and probably is) the first 4.19 msm kernel with a fully working Kernel-CFI implementation and CFI-Violations fixed on a smartphone.
    The only kernels made by OEMs offering this security feature are the ones for the Pixel 3 and Pixel 4 devices.
    The recently released Kirisakura-Kernel for the OnePlus 8 Pro was featured on the XDA-Portal due to the inclusion of CFI. The featured article explains CFI in great details, is easy to understand and definitely worth to read.

    Another security feature is Shadow Call Stack (SCS). Similar to CFI, only the Pixle 3 and 4 Kernel use this security feature.
    SCS is another security patchset that is aimed at preventing attacks via return oriented programming (ROP).
    ROP is a technique where the attacker gains control of the kernel stack to overwrite function return addresses and redirect execution to carefully selected parts of existing kernel code.
    If you´re interested here are a few good links:
    Google Security Blog explaining SCS.
    LLVM doc about SCS
    Android DOCs documenting SCS

    If reading about upstream in the paragraph above got you curious,have a read about Linux-Stable and why it is important here. The stable-process is not the same for every subsystem, but the general idea, rule of thumb and benefits are applicable for other subsystems as well.

    Quick explanation of CAF-Upstream. CAF is short for Codeaurora-Forums. This is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 865/+ that´s built into the different SKUs of the Rog Phone 3.
    The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use, to build their own kernel additions on top for devices featuring Qualcomm SoCs.
    The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. OEMs usually stop updating the initial base after the phone is released.
    This kernel focuses amongst the other features to provide the latest CAF-Updates merged in a regular manner, to provide updates, improvements and enhancements for SoC specific drivers and subsystems! This might take a while, because a lot of device specific testing is done on my end to ensure stability.

    The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
    I´d like to mention @tbalden ´s excellent CleanSlate features at this place. They improve usability by a big margin for me personally. The highly customizable sweep to sleep implementation (adjustable to different navigation settings), long tap to bring down status bar (very useful on a big device), backlight dimmer and notification reminder are very useful features that I use personally every day.
    Another big part of improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
    A big thanks to all of them at this place!

    Now lets continue with a list of features in the next paragraph!


    Main Features:
    - Based on latest kernel sources from Asus for Android 11 and intended for use on the latest Asus Stock-Firmware (currently 18.0410.2111.185)
    - compiled with Clang 13.0.1 and built with -O3 speed optimizations
    - Linux-Stable-Upstream included to 4.19.204
    - CAF base for the Snapdragon 865/+ (SD865/+) updated to upstream CAF
    - Kernel Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 4/XL Kernel
    - Shadow Call Stack (SCS) Security-Feature
    - Use ThinLTO which was first used in the Pixel 4 XL Android R-Preview Kernel instead of full LTO for full program visibility (needed by CFI)
    - fix CFI-Violations found in various subsystems like Asus/device specific drivers and qualcomm drivers
    - Link the kernel with LLD and use RELR-Relocation
    - include important fixes/improvements from kernel/common
    - Flashing the kernel will keep root!
    - Cleanslate Features included! See @tbaldens´s CleanSlate Thread for more information
    - Flashable via EXKM, FKM or TWRP on a rooted system!
    - Anykernel zip is based on the Anykernel3 release from @osm0sis
    - disable various debugging configs, that are not needed in a perf build kernel according to google.
    - disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
    - display tweaks to reduce power consumption on statically rendered images
    - tweak display to allow better visibility of black levels/colours on low brightness ( example pictures )
    - allow experimental 165hz refresh rate for the panel. (use with caution)

    EAS related features:
    - EAS implementation patched up to latest CAF state
    - disable autogroups and use cgroups for more efficient task placement!
    - updates from kernel/common
    - scheduler updates from Googles Pixel kernel

    CPU related features:
    - Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to user power efficient workingqueues. This compliments EAS
    - include cpuidle patches from CAF
    - improvements to cpufreq/times/stats
    - improve memory allocations in binder driver
    - use s2idle for deepsleep, as pixel 4/5
    - vdso32 patches as found on Google Pixel devices (brief documentation here)
    - enable lse atomics
    - arm64: lse: Prefetch operands to speed up atomic operations, thanks @kdrag0n
    - implement fast refcount checking

    GPU related features:
    - GPU driver updated to latest CAF-State
    - remove POPP functionality from GPU driver to avoid constant fight about downscaling with msm-adreno-tz
    - don´t wake the gpu on touch input, instead wake when receiving an ioctl
    - don´t copy fence names by default to save a bit of cpu-time (explanation)
    - msm: kgsl: Stop slab shrinker when no more pages can be reclaimed
    - gpu/kgsl improvements from pixel 4/pixel 5 kernel

    File System related features:
    - improve memory allocations in sdcardfs
    - improve eventpoll logging to stop indicting timerfd (improves kernel wakelock readability)
    - improve memory allocations in kernfs
    - writeback: hardcode dirty_expire_centisecs=3000 based on this commit
    - f2fs-stable upstream, that includes ATGC
    - ufs improvements from pixel 4/ pixel 5 kernel

    UI/UX/Usability related features from CleanSlate:
    - CleanSlate features made by @tbalden
    - Disclaimer: All CleanSlate features can be controlled via the free companion and config app found on CleanSlate thread here on the ROG 3 Forums on XDA. Please consider buying the premium versions if you enjoy using the CleanSlate features, to give a little something back to @tbalden.
    - Flashlight Notification/Call blinking
    - Vibrating Notification Reminder
    - Sweep to Sleep touchscreen gesture - highly customizable
    - DoubleTap on Sweep2Sleep's area gestures - new way to pull down android Notification Area
    - Face down screen off - new gesture
    - Backlight Dimmer - possibility to use lower panel brightness
    - Force FPS Level on Low Brightness
    - Squeeze Control
    - advanced notification LED control, chromatic charge LED, pulsating LED, LED dimming

    Network related features:
    - Wireguard Support (Details)
    - advanced TCP algorithms enabled
    - includes new bbr and bbr2
    - fix CVE-2020-14386

    Memory related features:
    - Speculative Page Faults left enabled (1. 2) (CAF default)
    - various fixes for PSI-Monitor, which is used by the userspace lowmemorykiller-daemon
    - Fix various memory leaks in different subsystems
    - improved mm with patches from mainline
    - various other changes from mainline
    - included zstd as an option for ZRAM-algorithm (lz4 is probably the best all around, so only change it if you know why and what you are doing)
    - improve memory allocations in various subsystems
    - ported per process reclaim from Pixel 5 kernel, instead of using outdated CAF implemenation

    Security related features:
    - Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) ported from 4.19 kernel/common and Pixel 4/XL Kernel
    - Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO
    - Shadow Call Stack (SCS) Security-Feature
    - fix various CFI-Violations found in various subsystems like Asus/device specific drivers and qualcomm drivers
    - enable init_on_alloc for even more security, more information can be found in the commit message
    - Backport mainline Selinux commits, thanks @arter97 (you must be on magisk 21.0, otherwise the kernel won´t boot)


    Misc Features:

    TCP Congestion Algorithms:
    - advanced algorithms enabled, enable them with your favorite kernel manager
    - includes new bbr2
    Wakelock Blocker:
    - advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
    - please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
    - blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!

    Other features:
    - disable logging and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
    - fix several coding issues detected by newer Clang-Toolchains
    - add support for steam controller
    - add support for nintendo switch controller
    - ufs improvements from pixel 4/ pixel 5 kernel
    - gpu/kgsl improvements from pixel 4/pixel 5 kernel
    - display tweaks to reduce power consumption on statically rendered images

    Feature section for the "non visible" but perceptible improvements:
    - updated binder section (responsible for interprocess communication)
    - updated sdcardfs ; have a read about it here:



    Flashing Guide, Download and Changelog

    A description how to flash the kernel, links for download and a changelog can be found in the second post!


    Contributors
    Freak07
    Source Code: https://github.com/freak07/Kirisakura_OBIWAN

    Version Information
    Status:
    Stable
    10
    Update to 1.0.0_R

    Hey guys and girls,


    I hope everybody had a great week so far. Here it finally is, the update for Android 11.
    The kernel includes all previous features from Android 10.
    Due to the upstream CAF-bases being completely different and incompatible between Android 10 and Android 11 and this kernel being as far from stock kernel as it can get, the kernel needed to be rebased from scratch.
    This was a long and tedious process.

    The kernel is now made for the firmware 18.0410.2106.138. Please make sure to update to this firmware before flashing the kernel to avoid potential issues. You can always flash the previous kernel, before I find time to update the kernel with the latest source, just don´t report issues if you decide to do so.

    Link to full firmware zip: https://dlcdnets.asus.com/pub/ASUS/...S_I003_1-ASUS-18.0410.2106.138-1.1.5-user.zip


    More details in the changelog below and on GitHub as usual.

    I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
    Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

    Enjoy!


    Changelog:
    - Update for Android 11
    - Include Source for 18.0410.2106.138
    - Include linux-stable upstream to 4.19.200 (stock android 11 is at 4.19.110)
    - include latest CAF-upstream for the A11 base
    - use prebuilt clang 12.0.7 from google for compilation
    - retain all previous features from android 10 (please refer to the OP)

    I wish you all a nice day/evening!


    Download is below :)

    Download is in this folder:
    Instructions how to flash the kernel can be found in the OP!
    But look at this post too :)

    To make use of the CleanSlate features you need to download both CleanSlate Apps:
    Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.
    If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)


    Have fun, enjoy the kernel and your phone.

    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
    7
    Requirements

    - unlocked Bootloader
    - USB-Debugging in developer options enabled
    - latest adb and fastboot binaries
    - working adb and fastboot environment
    - latest magisk stable root environment
    - a backup of boot.img and dtbo.img to be able to restore to stock.


    How to flash the Kernel:

    1. Download the latest kernel.zip and make sure you have properly updated to the latest matching Asus Stock-Firmware. When the Rog 3 receives an update it takes Asus a while to release the source code for the new OS and me a while to build a new kernel. If you don´t want to face any issues, wait until I either release an updated kernel or give green light because there were no kernel changes.
    Always make sure to run the firmware the kernel is built for!

    1a. Optional: While it may not be necessary all times, you may want to restore stock boot.img as well as dtbo.img, re-root with magisk and optionally install twrp.zip if coming from another kernel. Before reporting issues make sure you do that! Thank you!

    2. Make sure to meet all the requirements listed above.

    3. Flash the kernel.zip via latest EXKM or FKM app, or TWRP and do a full reboot.

    4. Reboot and profit. Set CleanSlate features as you desire by installing both apps and choose according to your liking.


    DOWNLOAD:
    Download is located always in this folder:
    https://www.androidfilehost.com/?w=files&flid=316676

    Important: Read after Download
    Please take a look at the second post after flashing the kernel!

    Changelog:

    Android 10

    1.0.0 Initial Release
    1.0.1 https://forum.xda-developers.com/showpost.php?p=83393257&postcount=12
    1.0.2 https://forum.xda-developers.com/showpost.php?p=83409591&postcount=28
    1.1.7 https://forum.xda-developers.com/showpost.php?p=83518681&postcount=32
    1.2.2 https://forum.xda-developers.com/showpost.php?p=83539471&postcount=33
    1.2.3 https://forum.xda-developers.com/showpost.php?p=83552967&postcount=38
    1.5.0 https://forum.xda-developers.com/showpost.php?p=83815367&postcount=74
    1.8.2 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84199477
    1.9.4 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84404331
    2.1.0 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84693785
    2.1.1 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84717725
    2.2.0 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84752157
    2.2.2 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-84762283
    2.2.4 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85029489
    2.2.5 https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85119205

    Android 11
    1.0.0_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85434269
    1.0.1_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85437987
    1.0.5_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85540573
    1.0.7_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-85797081
    1.0.9_R https://forum.xda-developers.com/t/...-rog-phone-3-aka-obiwan.4155505/post-86238185


    Donations:
    Donations are not mandatory but very welcome if you want to support development or just buy me a coffee/tea :)
    If you like my work: http://paypal.me/freak07

    Credits:
    Asus for the development device, giving me the opportunity to create this project!
    @osm0sis for all his work, including the ak3 installer!
    @tbalden for being the best HTC, Pixel, OnePlus and now Asus wingman!
    @LeeDroid and @mwilky for their awesome roms and work I used on multiple devices!
    @Captain_Throwback for all the mentoring and guidance!
    @Eliminater74 for bringing me into the game and the Inspiration
    @nathanchance for his upstream guidance and assistance
    @RenderBroken for helping me out
    @flar2 for all his work
    @joshuous for all the help he provided to me in the past!
    @arter97 for giving me advice
    @kdrag0n for his help and advices!
    @topjohnwu for magisk!
    7
    Update to 1.8.2

    Hey guys and girls,


    New Update. It includes the source for the new firmware 17.0823.2012.122.
    Make sure to update to this firmware, before flashing the kernel. The zip won´t flash by default on older firmware.

    On 1.8.2 Linux-Stable Upstream is merged, as well as CAF-Upstream.
    Memory improvements, small update to the scheduler, vdso32, and some others are mentioned in the changelog as usual. Some with links for those that like to read it.

    Disclaimer/Important:
    Since Release 1.5.0 Selinux-Mainline patches are backported now that Magisk 21.0 and greater support it. This gives selinux a performance boost.
    You need to have upgraded to magisk 21.0 before flashing the kernel!
    The download can be found here: https://github.com/topjohnwu/Magisk/releases/download/v21.0/Magisk-v21.0.zip
    Alternatively download latest magisk manager from here: https://github.com/topjohnwu/Magisk/releases/download/manager-v8.0.2/MagiskManager-v8.0.2.apk
    Go to Settings and set Magisk Channel to Beta to get Magisk 21.0!
    If you´re on of those that can´t boot 21.0 or greater with the stock kernel, update to 21.0 or higher and flash Kirisakura Kernel without a reboot. Your device should boot up fine.



    More details in the changelog below and on GitHub as usual.

    I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
    Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

    Enjoy!


    Changelog:
    - Update Source Code to Asus Source 17.0823.2012.122 (make sure to update your phone before attempting to flash the kernel)
    - Linux-Stable Upstream 4.19.164
    - Merge latest CAF-Upstream
    - kernel/common updates
    - vdso32 patches as found on Google Pixel devices (brief documentation here)
    - Backport to enable CONFIG_HAVE_MOVE_PMD (see here) , thanks @arter97
    - Backport to enable CONFIG_HAVE_MOVE_PUD (commit here) , thanks @arter97
    - enable lse atomics
    - arm64: lse: Prefetch operands to speed up atomic operations, thanks @kdrag0n
    - f2fs improvements
    - scheduler improvements
    - other changes please take a look at github


    I wish you all a nice day/evening!


    Download is below :)

    Download:

    Kernel:
    https://www.androidfilehost.com/?fid=17248734326145705484
    Instructions how to flash the kernel can be found in the OP!
    But look at this post too :)

    To make use of the CleanSlate features you need to download both CleanSlate Apps:
    Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.
    If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)


    Have fun, enjoy the kernel and your phone.

    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
    6
    Update to 1.9.4

    Hey guys and girls,


    New Update. It includes the source for the new firmware 17.0823.2012.131.
    Make sure to update to this firmware, before flashing the kernel so no conflicts arise.

    1.9.4 includes latest Linux-Stable Upstream as well as CAF-Upstream.

    I also created a magisk module to hide the hardwarestub service warning for those with converted devices on my kernel. No paid app is required for it. Flash it via Magisk Manager and the notification will be hidden.
    Please note that refresh rate can´t be changed when the module is flashed. To able to change refresh rate or to remove the module, simple remove it in Magisk Manager and do a full reboot. I´ll attach it to the third post on this thread. There will be no support for this module from my side and no other support for converted devices.

    Disclaimer/Important:
    Since Release 1.5.0 Selinux-Mainline patches are backported now that Magisk 21.0 and greater support it. This gives selinux a performance boost.
    You need to have upgraded to magisk 21.0 before flashing the kernel!
    If you´re on of those that could not boot 21.0 or greater with the stock kernel, this issue is solved on magisk 21400 and above.



    More details in the changelog below and on GitHub as usual.

    I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.
    Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

    Enjoy!


    Changelog:
    - Update Source Code to Asus Source 17.0823.2012.131 (make sure to update your phone before attempting to flash the kernel)
    - use latest clang 12.0.2 prebuilt by google and fix clang errors
    - Linux-Stable Upstream 4.19.172
    - Merge latest CAF-Upstream
    - kernel/common updates
    - updates to usb_accessory
    - f2fs-stable upstream
    - implement fast refcount checking
    - other changes please take a look at github


    I wish you all a nice day/evening!


    Download is below :)

    Download:

    Kernel:
    https://www.androidfilehost.com/?fid=17248734326145726355
    Instructions how to flash the kernel can be found in the OP!
    But look at this post too :)

    To make use of the CleanSlate features you need to download both CleanSlate Apps:
    Please take a look at the CleanSlate thread for CleanSlate features. On the CleanSlate thread you will find links to both apps, companion and configuration app, to control the CleanSlate features.
    If you use the CleanSlate features and benefit over time, maybe think about giving something back to @tbalden and purchase them from PlayStore. :)


    Have fun, enjoy the kernel and your phone.

    If you like my work please consider a donation.
    Donations are not mandatory but very welcome.
    If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07