[REFERENCE] [OOS/CUSTOM] OnePlus 5T kernel source with linux-stable (4.4.162) - OnePlus 5T ROMs, Kernels, Recoveries, & Other Dev

Introduction
Hello everyone, this is a thread to introduce both users and kernel developers to the concept of linux-stable as well as give developers some tips and a tree to either merge into their own, use as a base, or just as a reference. Feel free to ask questions and enjoy!
What is it?
linux-stable is, as the name implies, the stable branch of the Linux kernel, the base of Android. The phone could not run without the Linux kernel (at least not without reworking a lot of stuff). The Android kernels are based on the longterm stable trees:
Longterm
There are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees.
Click to expand...
Click to collapse
Source: https://www.kernel.org/category/releases.html
All Linux development happens on the master branch, which is governed by Linus Torvalds. When issues are discovered there, the fixes are applied then backported to these various stable trees for consumption. It is not uncommon for a fix to need to go back a few years.
There is a LOT more information available in the notes repo in the android-linux-stable organization if you care to learn more in-depth: https://github.com/android-linux-stable/notes
What does this mean for me?
If you are a developer, this means you should be merging these changes into your own tree. These are vetted, stable fixes to real world problems and they are being handed out for free. It does not take long to get up to date (as you can just merge this tree directly into your own or do it yourself using the tree as a reference) and once you are up to date, there is usually a release once every two weeks, give or take. I provide a rebuttal to a lot of various complaints here. If you still feel like there is a good reason not to do this, please let me know, I'll be happy to try and debate on it!
If you are a user, it means that you should be looking for and using kernels that have these fixes, as it shows the developers care for your security and stability. The current version for this device is 4.4.78 on OOS and 4.4.100 on Lineage while the current version upstream is 4.4.162 so all you need to do is go into Settings > About phone and look at the kernel version to know if you are up to date.
How do I use?
If you are a developer, the reference tree is located in the android-linux-stable organization: https://github.com/android-linux-stable/op5
There are three branches, one for OxygenOS 8.0 stable, one for OyxgenOS 8.1 beta, and one for Lineage 15.1.
This can either be merged into your existing kernel tree if you have one or be used as a fresh base. You do not need my permission to use it nor do you need to give me credit (although it would be appreciated).
If you are a user, use a kernel that has the changes added in!
Getting notified about updates
There are a few ways to get notified of linux-stable updates:
The linux-kernel-announce mailing list: http://vger.kernel.org/vger-lists.html#linux-kernel-announce
The android-linux-stable Telegram channel: https://t.me/alsupdates
Subscribe to this thread
Follow me on Google+ or Twitter
Getting help
If you have any issues with getting these changes into your tree or want to ask a question, there are a few different ways to do it:
Post in this thread
Join the linux-stable support chat on Telegram: https://t.me/joinchat/C1UAJ1EMSX31PCFdwLnOSg
File an issue either in the android-linux-stable notes repo or the android-linux-stable repo for this device
When requesting help, please give some solid details as to what you are struggling with, as I am happy to provide assistant and clarity but not to do something for you (unless I screwed up).

The OP has been updated, including some more information for users as well as some more ways of getting help and notified of updates! Enjoy

Very Nice.!!! :fingers-crossed:

nathanchance said:
The OP has been updated, including some more information for users as well as some more ways of getting help and notified of updates! Enjoy
Click to expand...
Click to collapse
Thanks for everything Sir.

You really are techno-Jesus, here to teach the ways of kernel perfection. I love your work, dedication, and care for your kernel users. Flash4lyfe.
Yes, please flame me for being a fanboy. You can never show enough appreciation for our beloved xda developers (especially the ones that don't treat users like ****).

Many thanks for your work and initiative @nathanchance :good: appreciated :highfive:
Currently giving a try to make a kernel version based from linux .116 of your op5 branch and looks like I have the following error :
Code:
fs/f2fs/f2fs.h:136:20: error: static declaration of 'inode_nohighmem' follows non-static declaration
Any idea ? I was thinking of a "KBUILD_CFLAGS" addition into Makefile (or something like that), but I'm probably wrong I guess.
FYI I'm using stock 4.9 android google toolchain

AndroidGX said:
Many thanks for your work and initiative @nathanchance :good: appreciated :highfive:
Currently giving a try to make a kernel version based from linux .116 of your op5 branch and looks like I have the following error :
Code:
fs/f2fs/f2fs.h:136:20: error: static declaration of 'inode_nohighmem' follows non-static declaration
Any idea ? I was thinking of a "KBUILD_CFLAGS" addition into Makefile (or something like that), but I'm probably wrong I guess.
FYI I'm using stock 4.9 android google toolchain
Click to expand...
Click to collapse
Wow I am so sorry about that, I must not have built 4.4.116 I removed all of the upstream f2fs code in my own kernel tree so I didn't encounter this error. I have pushed the fix that popped up in kernel/common, should be able to pull and build successfully now :good: :highfive:

nathanchance said:
Wow I am so sorry about that, I must not have built 4.4.116 I removed all of the upstream f2fs code in my own kernel tree so I didn't encounter this error. I have pushed the fix that popped up in kernel/common, should be able to pull and build successfully now :good: :highfive:
Click to expand...
Click to collapse
No worries
Thanks, it works like a charm now (currently trying my kernel on .116), again good job :highfive:
Cheers'

4.4.117 has been merged in.

4.4.118 has been merged in (conflict notes).

4.4.119 and OOS 5.0.4 have been merged in.

4.4.120 has been merged in (conflict notes).

thanks for making this, trying to build lineage and I keep getting the following error:
Code:
drivers/bluetooth/btfm_slim.c:26:23: fatal error: btfm_slim.h: No such file or directory
Any ideas?
---------- Post added at 10:47 PM ---------- Previous post was at 10:20 PM ----------
lol, found one of your comments on another post that helped
Use an out folder.
mkdir out
make O=out mata_defconfig
make O=out -j$(nproc --all)
Click to expand...
Click to collapse
new problem, the kernel compiles into an Image.gz, how would I go about getting a zImage for use in AnyKernel

aeppacher said:
thanks for making this, trying to build lineage and I keep getting the following error:
Any ideas?
---------- Post added at 10:47 PM ---------- Previous post was at 10:20 PM ----------
lol, found one of your comments on another post that helped
new problem, the kernel compiles into an Image.gz, how would I go about getting a zImage for use in AnyKernel
Click to expand...
Click to collapse
That is the zImage (you'll actually want to use Image.gz-dtb), you can just add it to the AnyKernel2 zip as is, the backend handles that name.
Sent from my Google Pixel 2 XL using XDA Labs

nathanchance said:
That is the zImage (you'll actually want to use Image.gz-dtb), you can just add it to the AnyKernel2 zip as is, the backend handles that name.
Sent from my Google Pixel 2 XL using XDA Labs
Click to expand...
Click to collapse
It booted perfectly, thanks so much! I would use the thanks button but it doesn't seem to be working :/

4.4.121 has been merged in.

I will have a new tree based on the 8.1 sources out tonight.
Sent from my Google Pixel 2 XL using XDA Labs

I have added a new branch for the 8.1 beta source; I will continue to update both 8.0 and 8.1 until 8.1 goes stable.
https://github.com/android-linux-stable/op5/commits/oneplus/QC8998_O_8.1

4.4.122 has been merged in.

4.4.123 has been merged in.

Related

[ROM][AOSP][Nightly/Release] CarbonRom KitKat [i9100]

About Carbon
CarbonRom is an aftermarket firmware based on the Android Open Source Project. We are dedicated to fast, stable, and feature-filled roms, honesty and communication with our users, and openness with our code. We like frequent builds, with the very latest and greatest hardware support and fixes. We strive to not only provide you with the best rom we can build, but also to give back to the Android community and our fellow developers. For us, this is about creating something we can be proud of and hope you will enjoy.
Please feel free to look at, build, and use our code on CarbonDev GitHub. and on our Gerrit CarbonDev Gerrit.
We would like to thank CyanogenMod for their device trees, framework/settings mods and their code that was incorporated into this project. We also extend our gratitude to the devs whose code that we have incorporated. Proper authorship has been maintained and can be viewed on our repository.
Special thanks also go to Slim Rom for some of their features, PA, AOKP, and anyone else we may have borrowed commits from that hasn't been mentioned here. If you feel you have been unfairly left out, please - let us know.
While we make every effort to test these builds as much as possible, we are not responsible for anything that may happen to your device, family, pets, or perception of reality. We ask that you do your part to know your device and know how to recover from problems before you flash! If you have questions, ask your fellow users or ask us in #teamcarbon on freenode IRC.
Features
All of our features can be found on our site here:
Carbon Features
Here are some screenshots:
Carbon Screenshots
Carbon Updates
Join us on these Social Media Channels to keep yourself up-to-date on all the latest Carbon news, updates, contests, and more! Join our completely open Google+ community for insider conversation with devs and other users.
Download Carbon
All Carbon downloads and further information such as features, changelog, and FAQ can be found on our website.
Carbon Downloads
Changelog
For a detailed changelog, check out the changes made each night here:
Carbon Changelog
Support
We spend an astonishing amount of time developing this software. We can't spend much time on XDA as a result, so if you need support, please try the following:
1) Search. Search, search, search. Yes, you. I don't care how unique or important your question is, it's very likely someone has adressed it already. Especially if you're even close to new at this.
2) Read our FAQ, which can be found on our website. Carbon FAQ
3) Ask a question in your device forum. Someone will no doubt try to help you. Warning: this help may come in the form of telling you it's a dumb question that has been asked before. See step 1 - such are the perils of asking questions when you haven't done the research yourself. Android is about helping yourself.
4) Ask a question on our IRC channel. Connect to #teamcarbon on irc.freenode.net or click here. You'll find several other Carbon fans and usually one or more devs as well. Please be polite.
Who is Team Carbon?
Find out here:
Carbon Team
Remember, every penny you send to us goes right back into the rom. It's used for hardware, server costs, etc - all the things that help us make Carbon better with every release. Your support means the world to us! If you've enjoyed Carbon, please consider a donation toward this goal. Thank you, and we hope you continue to enjoy Carbon!
​
XDA:DevDB Information
[ROM][AOSP][Nightly/Release] CarbonRom KitKat [i9100], ROM for the Samsung Galaxy S II
Contributors
CarbonDev, Myself5
ROM OS Version: 4.4.x KitKat
Based On: AOSP
Version Information
Status: Beta
Created 2014-02-14
Last Updated 2014-06-07
Reserved
Reserved
Hello Guys.
I'm your i9100 device maintainer.
I meanwhile tweaked the Rom specially for the i9100 so its difference to our other devices is:
Compiled using SaberMod arm-eabi 4.7 (Kernel code) and SaberMod arm-linux-androideabi 4.8 (ROM code) toolchain compilers
Cross-compiled using those custom toolchains results in a more smoother, faster, and battery friendly ROM
F.A.Q.:
What is Toolchain?
In software, a toolchain is the set of programming tools that are used to create a product (typically another computer program or system of programs). The tools may be used in a chain, so that the output of each tool becomes the input for the next, but the term is used widely to refer to any set of linked development tools.
A simple software development toolchain consists of a compiler and linker to transform the source code into an executable program, libraries to provide interfaces to the operating system, and a debugger. A complex product such as a video game needs tools for preparing sound effects, music, textures, 3-dimensional models, and animations, and further tools for combining these resources into the finished product.
Click to expand...
Click to collapse
Source: http://en.wikipedia.org/wiki/Toolchain
What is SaberMod?
The term "SaberMod" is coming from:
SaberMod is a AOSP based ROM with some extra features added in and mostly from CyanogenMod. SaberMod started out pure AOSP when android 4.2.1 launched. Originally it was pure AOSP with a few extra features I ported over from CyanogeMod and linaro optimizations. Then I rebased everything off of rasbeanjelly because I liked many features found in rasbean. Since then I've modified a lot of the code so not much of it is rasbeanjelly based anymore. But you will still find some commonly used features found in rasbeanjelly. SaberMod is not a rasbeanjelly or CM clone, or KANG. Custom kernels are included for certain devices when available. These are personal builds we make for ourselves and originally became very popular in the nexus 7 forums. Features are very rarely added, and are built to SaberMod's team members liking. Currently there are two members of SaberMod working on this project. Myself and @jarjar124. Please understand our time is limited and we are only two people who have lives, and do not have 25-50 members like CyanogenMod to add things. And our goal is not to add a bunch of features that bloat the system of the ROM.
Click to expand...
Click to collapse
Source: http://forum.xda-developers.com/show....php?t=2158698
About GCC main compiler cflags
-O1
Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function. With -O, the compiler tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time.
-O2
Optimize even more. GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff. As compared to -O, this option increases both compilation time and the performance of the generated code. -O2 turns on all optimization flags specified by -O.
-O3
Optimize yet more. -O3 turns on all optimizations specified by -O2 and also turns on the -finline-functions, -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, -ftree-loop-vectorize, -ftree-slp-vectorize, -fvect-cost-model, -ftree-partial-pre and -fipa-cp-clone options.
-Os
Optimize for size. -Os enables all -O2 optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size.
Click to expand...
Click to collapse
Greetings
Myself5
Nice Work Dude !
Mine
Sent from my SAMSUNG-SGH-T769 using Tapatalk
Whats Up Whith "Mine" ?
great ...thanks ....will try it surly
Great!! carbon finally arrived gonna try
Sent from my GT-I9100 using Tapatalk
im not able to see the download link in carbon page, i select our device but the links to download the ROM doesnt appear, can someone share the download link?
attack11 said:
im not able to see the download link in carbon page, i select our device but the links to download the ROM doesnt appear, can someone share the download link?
Click to expand...
Click to collapse
I have found that this link:
http://carbon-rom.com/downloads/?device=i9100&type=nightly&country=US
Showing some dates but still no luck with working link...
Послато са GT-I9100 уз помоћ Тапатока
Will this rom contain the tweaks/things that Myself5 added to his unofficial build?
It seems like we're currently having some issues with our download page getting accessed by mobile browsers. Please use your computer to download until we fixed it.
@GreekBlood: All in all the most tweaks I made were coommits from gerrit, so sooner or later they will be included
http://carbon-rom.com/downloads/?device=i9100&type=nightly&country=BE
Here i can see the downloads perfectly and they also work.
And here is the latest nightly for our SII :> http://eu1.dl.carbon-rom.com/files/i9100/nightly/CARBON-KK-NIGHTLY-20140215-0148-i9100.zip
congrats myself5 on getting to be the maintainer for this great rom on our s2.
i think i will just dl from the official carbon page,and then just use the updater to get all the improvements and fixes moving forward!!
well first hour whit this rom.and everything seems good after all! just one question,how i can enable wheater widget in the lockscreen? i cant find an option..
also some translations are missing (in spanish) i can help if you want.
also another question Halo will be added on the future?
i flashed newest rom all good.kernel included is not compatible with stweaks.
I plan on flashing gustavo 2\09 kernel.
will nightly updates flash a another kernel each update??
thnx
A little problem
I have a little problem,when i try to install gapps it says that i have insufficient space. How would i fix that? I`m using PA-GOOGLE APPS (FULL MODULAR PACKAGE) .
And another question. Previous versions that were unofficial had TWRP, how could I get that back too?
@attack11 the Weather Widget is called cLock. HALO will be added it just has some small bugs ATM we need to fix. Thanks for your help, I will later PM you all files you need to translate.
@saskrider: It will flash a new Kernel every Update. However when you later (as soon as it's working) use CarbonDelta to update there will be a option to add Custom Zip's to flash after the Rom (like GApps and Custom Kernels)
@Pecka40: the S2's Sytem Partition is to small for these GApps, use some smaller ones
Greetings
Myself5
Sent from my GT-I9100 using Tapatalk
Myself5 said:
@attack11 the Weather Widget is called cLock. HALO will be added it just has some small bugs ATM we need to fix. Thanks for your help, I will later PM you all files you need to translate.
@saskrider: It will flash a new Kernel every Update. However when you later (as soon as it's working) use CarbonDelta to update there will be a option to add Custom Zip's to flash after the Rom (like GApps and Custom Kernels)
@Pecka40: the S2's Sytem Partition is to small for these GApps, use some smaller ones
Greetings
Myself5
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Thanks for the reply! And there is no way of making it bigger?
And could you please answer the other question. About how can I get TWRP on it.

[EOL][KERNEL][UNOFFICIAL BUILDS] Boeffla Kernel Linaro/Uber

hi Guys,
as some of u maybe know from the Samsung Galaxy S3 or OPO area i'm doing a "build-service" for non official boeffla kernel builds and as we recently also got a boeffla kernel
for the One Plus Two device (kudos to @Lord Boeffla!) i want to share with u my self made Linaro/Uber builds for that device in addition.
i'm gonna reduce redundancy and keep it shorter this time as about how this started and my primary intention can also be taken from the corresponding Samsung Thread
for people who asks themself: Linaro, Sabermod, Uber what? here some good info about it: https://docs.google.com/document/d/1C-ehLWl6XcStOmB30QHDA_DOdceXiGIyzXT_0eIg5nQ/edit (thx to @ViditM14 for providing the link!) and finally more infos about Uber Toolchains : https://plus.google.com/+ChetKener/posts/YzMJEkzPQgp and here: https://plus.google.com/communities...3/stream/ac70dec1-dad7-438d-baeb-f8d6644217fd
so without further ado let's go:
First of all the obligatorily Disclaimer:
As also written in the title please note these builds are UNOFFICIAL, are NOT SUPPORTED in any way by Lord Boeffla or myself and might be EVEN UNSTABLE! So take them as they are! As always flash them at your own risk and make a backup before flashing! (yeah take this advice seriously!)
About bugs: Before you report ANY issues with the linaro/uber builds provided here (doesn't matter which one!) FIRST TRY the non-linaro/uber official builds from HERE to see if they will be gone then. if they wont, you can go on and report your problems in the official boeffla kernel thread! I hope you understand that we have to treat and keep these builds here completely separate from official ones as they have in no terms something to do with each other! Not respecting this will force me to stop building further linaro/uber builds of boeffla kernel.
About benchmarks and comparisons between toolchains:
It's common known that linaro (maybe also uber?) builds might give us higher benchmark rates and that seems great for some people (in fact it's pointless per se in my opinion)
so please if you really must, post them ONLY here and NOT in official boeffla kernel thread, thanks!
Now some more precise informations about what's going on here:
what i did:
the images are always build with original sources from official boeffla kernel OPO repositories from HERE
with some not worth to mention minor changes to be able to build it on my build environment with non stock toolchains.
all images are compiled from special branches from this forked Boeffla Kernel repository
with a self compiled Linaro Toolchain 4.9.1-2014.07-1 (source: https://github.com/zanezam/ct-ng_linaro) + recent version of Uber Toolchain 4.9.4 (Credits to Team Uber for the pre-configured/-build toolchains)
all images are build with changes from different branches in following repository:
https://github.com/zanezam/boeffla-kernel-oos-oneplus2
Beside of some additional fixes from my side all changes are taken from repositories of @ak
so all credits to him, and thx again for the starting point!
before someone asks some last words about the used toolchain versions: i did a lot of testing before releasing these builds here
and the used Linaro / Uber versions are the maximum versions which can be used to make working builds with pure boeffla
kernel sources and without changing a lot of code in addition. So if u are able to biuld a kernel and still want to try higher versions i must state here that Linaro versions
above 4.9.1 and Uber verisions above 4.9.4 might produce a "messed up" image which at the end gives you a boot-looping or not booting device and that might even be dangerous, so be aware !!
if someone has a clue what exactly has to be done to use higher versions of the corresponding toolchains (with respecting the original kernel source of course) feel free to let us know,
it will be definitely appreciated!
what i will do:
build the source code with linaro/sabermod toolchain and (like Lord Boeffla usually does) provide a CWM image of recent boeffla kernel versions.
do a test for about 1 day with this builds and if they work without any big issues, add them here in the thread.
i will try to keep the linaro/uber toolchains as up-to-date as possible till the need of bigger code change will be reached.
not providing versions that are not released by Lord Boeffla yet.
not providing an image if it is not working - well of course not *g* but it will be marked as "canceled" then for info.
not change the source code to add/remove features or fix boeffla kernel related bugs.
not support the whole stuff here.
what i will maybe do (sooner or later):
provide ZZMoove Governor test builds if there are any new versions to test - more infos and discussions about ZZMoove Governor can be found HERE
maybe tune the build flags if some more linaro/sabermod/uber experienced dev comes up with "better" ones (feel free to post and let me know, toolchain specialists! *g*)
Downloads:
One Plus Two Oxygen OS 2.x.x
(*l491* linaro / *u494* uber)
One Plus Two Oxygen OS 3.x.x
(*l491* linaro / *u494* uber)
One Plus Two CM13.0
(*l491* linaro / *u494* uber)
One Plus Two CM14.1 / LineageOS 14.1
(*l491* linaro / *u494* uber)
Mirror on Androidfilehost for all devices (only latest kernel versions)
reserved
reserved too
Nice! Flashing now! Welcome
Sent from my ONE A2005 using Tapatalk 2
---------- Post added at 05:40 PM ---------- Previous post was at 05:15 PM ----------
@ZaneZam do you own our device or are you just optimizing the Lord's builds?
Sent from my ONE A2005 using Tapatalk 2
jmtjr278 said:
Nice! Flashing now! Welcome
Sent from my ONE A2005 using Tapatalk 2
---------- Post added at 05:40 PM ---------- Previous post was at 05:15 PM ----------
@ZaneZam do you own our device or are you just optimizing the Lord's builds?
Sent from my ONE A2005 using Tapatalk 2
Click to expand...
Click to collapse
yeah i got one lying in front of me (but not as a daily driver yet) so yes i'm also running these builds
i'm doing this only for devices i own, otherwise it wouldn't be possible to provide anything decent
btw guys don't be confused about the "COS" naming in the images that's just a typo and will be gone in next version, sry
If you don't mind me asking, what are you using as your dd? Opo still?
Sent from my ONE A2005 using Tapatalk 2
jmtjr278 said:
If you don't mind me asking, what are you using as your dd? Opo still?
Sent from my ONE A2005 using Tapatalk 2
Click to expand...
Click to collapse
yes
Man im so happy to have you here!
---------- Post added at 06:36 PM ---------- Previous post was at 06:35 PM ----------
ZaneZam said:
yes
Click to expand...
Click to collapse
Lol me too until I have a good combo rom with your kernel
So glad to see you joining this party ZZ!
So glad to see more famous developers are coming forward to provide support. Please bring regular updates.
nirmalkurienmathews said:
So glad to see more famous developers are coming forward to provide support. Please bring regular updates.
Click to expand...
Click to collapse
will definitely do, even though for the used toolchain part it's harder than with other devices but time will tell
Love your work, will be flashing soon
Cheers !!
Whats the difference between U494 & 1491 ?
Just wanted to be sure before i flash, thanks !!
New Builds!
Funk Wizard said:
Whats the difference between U494 & 1491 ?
Just wanted to be sure before i flash, thanks !!
Click to expand...
Click to collapse
u494 = Build with Uber toolchain (gcc v4.9.4), l491 = Build with Linaro toolchain (gcc v4.9.1 ) apart from that optimization flags are the same atm.
u can flash any of these on top of offical builds or vice versa settings of boeffla app are preserved. which one is better or IF there are big differences isn't known yet
but let us know if u face any pros or cons with these builds here, thx !
and btw:
builds of...
Boeffla-kernel-1.0-beta2-OOS2xx-OnePlus2
uploaded!
Enjoy!
ZZ
Under Testing..
Thanks a lot @ZaneZam, You finally arrived officially
ZaneZam said:
u494 = Build with Uber toolchain (gcc v4.9.4), l491 = Build with Linaro toolchain (gcc v4.9.1 ) apart from that optimization flags are the same atm.
u can flash any of these on top of offical builds or vice versa settings of boeffla app are preserved. which one is better or IF there are big differences isn't known yet
but let us know if u face any pros or cons with these builds here, thx !
and btw:
builds of...
Boeffla-kernel-1.0-beta2-OOS2xx-OnePlus2
uploaded!
Enjoy!
ZZ
Click to expand...
Click to collapse
Thanks Zam for your explanation, running the beta2 for few hours now and it looks promising.
Cheers !!
Thanks! The really good kernel!
Thanks for your work.
I have one question for you...
Are you abel to build official kernel (https://github.com/OnePlusOSS/android_kernel_oneplus_msm8994) with uber/linaro toolchain?
I have a lot of error when I try to build official kernel with uber toolchain
Thanks,
Flavio
Didn't try but as boeffla kernel uses this as base I can say : Only with v4.9.4 from uber and a self made Linaro 4.9.1. with uber 5.x or 6.x there are errors which I was able to fix (except one ice on latest 6.x but that's a bug in gcc which will be fixed in next toolchain version hopefully) but however the 5.x and 6.x images are not booting at the moment. this needs some special attention or some special knowledge which I don't have atm
Gesendet von meinem ONE A2003 mit Tapatalk
sorry for the stupid question, but what is the difference between this kernel and official boeffla kernel??

[REFERENCE] [3.10.105] Stock kernel with upstream Linux patches - May 9th

Introduction
Hello all, I am bringing you this thread as a jumping off point to compiling kernels and working with upstream Linux. I will include a guide, some links, and some terms that will help you get started with modifying kernel source. This is also a good reference point for existing developers as I have consolidated all upstream patches into one repo. Let's get down into it!
What in the world is upstream Linux?
When an OEM sets up a device, they will pick a stable longterm branch from the Linux kernel to base their modifications around (drivers and such). In the case of Shamu, they picked 3.10.40. Currently, the Linux kernel's 3.10 is updated to 3.10.105, as you can see on kernel.org. This means that Google is "missing" versions 3.10.41 to 3.10.105. Now, why does this matter? Well, the way that the Linux kernel runs its stable branches, the only things that get merged into there are bug fixes and security updates. That's it, there are no wonky features or unstable patches. The only way you get a patch into a stable branch is by having it be in the mainline branch first. Some developers have an aversion to adding upstream because they claim it is excessive and not necessary and they are partially right since not all the patches that come in are relevant to our architecture (arm). However, upstream Linux is not unstable and by adding each version one at a time, you can verify this. Being up to date is good since you keep yourself protected from bugs and security issues that crop up. Google has been better about doing this lately with their monthly security updates but it never hurts to take matters into your own hands.
I suggest watching one of these talks given by Greg Kroah-Hartman, it is really interesting to see how the process goes:
https://www.youtube.com/watch?v=SPY0LyTU53w | https://www.youtube.com/watch?v=L2SED6sewRw
What did you do?
All I did was fetch the latest kernel.org patches from here and cherry pick them on top of the latest kernel source from Google.
I merge these patches by cherry-picking each version individually (3.10.40 to 3.10.41, 3.10.41 to 3.10.42, etc), that way I can verify that the kernel compiles fine and that there are no merge conflicts. Google will sometimes pick certain commits from upstream that are of a higher importance than others which can result in conflicts if you try to pick it again. Additionally, upstream might fix a bug one way and Google has done it another (which is not really good, Google should be pushing their fixes back to upstream so everything stays in sync).
What do I do with this?
I have created two repos below: one with the latest N security update branch with the latest upstream patches picked up on top of it (the shamu-upstream branch) and another one with a plain AnyKernel source for you to modify (shamu-stock is the most basic, shamu-decrypt contains an fstab file that will disable both forced encryption and dm-verity). You are free to fork these or base other branches on them, that's the whole point of this post. I have verified that all the patches contain no major detectable issues. I would like some credit if you do use it but it's not required since the kernel is licensed under GPL Another reason I offer this is I have seen a lot of developers picking in upstream in patch sets, so you get one single commit for an upstream version. This is detrimental as you start to add your own patches as you cannot fully tell what was modified and for what reason without the individual commits. It might look cleaner but you don't get full history which hurts you in the long run.
Links
Kernel source: https://github.com/nathanchance/shamu/tree/upstream-7.1.1
AnyKernel source: https://github.com/nathanchance/AnyKernel2/tree/shamu-stock-decrypt
Toolchain source: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/
How to compile
This will be a quick, step by step guide on how to compile this kernel from source. By using this process, you can start to make modifications to the kernel source and make a flashable zip.
Clone the kernel source, the AnyKernel source, and toolchain source
Code:
cd ~
mkdir Kernel && cd Kernel
git clone https://github.com/nathanchance/shamu.git source
git clone https://github.com/nathanchance/AnyKernel2.git anykernel
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8 AOSP-4.8
Explanation:
First command: make sure you are in your home directory (or whatever directory you want to hold the kernel folder we are about to make.
Second command: make a Kernel folder and move into it
Third command: clone the kernel source from my repo into a folder named source
Fourth command: clone the AnyKernel source from my repo into a folder named anykernel
Fifth command: clone the Google 4.8 toolchain into a folder named AOSP-4.8
AnyKernel is the name of the zip we are going to make which allows the kernel to be flashed over any ROM.
A toolchain is a set of compiler tools that allow us to compile the kernel on any computer architecture.
Make sure you are on the correct branches
Code:
cd source && git checkout upstream-7.1.1
cd ../anykernel && git checkout shamu-stock-decrypt
Explanation:
First command: move into the source directory and checkout the branch "upstream-7.1.1", which is the necessary branch for this device.
Second command: move into the AnyKernel directory and checkout the branch "shamu-decrypt". If you don't want to disable forced encryption, use the "shamu-stock" branch.
Tell the compiler what you are are compiling
Code:
export CROSS_COMPILE=${HOME}/Kernel/AOSP-4.8/bin/arm-eabi-
export ARCH=arm && export SUBARCH=arm
make clean && make mrproper
make shamu_defconfig
Explanation:
First command: point the compiler to the location of your toolchain. If you have done anything different with the folder locations, you will need to modify the "${HOME}/Kernel/AOSP-4.8" part.
Second command: tell the compiler which architecture we are compiling for. In this case, our device is an arm device.
Third command: clean out any compiled files and remove our previous defconfig.
Fourth command: tell the compiler which options we want in the kernel using the shamu_defconfig.
A defconfig is a file that will tell the compiler which features we want in the kernel. No computer ever uses all of the options in the kernel since there are different drivers for various devices.
Make the kernel!
Code:
make -j$(nproc --all)
Explanation:
make tells the compiler to make the kernel (duh) and the -j$(nproc --all) tells the compiler to use the maximum number of cores your computer has available
Make the AnyKernel zip
Code:
cp -v arch/arm/boot/zImage-dtb ../anykernel
cd ../anykernel
zip -r9 stock-upstream.zip * -x README stock-upstream.zip
Explanation:
First command: copies the completed kernel (zImage-dtb) into the AnyKernel folder
Second command: moves us into the AnyKernel folder
Third command: makes the zip file (named stock-upstream.zip) in the AnyKernel folder.
If you ever want to do this again, run these commands and go straight to step 3:
Code:
cd source && git clean -fxd && git pull
cd anykernel && git clean -fxd && git pull
NOTE: This thread is aimed to be a breeding ground for kernel development, a place to jump off if you will. I am happy to answer how to questions about building kernels or flashing the one I have provided but this is not supposed to be a general Q&A thread. Please use another thread or create your own in Q&A if you need assistance.
Nice write up.
One suggestion though. Instead of using the current version as the branch name, you may want to just name them for the device, like "Shamu-Upstream" then tag the versions once you've gotten to the version commit. This will prevent you from having to update the thread for this command anytime that you pull in more upstream changes. It also makes it alot cleaner/easier if someone for whatever reason wanted to checkout a specific patch version as they could just checkout the tag rather than resetting back to the commit.
For lack of a better explanation, tags are sort of like sub-branches within a branch.
Very new to kernel building and AOSP in general. Followed the guide but I'm getting stuck when make mrproper is ran. Build stops and i get the error : unknown target 'mrproper' then the build fails. Any help?
The Flash said:
Another reason I offer this is I have seen a lot of developers picking in upstream in patch sets, so you get one single commit for an upstream version. This is detrimental as you start to add your own patches as you cannot fully tell what was modified and for what reason without the individual commits. It might look cleaner but you don't get full history which hurts you in the long run.
Click to expand...
Click to collapse
That's true. Some devs are lazy to commit each patch and bring up from 3.10.40 to 3.10.103 which comprises nearly 3000 patches.
neobuddy89 said:
That's true. Some devs are lazy to commit each patch and bring up from 3.10.40 to 3.10.103 which comprises nearly 3000 patches.
Click to expand...
Click to collapse
Exactly lol. It's also annoying for people looking at your source because if you had to fix anything, it is going to be lumped in with that enormous patch.
Root Wizard said:
Very new to kernel building and AOSP in general. Followed the guide but I'm getting stuck when make mrproper is ran. Build stops and i get the error : unknown target 'mrproper' then the build fails. Any help?
Click to expand...
Click to collapse
can I see a full terminal window/log showing you entering all the commands?
The Flash said:
can I see a full terminal window/log showing you entering all the commands?
Click to expand...
Click to collapse
Just logged off for the night. Will give a full report back tomorrow with pictures. Basically all the commands go good up to 'make mrproper' . 'make clean' runs fine but the 'make mrproper' goes through incuding all the aosp files for build, then ninja enters build directory, then the error 'unknown target 'mrproper' ' comes up, and the build fails.
Root Wizard said:
Just logged off for the night. Will give a full report back tomorrow with pictures. Basically all the commands go good up to 'make mrproper' . 'make clean' runs fine but the 'make mrproper' goes through incuding all the aosp files for build, then ninja enters build directory, then the error 'unknown target 'mrproper' ' comes up, and the build fails.
Click to expand...
Click to collapse
Oh you're building this into a ROM? Alright, that might make things different but yeah show me pictures tomorrow and I'll try to get you up and running.
The Flash said:
Oh you're building this into a ROM? Alright, that might make things different but yeah show me pictures tomorrow and I'll try to get you up and running.
Click to expand...
Click to collapse
Ah I guess I should have metioned that I was building an aosp rom. Thanks for your quick assistance. Will get back tomorrow.
If you're building into a rom, you just need to change the existing kernel source to this one in the xml for this device.
Yoinx said:
If you're building into a rom, you just need to change the existing kernel source to this one in the xml for this device.
Click to expand...
Click to collapse
Can you explain how to do this? First time building with aosp, not very familiar which xml file or what to change to apply the upstream patch.
Root Wizard said:
Can you explain how to do this? First time building with aosp, not very familiar which xml file or what to change to apply the upstream patch.
Click to expand...
Click to collapse
For shamu in aosp, the kernel is pulled with the main aosp source by that manifest. https://github.com/android/platform_manifest/blob/master/default.xml#L65
You world need to substitute this repo with the new one, and delete your existing kernel source. Then next time you sync the repo tool will pull it down.
On other roms it gets pulled in during the breakfast/brunch process. I can't remember exactly where that comes from, but I think that is in the vendor directory for the device, maybe.
How to modify rom manifests and such though is a little outside of this thread's topic. If you need more info I'd recommend opening a thread in the Q&A forum unless this is something that The flash wants to cover in this thread.
There are a few other caveats with doing it in the rom as well. The defconfig name would need to match what the rom build expects and you would need to go in and checkout the correct branch.
Yoinx said:
For shamu in aosp, the kernel is pulled with the main aosp source by that manifest. https://github.com/android/platform_manifest/blob/master/default.xml#L65
You world need to substitute this repo with the new one, and delete your existing kernel source. Then next time you sync the repo tool will pull it down.
On other roms it gets pulled in during the breakfast/brunch process. I can't remember exactly where that comes from, but I think that is in the vendor directory for the device, maybe.
How to modify rom manifests and such though is a little outside of this thread's topic. If you need more info I'd recommend opening a thread in the Q&A forum unless this is something that The flash wants to cover in this thread.
There are a few other caveats with doing it in the rom as well. The defconfig name would need to match what the rom build expects and you would need to go in and checkout the correct branch.
Click to expand...
Click to collapse
Ok, thanks for your help.
For those of you who have forked my kernel, you will need to revert this patch: https://github.com/nathanchance/and...mmit/0b17006c16bba286ecc9d7bacd75a3902a26835e
It causes issues with Wi-Fi and Chrome.
The Flash said:
For those of you who have forked my kernel, you will need to revert this patch: https://github.com/nathanchance/and...mmit/0b17006c16bba286ecc9d7bacd75a3902a26835e
It causes issues with Wi-Fi and Chrome.
Click to expand...
Click to collapse
It does? I have been using Chrome Beta (on wifi) since last night fine with that patch. Maybe its just a matter of time before things start failing. Thanks anyway, will keep a heads up.
Root Wizard said:
It does? I have been using Chrome Beta (on wifi) since last night fine with that patch. Maybe its just a matter of time before things start failing. Thanks anyway, will keep a heads up.
Click to expand...
Click to collapse
If you toggle Wi-Fi, start flipping through pages in Chrome, and toggle Wi-Fi again, it will reboot. Oddest issue I have ever dealt with.
Sent from my Nexus 6P using XDA Labs
The Flash said:
If you toggle Wi-Fi, start flipping through pages in Chrome, and toggle Wi-Fi again, it will reboot. Oddest issue I have ever dealt with.
Click to expand...
Click to collapse
Interesting, will look into this. I also have been getting reboots from searching forums in xda labs app. Logcat says a ton of "PowerHAL_touch_boost failed to send: Connection refused" before reboots. Is this what is happening to you?
Root Wizard said:
Interesting, will look into this. I also have been getting reboots from searching forums in xda labs app. Logcat says a ton of "PowerHAL_touch_boost failed to send: Connection refused" before reboots. Is this what is happening to you?
Click to expand...
Click to collapse
No I haven't had that happen but that error shouldn't cause reboots.
The Flash said:
No I haven't had that happen but that error shouldn't cause reboots.
Click to expand...
Click to collapse
Huh, odd
Github and the kernel in the OP are updated to 3.10.104.

[GUIDE]Working with Android Kernel from Scratch

Introduction
I am writing this guide as I was unable to find a well-documented thread over XDA (there are just a lot of them). In case there is anything that concerns this guide, feel free to ask in this thread. I expect you to know the basics of Linux, GIT, Android. Please look over some guides in the forum in case you are not familiar with them. In case you want to contribute to this, feel free to do so. I welcome everyone's contribution to be it fixing my derp, pointing a mistake or adding a new section.
Links to some nice documentations:
Git Documentation
Linux Kernel Newbies
How to take logs in Android
How to get an Android kernel up to date with linux-stable
Checking Current CAF Tag of the Kernel
We will be using best_kernel for this purpose, whose aim is to compare your current kernel source code with different CAF tags and select the best possible match using git diff.
Clone/Download your kernel repo and commit your changes(if not already committed) as best_kernel depends upon git diff to compare changes.
Depending upon your kernel version, add required CAF kernel repo as remote and fetch it. best_kernel will use this fetched data to compare changes.
After fetch is done, run best_kernel. It should run automatically if you have placed dotfiles in the $BIN directory and have the necessary dependencies installed.
best_kernel will compare changes and will provide results based on that. However, depending on the number of tags, it will take time. A lot of time, so go and grab a cup of coffee till then.
A Dummy Example:
Downloading stock kernel source code from OEM’s website
Code:
wget http://nokiaphones-opensource.azureedge.net/download/phones/Nokia6.1_V2.22J.tar.bz2 && tar xvjf Nokia6.1_V2.22J.tar.bz2 && cd kernel
Adding and committing all files due to lack of a .git dir.
Code:
git init && git add --all && git commit -m "Initial Commit"
As the kernel source code version is 4.4, I will add 4.4 remotes from CAF and fetch it.
Code:
git remote add caf https://source.codeaurora.org/quic/la/kernel/msm-4.4/ && git fetch caf
After fetch, I will check for the current CAF tag using best_kernel. As my device platform is sdm660 and CAF has been releasing sdm660 tags as sdm660.0, I will be using it as an argument in best_kernel. This will ensure that best_kernel doesn’t waste time checking CAF Tags of other platforms and will speed up the process considerably.
Code:
best_kernel "*sdm660.0"
RESULT will be something like this:
Code:
Best match TAG: LA.UM.6.2.r1-06900-sdm660.0 Lines changed: 177924
What is CAF/Code Aurora | CodeAurora Android Releases Page | CAF Kernel Sources​
Creating/Importing GIT History for Kernel Source
A lot of OEMs release kernel sources in a compressed format excluding the .git dir which results in no git history. Creating or it's better to say to import one is simple and easy.
Download and check the current CAF tag of your Android kernel source.
Note: If your chipset is not Qualcomm, you should visit Linux Kernel Source or AOSP's Kernel Common and use that as a base while checking out to the specific version of your kernel source you are going to copy-paste. Qualcomm devices can also use that as a ref but I will recommend them to use CAF source.
Based on that CAF tag, download the respective kernel repository from CAF and checkout for that specific tag.
Copy and paste your downloaded kernel source (with no history) over the CAF one (which has the history of that CAF tag).
Commit the changes.
You have accomplished creating/importing history.
A Dummy Example:
My current CAF tag is LA.UM.6.2.r1-06900-sdm660.0.
Therefore, cloning kernel source from CAF and checking out for this tag while creating a new branch named rebase.
Code:
git clone https://source.codeaurora.org/quic/la/kernel/msm-4.4/
cd msm-4.4/
git checkout tags/LA.UM.6.2.r1-06900-sdm660.0 -b rebase
Now, I will copy-paste the kernel source that I downloaded from OEM's website over the CAF one. Assuming the downloaded kernel is in ~/Downloads/kernel and CAF kernel source is in ~/msm-4.4 directories.
Code:
#Renaming the dir so, that it will get merged while copying due to similar names
mv kernel/ msm-4.4/
cp -avr msm-4.4/ ~/msm-4.4
cd ~/msm-4.4
git status
git commit -m "Import Nokia Kernel Source"
Keep in mind that a .gitignore is generated which can and will ignore files during commit which were not getting ignored earlier due to its absence. In case during compilation you encounter any error stating about missing file, add it forcefully and commit again.
Remember, its always good to split that one big commit into small parts. It's helpful when you start rebasing your kernel usually when new CAF Tag for new android versions come out. Solving a few conflicts ina lot of commit is much better than solving a load of them in one. It also gives you a chance to easily diff on websites like GitHub so that you can figure what's a particular line is doing.
Doing that is also easy. Just reset head for a particular folder like driver/touchscreen and commit them separately. Check git rebase documentation which will help you with this.
Upstreaming your Kernel
Merging upstream versions is a really good thing. It brings in security patches, stability, new features and much more. The usual and best way is to visit Linux Kernel Source and check if there are upstream updates available. If yes, start merging them in your kernel source one by one.
Note: If your chipset is not Qualcomm, you should visit Linux Kernel Source or AOSP's Kernel Common and use that as a base. Qualcomm devices can also use that as a ref but I will recommend them to use CAF source.
A Dummy Example:
Assuming my current kernel version is v4.4.205, I will fetch v4.4.206 from Linux Kernel Source and merge that. I can also fetch and merge different branches from CAF Source which are usually upstreamed with Linux-stable (for example, aosp/upstream-linux-4.4.y branch)
Code:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git v4.4.206
git merge FETCH_HEAD
Fix conflicts if you get some. What to keep and what not is a question that depends upon the device to device. Usually, you should compare local changes and upstream and try to figure out what could be the best way to fix it. I will advise to check the history of that file in upstream and see which commit caused that conflict and why. You can also check similar merges by other same kernel versions to see if they had the same conflict and how they fixed it.
I will also advise merging AOSP's kernel/common and new CAF upstream tags (Only QCOM devices should merge new CAF tags) regularly when available. The reason is pretty simple. There are commits that get merged in AOSP like which improves performance or other stuff which doesn't get merged in Linux Kernel Source. This way you can get the benefit from all sources. This, however, is not pretty easy and might result in a huge number of conflicts considering if OEM has modified the source a lot from upstream.
CAF also hosts f2fs and other file system changes on their servers. Merge it if you want and use it.
Compiling Standalone Kernel
Compiling a kernel standalone requires you to have a compatible toolchain like GCC or Clang. The best way to figure out which one suits your need is testing and debugging. The standard AOSP GCC toolchains are recommended for devices with old kernels, to begin with, while newer ones can use clang with backports or upstream merges. In case you want to compile with clang, checking out android-kernel-clang is a good way, to begin with.
Compiling standalone kernels can give a lot of missing headers errors/warnings. This is due to not compiling it in a ROM environment. This can be easily fixed either by correcting paths of those header files being included or creating an out dir manually and using it as output. You can also use this commit to do that automatically.
Clone your kernel source and desired toolchain(s). Export arch and cross compiler arguments. Choose the desired defconfig to make and compile.
A Dummy Example:
I will clone the kernel source and toolchain in the same dir and export the following arguments in kernel source root dir.
Code:
export ARCH=arm64
export CROSS_COMPILE=/media/hdd/aayush/kernel/aarch64-elf-gcc/bin/aarch64-elf-
make nokia_defconfig
make -j$(nproc --all)
Kernel conflicts might occur. You can search on GitHub to check if someone has fixed that already, otherwise fix the issues yourself. Comparing code with upstream repositories is also a way to figure out the differences. Choosing defconfig can be a bit tricky if you are doing bringups. I recommend pulling the current defconfig from your device itself. Its usually by the name of config.gz in /proc/ of your device.
Links to some cross compiler
GNU Toolchain by ARM
DragonTC
GNU and Linaro
Working with TWRP from Scratch
This post is supposed to help you with building TWRP from scratch for the first time if you are a newbie. There are some good resources already available for that over the web, specially XDA. I am linking some good ones below that you can read for more info on it.
How to compile TWRP Touch Recovery
The aim of a device tree is to contain the device-specific code for the build you are doing. In this case, as we are building TWRP which is a custom recovery, only flags relating to building TWRP and a normal recovery are enough to build it. Adding system specific codes like partition sizes for the system, vendor, boot and other doesn't contribute anything. An example tree can be begonia's tree hosted on TeamWin's org maintained by me.
Now coming to the device you want to build TWRP for, you will the following :
- A working kernel
- Device-specific binaries/libraries etc required for features like encryption which heavily differs on OEM implementation
AB devices need an extra commit in their kernel to make 'fastboot boot' command work: init: initramfs: disable do_skip_initramfs . Additionally if your device ships a separate DTBO image you will also need the following flag and the DTBO image: begonia: Build DTBO image into recovery
Newer devices are nowadays coming with 'fastboot boot' command disabled. Nokia 8.1 is an example of it. To make it work again, you might need to tweak bootloader which can prove to be risky.
Now coming to creating a device tree for TWRP. The very first step is to look out if someone else has booted TWRP on a similar SOC, OEM or same device. It can be used as a reference to fix similar/OEM related bugs and hacks quickly. In case, one doesn't exist, just pick a latest one from Teamwin's Github org for the android version you are compiling for.
Reserved (2)
Wew many thanks,
Thanks
Have just started exploring xda chef central.
I cam across this guide, really ahlepful Hope you complete it soon.
Updated the thread. Fixed formatting, links and added a new section.
How To Unofficially Unlock Bootloader For LG G8
We all know LG G8 is a android device. It's open source. But I recently bought a LG G8 only but it's locked to sprint sim . No any sim work. I can't unlock bootloader. I can't root. I can't flag firmware or install custom recovery. Anyone know here , how to totally remove firmware and but another firmware ? Why we can't build a method to do that?
TheImpulson said:
Updated the thread. Fixed formatting, links and added a new section.
Click to expand...
Click to collapse
Can you create a guide for, "How to Rebase an Android Kernel". Like from Android 9 to Android 10?
thanks for this guide bro
While using best caf kernel, Prefix of the caf tag should start with a -
For example, "*- sdm660.0"
@theimpulson
Hey there,
Am getting this error del.dog/megupebinu.txt
While trying execute best_kernel script
This is helpful, thanks mate
@theimpulson I had a question: (Before reading this guide) I had already downloaded stock Samsung sources and git init push the thing to my Github. So will anything bad happen if I did it this way or do I have to rebase it with CAF?
Also what are the benefits of these so-called CAF based kernels everywhere? Improved performance? Cuz I really wanted to compile my own kernel specifically for performance with WSL-2 (shameless plug)
Thanks in advance and sorry if the @ bothered you,
Ishaq
NullCode said:
@theimpulson I had a question: (Before reading this guide) I had already downloaded stock Samsung sources and git init push the thing to my Github. So will anything bad happen if I did it this way or do I have to rebase it with CAF?
Also what are the benefits of these so-called CAF based kernels everywhere? Improved performance? Cuz I really wanted to compile my own kernel specifically for performance with WSL-2 (shameless plug)
Thanks in advance and sorry if the @ bothered you,
Ishaq
Click to expand...
Click to collapse
The existing sources are fine, no issues if you are fine without any git history.
SOC specific optimizations, bug fixes etc. Nothing more. So, yeah, if you want SOC specific optimizations, performance improvements, you will want to merge latest CAF tags for your kernel.
theimpulson said:
The existing sources are fine, no issues if you are fine without any git history.
SOC specific optimizations, bug fixes etc. Nothing more. So, yeah, if you want SOC specific optimizations, performance improvements, you will want to merge latest CAF tags for your kernel.
Click to expand...
Click to collapse
thanks a lot for the reply! Another thing, because of your suggestion I tried to Import the git history (and i succeeded). Then I wanted to upload these sources to my own Github, which I can't figure out how to do. It only gives Github repo for the place where it came from (msm-3.18). Help me please
Edit: The guides which I found for merging CAF tags say that my base also has to be CAF (which it isn't) and this guide here basically does not work

Development [Kernel][01.06.2023][Android 13] Kirisakura 2.0.24_T for Asus Zenfone 9 aka "DaVinci"

Kirisakura-Kernel for the Asus Zenfone 9
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Asus Zenfone 9 aka DaVinci. The Zenfone line-up internal codenames were traditionally derived from alcoholic drinks. Two years ago the Zenfone 6 bore the title "Kirin". The Zenfone 7 was codenamed "Tequila", while the Zenfone 8 bore the title "Sake".
This year seems to make a change however. The Zenfone 9´s internal codename is "DaVinci".
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
As far as we, @tbalden and me, are aware and as far as we know this project, alongside CleanSlate kernel for the Zenfone 9, marks the first release of a source compiled custom QGKI 2.0 kernel as a standalone flashable zip and project here on XDA.
The introduction of GKI and QCOMs adaptation QGKI means unfortunately that building a monolithic kernel becomes harder and harder. This results in the "kernel" itself no longer just sitting in one partition or the zImage, but it´s spread across different partitions (no longer being monolithic) now. Since there´s no requirment to keep monolithic builds working as in the past, it´s no longer possible to compile the source as is (without applying major rewrites, tricks or hacks) in the monolithic fashion on 5.10 kernels. The same was true for the Pixel 6/Pro.
That means the "kernel" project you´re seeing here needs to be compiled in a build environment to achieve the GKI/QGKI way. Since only Google releases the full build environment alongside the kernel sources itself in a proper fashion with git history, it became very complicated and seemingly impossible to do this on the Zenfone 9 at first glance. A big thanks at this place to Asus. From all the sources of SD8 Gen 1 QGKI devices published, the Asus Source is the most complete. A big thanks to Asus for publishing the sources on time and complete! Also for listening to us if the source is not complete and something is missing.
With excellent teamwork and a lot of hardwork, @tbalden and me managed to compile the Zenfone 9 kernel in QGKI 2.0 fashion after a lot of failed attempts and misery. It´s been a pleasure to work with him over the years here on XDA.
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!
If you expect a custom kernel to magically improve your devices battery life manifold and this is your only priority then this might not be the right place for you.
However the kernel is built to keep battery life close to the same as you would experience the on stock kernel while being tuned to perform better in various UI related benchmarks. The same benches are used by google to verify and ensure UI smoothness on the Pixel devices. The scheduler is tuned to yield lower jitter and reduce jank frames.
If that got your curious, I welcome you to continue reading if you´re still interested!
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.
A very positive development. Google pushed for CFI and SCS to be enabled by default in the android-common kernel. Starting with 5.4 kernel ( SD 888 ) CFI and SCS were enabled by default. It was a lot of work to get these features working nicely on the kernel I did the years back. So it´s nice to see this is now there by default in everybody can profit from it.
I put the explanations and links in hide tags here.
Spoiler: Documentation Control-Flow-Integrity (CFI) / Shadow Call Stacj (SCS)
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.
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.
If possible the latest Kirisakura-Kernel releases for various devices aim to include CFI in enforcing mode so users can benefit from this security features.
Another security feature is Shadow Call Stack (SCS).
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.
Read more about the Release-Model following this link.
This conversation on the LKML mailing list also shows the power of Linux-Stable and why it´s very beneficial to not just say it´s not worth and a potentiol source for bugs:
Starting with the Initial Message , the following reply and a good summarizing statement.
Quick explanation of QCOM-Upstream. CLO-git is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 8+ Gen1 that´s built into the different SKUs of the Zenfone 9.
The kernel-bases available on QCOMs git, 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.
A 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 13 and intended to be used on the latest Asus Stock-Firmware
- compiled with Clang 16.0.2 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 5.10.181
- upstreamed QCOM base for the Snapdragon SD8+ Gen1 (qcoms internal codename "cape")
- Lazy RCU which should result in power-savings while the device is lightly-loaded or idling, more information here
- include important fixes/improvements from kernel/common
- SSG IO scheduler for reduced overhead and less CPU cycles (more lightweight and android optimized)
- implement ramoops for easier logs in case of kernel panics
- implement LRNG (see arter kernel OP for more info )
- Flashing the kernel will keep root!
- Flashable via EXKM, FKM or Kernel Flasher (free open source solution, get it here)
- Anykernel zip is based on the Anykernel3 release from @osm0sis
EAS related features:
- Implement dynamic WALT-Window size depending on current FPS, collecting information about CPU-Load to provide more precise information for the scheduler
- EAS implementation patched up to latest CAF state
- updates from kernel/common
CPU related features:
- Power saving workingqueues enabled by default
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to use power efficient workingqueues. This compliments EAS in general
- vdso32 patches as found on Google Pixel devices (brief documentation here) (CAF 5.10 default, keep for documentation)
- improve suspend/resume from audio driver (caf-upstream for audio-kernel)
- enable suspend_skip_sync to save power during suspend/resume
- speed up face unlock
- reduce camera launch time
GPU related features:
- GPU driver updated to latest CAF-State
File System related features:
- f2fs improvements
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 Zenfone 9 Forums on XDA. Please consider buying the premium versions if you enjoy using the CleanSlate features, to give a little something back to @tbalden.
- add option to force 240hz touch sample rate
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
- includes new bbr
- Enable support for TTL spoofing
Memory related features:
- Speculative Page Faults left enabled (1. 2) (CAF 5.4 default, keep for documentation)
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) (CAF 5.4 default, keep for documentation)
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO (CAF 5.4 default, keep for documentation)
- Shadow Call Stack (SCS) Security-Feature ( 5.4 default, keep for documentation)
- enable init_on_alloc for even more security, more information can be found in the commit message (CAF 5.4 default, keep for documentation)
Other features:
- clean up asus drivers and fix a few warnings in kernel log
- enlarge dmesg size to ease debugging
Flashing Guide, Download and Changelog
Requirements:
- unlocked Bootloader (this will void warranty and kill future OTA updates on all asus phones at the moment)
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of stock boot.img, vendor_boot.img, vendor_dlkm.img and dtbo.img so you can go back to stock conditions (simplest way is TWRP or to extract from stock firmware via payload extractor)
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 Zenfone 9 receives an OTA 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!
If you feel adventurous and try in advance, make sure you have a backup ready!
2. Flash the kernel.zip in your favorite kernel app (I personally use Kernel Flasher by @capntrips as it´s free OSS) or TWRP once available.
3. Reboot and profit.
DOWNLOAD:
Download is located always in this folder:
AFH is currently down. Please check release posts for attached files.
https://www.androidfilehost.com/?w=files&flid=335947
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 12
1.0.0 Initial Release
1.1.0 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87544785
1.1.0 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87641829
1.1.3 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87761015
Android 13
2.0.0
[Kernel][09.12.2022][Android 13] Kirisakura 2.0.0_T for Asus Zenfone 9 aka "DaVinci"
Kirisakura-Kernel for the Asus Zenfone 9 Hello everyone, To keep it short: Here is Kirisakura - Kernel for the Asus Zenfone 9 aka DaVinci. The Zenfone line-up internal codenames were traditionally derived from alcoholic drinks. Two years ago...
forum.xda-developers.com
2.0.6 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-87945357
2.0.12 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88194923
2.0.18 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88332217
2.0.19 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88360955
2.0.21 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88384057
2.0.24 https://forum.xda-developers.com/t/...s-zenfone-9-aka-davinci.4489055/post-88600875
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! This device is absolutely stunning!
@osm0sis for all his work, including the ak3 installer!
@capntrips for his relentless work on several projects, including kernel flasher!
@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!
Source Code: https://github.com/freak07/Kirisakura_DaVinci_AI2202/
For necessary changes to other repos, besides the main kernel tree please check tbaldens github, we did the bringup together:
tbalden - Repositories
engineer. Started github with kernel for HTCDoubleshot, migrating version in 2011. kernel follows kernel, patching intuitive new features into CleanSlate line. - tbalden
github.com
F.A.Q:
Question: How do I return back to stock?
Answer: Extract boot.img, dtbo.img, vendor_boot.img and vendor_dlkm.img from the matching factory image provided on googles download page.
If you want to stay rooted make sure to flash a boot.img that has been patched with magisk.
Flash those images via fastboot/fastbootd and you will be back on stock kernel.
boot.img, dtbo.img and vendor_boot.img are to be flashed in regular fastboot.
vendor_dlkm.img is to be flashed in fastbootd (you can get to this with "fastboot reboot fastboot" when you´re in regular fastboot)
Question: How to report bugs properly?
Answer: Have a look at post #3 in the linked thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re running on a stock configuration. That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic, sleeping behaviour, scheduler, magical battery tweaks etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
Please make sure to meet the points described above, provide logs as detailed in the link above, otherwise debugging is a lot more time consuming and harder. If these requirements aren´t met and I don´t find time to either reproduce the issue myself or I´m not able to reproduce the issue myself reports might just be ignored. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.
Question: What about unlocking, rooting, passing safetynet, apps detecting root/modifications and other topics that are vaguely related, but not really subject of this thread?
Answer: If you want to modify your phone via root/magisk in any way you need to unlock the bootloader. Unlocking will result in safetynet not passing. This has nothing to do with the kernel. At the moment of writing this, safetynet not passing can be worked around with a magisk module called "Universal SafetyNet Fix".
Not passing safetynet is unrelated to the kernel since hardware attestation is enforced on nearly all newly released devices now.
If you´re not passing safetynet banking apps might for example be detecting root. There are various tricks to hide root/modifications to the phone from banking apps or others but that´s not really subject of this thread.
taken from pixel 6 soon to be adjusted
AOSP Build Environment and Standalone Kernel builds (monolithic builds)
I´m sure some of you followed the movement towards the Generic Kernel Image (GKI) and Qcoms adaption to it called QGKI.
You can find more information about GKI following this link.
What does that mean for custom kernels and this custom kernel?
The last few years the kernel on android devices was more or less compiled as a monolith. That means the kernel is in the zImage with all (most) drivers compiled inline.
However with GKI this changed. There´s the base kernel image while vendor/device specific drivers are compiled as dynamically loadable kernel modules.
On last years devices like the Pixel 5 (using a 4.19 kernel) and this years devices with SD888 on a 5.4 kernel base, there was the possibility to change the QGKI kernel back into a monolithic kernel image. (building the drivers that are on stock kernel external modules back into the zImage to end with a monolithic kernel)
On the Pixel 6 I wasn´t able to achieve this yet. But during my tries I also wondered if maybe finally the time has come to follow suit, instead of trying to enforce old ways, when there´s a new way going forward.
What does that mean. This means that at this point the kernel is shipped as images that are to be flashed via fastboot. At a later stage I´m sure we can modify anykernel3 to allow flashing zips again, but at this early stage fastboot flashable images will be provided.
Those images can be flashed the same way the device is rooted, therefore I think everybody should be able to flash it easily since the device can´t be rooted any other way.
The kernel was compiled using the aosp kernel build environment. Information about it can be found on the documentation page from google.
this one too
and this one as well
Woohoo! Rock'n'roll! ^__^
Update to 1.1.0
Hey guys and girls,
Here´s the next update. It includes quite a few changes.
It also includes the few kernel changes from the latest firmware 32.2040.2040.23.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- Linux-Stable upstream bumped to 5.10.146
- merge latest CAF-Upstream
- bump clang to prebuilt 14.0.7 from google
- fixed clang warnings in the process
- other improvements and tweaks please check github
Download:
AFH is currently not working properly. Please check this post for the download. Kernel.zip is attached.
https://www.androidfilehost.com/?w=files&flid=335947
Instructions can be found in the OP!
But look at this post too
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 to keep development going: http://paypal.me/freak07
Freak07 said:
Update to 1.1.0
Hey guys and girls,
Here´s the next update. It includes quite a few changes.
It also includes the few kernel changes from the latest firmware 32.2040.2040.23.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- Linux-Stable upstream bumped to 5.10.146
- merge latest CAF-Upstream
- bump clang to prebuilt 14.0.7 from google
- fixed clang warnings in the process
- other improvements and tweaks please check github
Download:
AFH is currently not working properly. Please check this post for the download. Kernel.zip is attached.
https://www.androidfilehost.com/?w=files&flid=335947
Instructions can be found in the OP!
But look at this post too
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 to keep development going: http://paypal.me/freak07
Click to expand...
Click to collapse
Hello sir,
How do you compile the original Kernel? Is any of vendor_boot or vendor_dlkm images the same as original stock or both are different? What about DTBO? I'm trying to build kernel for ROG Phone 6 but I thought kernal was still a monolithic file, so I flashed one only and failed to boot. ROG Phone 6 includes a script that apparently compiles everything but I don't which one is DTBO, vendor boot and vendor dlkm. Where and how you compile this kernel and where does the output go? For example I see kernel-platform/msm-kernel as the one you modified? That one is the vendor_boot?
Thank you for your help
And by the way, any plan for Kirisakura for ROG Phone 6?
Update to 1.1.1
Hey guys and girls,
Here´s the next update. It includes quite a few changes.
It also includes the few kernel changes from the latest firmware 32.2050.2050.29.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- included few changes from firmware 32.2050.2050.29
- other improvements and tweaks please check github
Download:
https://www.androidfilehost.com/?w=files&flid=335947
Instructions can be found in the OP!
But look at this post too
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 to keep development going: http://paypal.me/freak07
Lossani said:
Hello sir,
How do you compile the original Kernel? Is any of vendor_boot or vendor_dlkm images the same as original stock or both are different? What about DTBO? I'm trying to build kernel for ROG Phone 6 but I thought kernal was still a monolithic file, so I flashed one only and failed to boot. ROG Phone 6 includes a script that apparently compiles everything but I don't which one is DTBO, vendor boot and vendor dlkm. Where and how you compile this kernel and where does the output go? For example I see kernel-platform/msm-kernel as the one you modified? That one is the vendor_boot?
Thank you for your help
And by the way, any plan for Kirisakura for ROG Phone 6?
Click to expand...
Click to collapse
boot.img contains the zImage, vendor_boot contains first stage kernel modules, vendor_dlkm contains second stage kernel modules.
Kernel is no longer monolithic by default. I´m using the build environment to get the relevant images for GKI.
Freak07 said:
boot.img contains the zImage, vendor_boot contains first stage kernel modules, vendor_dlkm contains second stage kernel modules.
Kernel is no longer monolithic by default. I´m using the build environment to get the relevant images for GKI.
Click to expand...
Click to collapse
Do you have any kind of tutorial to follow to pack the kernel like you do in AnyKernel zip?
Thank you
Lossani said:
Do you have any kind of tutorial to follow to pack the kernel like you do in AnyKernel zip?
Thank you
Click to expand...
Click to collapse
I´m sorry but a step by step tutorial I don´t have the time to type that all down.
Please check tbaldens github for ZF9. We did the "bringup" of the ZF9 GKI environment together.
That here contains the scripts/methods we basically use both.
GitHub - tbalden/android_kernel_asus_zf9_build_env
Contribute to tbalden/android_kernel_asus_zf9_build_env development by creating an account on GitHub.
github.com
Check all the other zf9 repos as well.
We took basically the asus build script inside the ROG 6 source, readjusted it for the ZF9 source, as the build environment for the ROG 6 was more complete than ZF9.
You either need to remove avb from fstab (that lands in vendor_boot) or disable vbmeta flags for verity/verfication before you can flash any modified vendor_dlkm.
Be aware, disabling the flags triggers an inevitable wipe.
Otherwise check the scripts and work yourself through all the repos.
Unfortunately with GKI kernels you need to adjust the ABI. Now it gets complicated. The gki kernel, the zImage is usually compiled, from the common repo, while the qcom specific drivers are built in the msm repo. Since I don´t care about preserving googles abi for the GKI kernel, I compile the zImage from the updated msm repo, as well as the qcom modules.
That means in my build environment common repo is a symlink of msm repo, while I compile with the same script found in ROG 6 source. I think once you start working through the build environment you´ll understand. Tbalden doesn´t need to do that, as his kernel is close to stock with only a few mild changes, so easier to keep abi in check.
Unfortunately at the moment there´s no easy way to compile it.
Freak07 said:
I´m sorry but a step by step tutorial I don´t have the time to type that all down.
Please check tbaldens github for ZF9. We did the "bringup" of the ZF9 GKI environment together.
That here contains the scripts we basically use both.
GitHub - tbalden/android_kernel_asus_zf9_build_env
Contribute to tbalden/android_kernel_asus_zf9_build_env development by creating an account on GitHub.
github.com
Check all the other zf9 repos as well.
We took basically the asus build script inside the ROG 6 source, readjusted it for the ZF9 source, as the build environment for the ROG 6 was more complete than ZF9.
You either need to remove avb from fstab (that lands in vendor_boot) or disable vbmeta flags for verity/verfication before you can modify vendor_dlkm.
Otherwise check the scripts and work yourself through all the repos.
Unfortunately with GKI kernels you need to adjust the ABI. Now it gets complicated. The gki kernel, the zImage is usually compiled, from the common repo, while the qcom specific drivers are built in the msm repo. Since I don´t care about preserving googles abi for the GKI kernel, I compile the zImage from the updated msm repo, as well as the qcom modules.
That means in my build environment common repo is a symlink of msm repo, while I compile with the same script found in ROG 6 source. I think once you start working through the build environment you´ll understand. Tbalden doesn´t need to do that, as his kernel is close to stock with only a few mild changes, so easier to keep abi in check.
Unfortunately at the moment there´s no easy way to compile it.
Click to expand...
Click to collapse
Thank you for your reply. I succeded to compile using ROG 6 script but I end up with a vendor_dlkm.img in out/target/platform/taro and in gki folder "dist" outputs Image, vendor_boot.img and another vendor_dlkm.img + dtbo.img but doesn't seem to be the correct size, I guess there's another step missing to compile or I don't know which one of the dlkm is the correct one or if I need another step to make the Image file and vendor_boot.img.
Thank you anyways
Lossani said:
Thank you for your reply. I succeded to compile using ROG 6 script but I end up with a vendor_dlkm.img in out/target/platform/taro and in gki folder "dist" outputs Image, vendor_boot.img and another vendor_dlkm.img + dtbo.img but doesn't seem to be the correct size, I guess there's another step missing to compile or I don't know which one of the dlkm is the correct one or if I need another step to make the Image file and vendor_boot.img.
Thank you anyways
Click to expand...
Click to collapse
check the scripts I just sent you. the vendor_dlkm and vendor_boot from the environment don´t work on the device.
The thing is, asus just uses the kernel environment to precompile zImage,all the modules, dtb and dtbo, then transfer those to their complete build environment and those get includes into the images that end up in the firmware. The zImage they´re using on the device is actually not the one compiled in the build environment, but the GKI kernel uploaded by google. That´s why abi is so important. You´re not supposed to flash the ones produced by the build environment.
Check the scripts how repacking both of those works. If everything is right, that will get you to boot.
the zImage you can get from ASUS_AI2202-32.2030.2030.26-kernel-src/kernel_platform/out/msm-waipio-waipio-gki/dist
Update to 1.1.3
Hey guys and girls,
Here´s the next update. Linux-Stable up to 5.10.149, which also fixed the CVEs discussed here and here.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- included few changes from firmware 32.2050.2050.34
- merge latest kernel/common
- linux-stable to 5.10.149
- includes a few fixed CVEs
- other improvements and tweaks please check github
Download:
Attached to release post, AFH is currently broken
https://www.androidfilehost.com/?w=files&flid=335947
Instructions can be found in the OP!
But look at this post too
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 to keep development going: http://paypal.me/freak07
Update to 2.0.0
Hey guys and girls,
Here´s the next update with source for A13 stable merged. (not much changes, hence the fast release)
Update to A13 stable before flashing this.
The link to the latest firmware can be found following this link.
More changes in the changelog below:
Changelog:
- included few changes from firmware 33.0804.2060.65
- merge latest kernel/common
- linux-stable to 5.10.157
- other improvements and tweaks please check github
Download:
Attached to release post, AFH is currently broken
https://www.androidfilehost.com/?w=files&flid=335947
Instructions can be found in the OP!
But look at this post too
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 to keep development going: http://paypal.me/freak07
Update to 2.0.6
Hey guys and girls,
Here´s the next update. That´s a bigger one. I´ll explain a few things below in more detail.
The link to the latest firmware can be found following this link.
Monolithic kernel build
Thanks to @arter97 it´s now possible to build the 5.10 qcom kernel now as a monolithic kernel, not needing to build as a GKI style kernel.
To explain it simple: The problem is QCOM/Google are no longer required to test if drivers are loading in the correct order and or test compilation of a monolithic kernel at all.
The gki style kernel has 100s of drivers build as external kernel modules, instead of directly into the zImage.
Having a monolithic build eases development a bit, but won´t directly make an impact to the user.
If you´re interested check my github, it contains the commits. and be sure to drop @arter97 a few thanks somewhere!
Introduction of Lazy RCU
Usually I´m not stating remarks about a change improving battery life notably. But this is one of the few kernel changes that really does make a noticeable difference.
This kernel has the entire(!) RCU subsystem updated to latest linux 6.0 kernel state. This also allowed for Lazy RCU to be merged into the kernel, which should result in power-savings while the device is lightly-loaded or idling (which is basically the case all the time a smartphone isn´t being interacted with (nothing touching the screen and no other workload such as video editing is done).
If you´re interested in details check the slides, which are also linked in the article mentioned/linked above.
A very simplified explanation: RCU functionality can be called 1000s of times a second, batching RCU calls can save power by not calling as often.
Please keep in mind, those are kernel changes and battery life will not be improved magically by huge amounts, but there´s definitely an improvments.
Sony Scheduler Improvements
Import some scheduler changes around Walt from Sony Xperia 1 IV. This improves jitter by a significant amount.
More changes in the changelog below:
Changelog:
- merge latest kernel/common lts branch
- linux-stable to 5.10.160
- merge latest qcom upstream to main branch
- bump clang to latest prebuilt from google 16.0.2
- lazy rcu backported
- scheduler improvements from Sony Xperia 1 IV
- remove wlan rx wakelock as it´s unnecssary
- other improvements and tweaks please check github
Download:
Attached to release post, AFH is currently broken
https://www.androidfilehost.com/?w=files&flid=335947
Instructions can be found in the OP!
But look at this post too
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 to keep development going: http://paypal.me/freak07
is there any possibility you could try to make such a kernel for rog 6 ? if you had a tester
luki2411 said:
is there any possibility you could try to make such a kernel for rog 6 ? if you had a tester
Click to expand...
Click to collapse
hi everybody. this is a very voluminous work, but still, if you decide, I am ready to take an active part in testing.
Hi Freak Will you port this kernel to ROG Phone 6 ?

Categories

Resources