{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
DragonTC is a build system for compiling custom clang toolchains. These toolchains contain some AOSP patches(where applicable) and things not included in AOSP clang, such as LTO and Gold plugins, and OpenMP, Polly compiled and automatically linked into tools, improved krait optimizations (-mcpu=krait2), and annoying flags such as -Werror, -Wfatal-errors, and -Weverything internally disabled for non-default parameters. DragonTC compilers are also built with -O3, -pthread, and -fopenmp in order to reduce compile time when used for ROMs. DragonTC has been around for a few months now, but now that some testers have helped me work out the bugs and make it close to stable, I've decided to make an XDA thread.
Why use custom Clang?
Google has been slowly moving away from GCC for a while now, so we believe that we should get ahead of the toolchain game and start now! Furthermore, AOSP modules that are compiled with clang can easily be optimized with the new LTO and Polly options.
How do I build DragonTC?
It's simple! Run the following commands in bash to get set up:
Code:
$ mkdir dtc
$ cd dtc
$ repo init -u https://github.com/dragon-tc/DragonTC -b master
$ repo sync -j(# of cores) -c -f
For Debian and Ubuntu:
Code:
sudo aptitude install build-essential git git-svn bc binfmt-support libllvm-3.6-ocaml-dev llvm-3.6 llvm-3.6-dev llvm-3.6-runtime cmake automake autogen autoconf autotools-dev libtool shtool python m4 gcc libtool zlib1g-dev
And run the following to build your desired toolchain:
Code:
$ cd build
$ ./version
Where "version" is 3.6. 3.7, 3.8, or 3.9.
To optimize the toolchain for your local system, run with the 'opt' argument. Example:
Code:
$ ./3.7 opt
How do use DragonTC in AOSP?
Either clone a prebuilt or build your own toolchain and place it in prebuilts/clang/linux-x86/host/your_version (3.7 is the prefered version)
Change the version in build/core/clang/config.mk to reflect the directory you placed it in.
Either clone ours, or cherry-pick our changes to prebuilts/ndk and frameworks/rs.
Cherry-pick our DragonTC support commit in build.
Edit build/core/clang/config.mk and set "TARGET_DRAGONTC_VERSION := " to the name of the folder you placed the toolchain in (your_version is the example used above)
How can I fix module issues when compiling with Polly?
It's simple. Just take the module name (ex. "target C++: module_name_here <= some/path/to/code") and add it to the DISABLE_POLLY list. You can also disable Clang all together, use AOSP clang, or force GCC modules to use Clang.
Why call it DragonTC?
The LLVM logo/mascot is a dragon, so in homage to the developers of LLVM and Clang, I used DragonTC as the name.
Credits
A huge thanks to all of the people who helped:
xboxfanj for recreating the Snapdragon Compiler optimizations
xanaxdroid for maintenance, bug fixes, and testing
The LLVM developers for the great work and continuous improvement
All of the great devs/rom builders that helped test
and anyone that I missed!
XDA:DevDB Information
DragonTC, Tool/Utility for the Android General
Contributors
frap129, xanaxdroid
Source Code: https://github.com/dragon-tc
Version Information
Status: Beta
Created 2016-02-19
Last Updated 2016-05-21
Reserved
Reserved
Great....
Minions_Army said:
Great....
Click to expand...
Click to collapse
Thanks?
This sounds interesting. Thanks for sharing your work. I might try it, but as a bloody beginner, can you maybe give a bit more detail on how it affects building / the result?
Adromir said:
This sounds interesting. Thanks for sharing your work. I might try it, but as a bloody beginner, can you maybe give a bit more detail on how it affects building / the result?
Click to expand...
Click to collapse
Once I get a bit more time, I'll edit the op to have more information. In short, Clang is a compiler (like GCC) that is rapidly growing. Google is currently using Clang 3.6 which produces binaries that perform slower than GCC compiled binaries, but they choose to use Clang because it takes less time to compile overall. DragonTC allows you to use the latest Clang toolchains (3.6, 3.7, 3.8, or 3.9) with extra functionality that Google doesn't have, such as LTO, Polly, OpenMP, and Snapdragon Krait optimizations. These make your rom (or anything you compile with it) perform better than if you were to use the stock AOSP clang.
Thanks for clarification. I will try it in a few days and see how well it works
Thank you. just building dragon tc.
sub77 said:
Thank you. just building dragon tc.
Click to expand...
Click to collapse
Let me know how it goes!
http://pastebin.com/z9G5Pr0S using 3.7 and your sabernaro 4.9 rom/kernel tc. any ideas?
http://pastebin.com/z9G5Pr0S using your sabernaro 4.9 rom and kernel repos. Cloned ndk from op, and picked build/rs commits from op. Any ideas? Aosp source.
Edit; readding the triple flags and rebuilding c, same error.
edit: sry double post
Edit. Its handled. Ty, 1000% improvement.
so i'm getting this error http://pastebin.com/tBz7DcFQ
from the error log it seems the libRSCpuRef about ARM mode, so i try to disable it. but then i saw the arm modes is already whitelisted from arm mode.
did i miss something? thanks.
Why was arm mode disabled by default? Would like to give it a try, but I'm assuming there was a reason for disabling it.
brandonabandon said:
http://pastebin.com/z9G5Pr0S using your sabernaro 4.9 rom and kernel repos. Cloned ndk from op, and picked build/rs commits from op. Any ideas? Aosp source.
Edit; readding the triple flags and rebuilding c, same error.
edit: sry double post
Edit. Its handled. Ty, 1000% improvement.
Click to expand...
Click to collapse
can you share how do you fix the compiling error?
i got the same error
iskandar1023 said:
can you share how do you fix the compiling error?
i got the same error
Click to expand...
Click to collapse
Follow us https://github.com/ScrewdAOSP you will need dtc commits from build, fw/base, support and rs. Also ndk, llvm, and png. Gl
Got into https://gist.github.com/spezi77/9953b7a3ea25ee83baa1 when using 3.9 and using UBER GCC 5.3 for kernel. CM based ROM. Any ideas?
Edit: Got it solved. Was unrelated to dragon tc.
Big thanks to the dev for this evolutionary TC! In my device the rom feels much snappier now, even when Antutu does not reflect this observation in higher scoring. Benchmark is pretty much the same as before. But maybe I didn't understand the concepts well enough and this is how we should expect it.
DragonTC allows you to use the latest Clang toolchains (3.6, 3.7, 3.8, or 3.9) with extra functionality that Google doesn't have, such as LTO, Polly, OpenMP, and Snapdragon Krait optimizations. These make your rom (or anything you compile with it) perform better than if you were to use the stock AOSP clang.
Click to expand...
Click to collapse
@frap129 Did you or someone else do benchmarks to check whether a rom compiled with the latest Clang toolchains actually perform better than if we use one of the latest GCC tc, e.g. 5.3?
Hello @frap129 @brandonabandon after switching to dragonTC i get the following error:
Code:
build/core/dynamic_binary.mk:20: *** external/compiler-rt/lib/asan: LOCAL_MODULE not defined before call to local-intermediates-dir. Stop.
I am building for lollipop so the code is here
I am using prebuilt 3.7 and the patches to platform build which you can see here
Any help would be greatly appreciated.
iskandar1023 said:
so i'm getting this error http://pastebin.com/tBz7DcFQ
from the error log it seems the libRSCpuRef about ARM mode, so i try to disable it. but then i saw the arm modes is already whitelisted from arm mode.
did i miss something? thanks.
Click to expand...
Click to collapse
I have only had one tester get this error, and we were unable to find the origin. Seems to only happen on CM based Roms.
Related
These are AOKP builds built using the Linaro 4.6 daily toolchain builds. There might be bugs but so far everything is working really smoothly. I will be working more on the kernel. I will also be updating these as github repo changes come in.
Known bugs:
* Camera is "flaky". It works but if you switch to different qualities it'll most likely crash.This is a bug with the Gallery ( I know sounds strange and it is) because the Gallery needs to connect with the camera to store pictures on the sdcard.
You can track all the most recent jellybean changes on AOKP's gerrit for status "merged" on the "jb" branch:
http://gerrit.sudoservers.com/#/q/status:merged+branch:jb,n,z
ADB
adb remount will not work on these roms. You can use adb root adb remount. If adb root doesn't work well for you for whatever reason use the scripts instead. For adb you'll need to make sure it has root access under development settings in the main settings menu. I have included two scripts to change the state of your system being mounted as either rw or ro. So before you push something with adb to your system you'll need to run the mount-rw script. Usage is as follows:
Type the following in terminal emulator or adb shell. I prefer terminal emulator.
Code:
For read/write access (this is the one you want for adb access)
$ su
# sh /etc/mount-rw
Code:
For read/only access (only need to do this after modifying your system partition, makes it stay secure ;))
$ su
# sh /etc/mount-ro
AOKP is a free, community built, aftermarket firmware distribution of Android 4.1.1 (Jellybean), which is designed to increase performance and reliability over stock Android for your device.
Code:
#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
AOKP is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. AOKP does still include various hardware-specific code, which is also slowly being open-sourced anyway.
All the source code for AOKP is available in the AOKP Github repo. And if you would like to contribute to AOKP, please visit the Gerrit Code Review.
Instructions:
First time flashing AOKP to the Google Nexus 7, or coming from another ROM?
Root the device and install ClockworkMod Recovery.
Perform a NANDroid backup of your current ROM.
Format the system, data & cache partitions of your device.
Perform a factory reset.
Flash AOKP.
Optional: Install the Google Apps addon package.
Upgrading from earlier version of AOKP?
Perform a NANDroid backup of your current ROM.
Flash AOKP
Optional: Install the Google Apps addon package.
A precautionary note about flashing other kernels
I do not support other kernels! If are having issues with this rom and are using some other type of kernel (aka some type of experimental kernel) I will not support
bug issues that you may encounter!
General Credits:
* Google of course for most of the source
https://android.googlesource.com/
* Of course the AOKP team for their source
https://github.com/aokp
* drewis for various ROM fixes
don't double symlink usbstorage
https://github.com/pbeeler/android_...mmit/3cbb418d8972179d0270a83e98f57a98fcdde47b
SystemUI: increase number of visible notification icons
https://github.com/pbeeler/android_...mmit/372a3c1913a1cce0c727709b7058ee95aa5b4ab9
* And lastly me for various other tweaks
Linaro toolchain optimizes the ROMs and Kernels
Power hal to control the kernel frequencies
Stock Launcher rotation enabled by default
The kernel hybrid that is in these ROMs
AOSP Tablet Mode (no DPI mods or launcher tablet ui). Includes full AOSP browser in tablet mode.
Initd.d kernel module script to load kernel modules on boot
Kernel optimization's:
A lot of kernel debugging disabled
Most of the governors are modules so will not clutter up the kernel (side loading governors as modules)
Screen will not turn on when unplugging from power usb/ac.
Other things I probably can't remember right now
Wallpaperz app for extra wallpapers, thread is here http://android-den.com/index.php?topic=1415.0
If I'm forgetting anyone let me know and I'll add you to the list!
About The Kernel:
Cherry-picked changes from faux123's github
User voltage control (For frequency control use SystemTuner by 3C)
CPU Overclocking to 1.7Ghz (1.3Ghz default)
cherry picked select NOHz optimizations from Linux 3.3+
back ported select Linux 3.3+ cgroup (cpu control groups), threadgroup optimizations
SLAB completed updated to Linux 3.5+
RCU completely updated to latest preemptive tree RCU to Linux 3.3+
row i/o scheduler
Safe LZO decompression
LZO updated to latest version
zcache optimizations
Optimized SHA1 algorithm
Other kernel features added by me
Lots of kernel merges/fixes from the mainline linux kernel, too many to list
Zram enabled by default in these roms to 250mb block size (only 10 swappiness)
BFQ v5-3.1 http://algo.ing.unimo.it/people/paolo/disk_sched/description.php
Deadline, No-op, CFQ (default), BFQ, SIO
-O3 optimizations and built with the latest monthly 4.6 linaro gcc releases (I build my own toolchains)
Ramp up CPU frequency on input events which improves responsiveness for the following governors:
SmartassV2, Lagfree, Minmax, Lulzactive and Lazy
Performance improvements on Minmax governor (it really needed it)
Config tweaks (stuff that is already in the kernel but not enabled)
Cpuquiet framework
Cpuquiet implements pluggable policies for forcing cpu cores into a
quiescent state. Appropriate policies will save power without hurting
performance.
CIFS module
ARM Berkeley Network Packet Filter Just-in-Time (JIT) compiler support
CleanCache Enabled
DOS VFAT (read/write), NTFS (read/write), CDROM/UDF FS, CIFS+UTF-8 (windows share)
Zcache
kernel compression GZIP
SHA1 algorithm
Enjoy!
Rom Downloads
Latest gapps 20120923
My Github
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Just in case
Can we also have a flashable kernel please. The kernel looks interesting
Sent from my Nexus 7 using Tapatalk 2
leelaa said:
Can we also have a flashable kernel please. The kernel looks interesting
Sent from my Nexus 7 using Tapatalk 2
Click to expand...
Click to collapse
Yeah when I get home later I'll zip it up and post a separate link to it.
Thanks a lot mate. Look forward to it
Sent from my Nexus 7 using Tapatalk 2
Couldnt get it to boot using TWRP recovery. Anyone else?
christianpeso said:
Couldnt get it to boot using TWRP recovery. Anyone else?
Click to expand...
Click to collapse
can not boot using CWM random reboots during boot at different stages
christianpeso said:
Couldnt get it to boot using TWRP recovery. Anyone else?
Click to expand...
Click to collapse
Neither can I with CWM.
Hmm, I'm in the process of doing another build right now I'll test the new build out on a fresh wipe. Did you guys all wipe since this is the first time flashing these ROMs?
Sent from my Nexus 7 using Tapatalk 2
Just flashed fresh build and still can't replicate the issue. Anyone have success getting it to boot?
Sent from my Nexus 7 using Tapatalk 2
I also couldn't get it to boot with TWRP... I'm mostly interested in your kernel, any chance you could post a flashable zip to try out?
JohnnyHempseed said:
I also couldn't get it to boot with TWRP... I'm mostly interested in your kernel, any chance you could post a flashable zip to try out?
Click to expand...
Click to collapse
Not until the booting issues are gone.
Sent from my Nexus 7 using Tapatalk 2
Boots perfectly for me via TWRP. I wiped all partitions and everything is fine.
Sent from my Nexus 7 using Tapatalk 2
I re-downloaded and flashed again with TWRP and it worked.
Must of been a hiccup in the server creating bad downloads?
Sent from my EVO using Tapatalk 2
Could be. Goo manager checks the md5sums with the app but not if you download it from the website.
Sent from my Nexus 7 using Tapatalk 2
10/06
New version is it out 10/06 with a new power half fix in it. Check my github for changes.
Sent from my Nexus 7 using Tapatalk 2
Totally smoother than the rom I came from. And it's got unicorns, couldn't be better
Sent from my EVO using Tapatalk 2
Alright guys I've attached my Linaro -O3 optimized kernel to the OP with the power hal fix in it to control the frequencies. This kernel is highly optimized unlike the current kernels in the roms. They will however be added to future rom builds and I will update the attachments as I update the kernel. I'll also attach it here for convenience
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hey XDA! Hyper Toolchains has been reworked from the ground up, now offering 40+ different toolchains.
I am not responsible for any ill effects of these toolchains. Use at your own risk, as with any other software.
Click to expand...
Click to collapse
These toolchains may NOT be stable on your device. Don't complain, these are just builds I do in my free time.
Click to expand...
Click to collapse
These toolchains are NOT meant to compete with SaberMod, Uber Linaro. Development is much better on them, and I recommend using SaberMod if you are unsure of these.
Click to expand...
Click to collapse
Now that that's over with, let's get this party started!
There are six different variations of each toolchain version I build. 7.0 builds do not have Linaro GCC variants.
LinaroXSaberMod - Linaro GCC built with SaberMod dependencies such as binutils, gmp, isl, etc. On branch LxSM
LinaroXUber - Linaro GCC built with Uber dependencies. On branch LxU
SaberModXLinaro - SaberMod GCC built with Linaro dependencies. On branch SMxL
SaberModXUber - SaberMod GCC built with Uber dependencies. On branch SMxU
UberXLinaro - SaberMod GCC built with Linaro dependencies. On branch UxL
UberXSaberMod - SaberMod GCC built with Uber dependencies. On branch UxSM
What makes these toolchains special?
My toolchains are for those who want more control over their toolchains. Typically, these toolchains provide much improved performance, but sometimes its hard for builders/devs to choose between the variations on toolchains out there.
These toolchains are for developers/builders who:
Can't decide whether to use SM, Uber or Linaro
Want to please more people, not just fanbois
Want to have fun trying something new
Want to be different from other Kernels/ROMs
Click to expand...
Click to collapse
Where can I get these toolchains?
All of the builds can be found in their respective repos on the Hyper Toolchains bitbucket. The different variations are sorted by branch, while the different toolchain versions (4.9, 5.x, 6.x, and 7.x) are in the repo names.
Hyper Toolchains BitBucket.
How can I use these toolchains?
Well, I wrote a handy little guide here -->[GUIDE][LINUX] Switching to a custom toolchain [ARM][AARCH64]
There are so many amazing people that I would have to thank for making this possible, I wont even try to thank them all, but without them I wouldn't be able to bring these to you.
XDA:DevDB Information
Hyper Toolchains - Hybrid ARM Toolchains, Tool/Utility for the Android General
Contributors
frap129, kwoktopus, sparksco, Cl3kener, Linaro, AOSP, GNU.
Source Code: https://github.com/hyper-toolchains
Version Information
Status: Snapshot
Created 2015-02-28
Last Updated 2016-08-09
reserved @YoshiShaPow
reserved
SaberMod GPLv3 sources
https://gitlab.com/SaberMod
sparksco said:
reserved
Click to expand...
Click to collapse
I hope this thread is more than people saying reserved
Going to try ASAP (not reserved)
Sweet,
Sent from my Moto G 2014
Noice! Will test LinaroMod on Vivid
EDIT: which toolchains contains more Linaro? SaberNaro or LinaroMod? I'm a little confused.
I also see that android-eabi has only one folder, do i have to download linaro toolchain and add that folder there or what? A lot of files are not there and i can't compile.
SaberNaro 4.8 Androideabi uploaded and a working version of LinaroMod!
reas0n said:
Noice! Will test LinaroMod on Vivid
EDIT: which toolchains contains more Linaro? SaberNaro or LinaroMod? I'm a little confused.
I also see that android-eabi has only one folder, do i have to download linaro toolchain and add that folder there or what? A lot of files are not there and i can't compile.
Click to expand...
Click to collapse
SaberNaro contains "more" Linaro and vice versa. And I see the complete toolchain in all androideabi versions... Which one are you talking about?
YoshiShaPow said:
SaberNaro contains "more" Linaro and vice versa. And I see the complete toolchain in all androideabi versions... Which one are you talking about?
Click to expand...
Click to collapse
I was talking with Joe, android-eabi 4.8 is up now, nevermind
reas0n said:
I was talking with Joe, android-eabi 4.8 is up now, nevermind
Click to expand...
Click to collapse
@YoshiShaPow I accidentally uploaded just sysroot, I fixed it earlier today
ooooo can't wait to try a gcc 5.0 based one just for fun
sparksco said:
SaberMod GPLv3 sources
https://gitlab.com/SaberMod
Click to expand...
Click to collapse
Finally edited reserved [emoji2] @frap129
Thank you for these toolchains! I have to do some benchmarking to see which one is faster (or if it makes enough of a difference to matter) and also it versus @Christopher83's Linaro Toolchain for Cortex-A15
I don't care about fanboyism and stuff, whatever's faster is what I'll stick with
when I attempt to use this TC I get "arm-eabi-gcc: error: unrecognized command line option '-pthread'" and before that i had to disable stack protector. I'm a noob so maybe im doing something wrong.
josepha19223 said:
Thank you for these toolchains! I have to do some benchmarking to see which one is faster (or if it makes enough of a difference to matter) and also it versus @Christopher83's Linaro Toolchain for Cortex-A15
I don't care about fanboyism and stuff, whatever's faster is what I'll stick with
Click to expand...
Click to collapse
SaberMod isn't a option there for your test eh? Fanboyism? Not sure what your referring to there. Some toolchains have been around longer like linaro has probably all of the toolchains beat in that regard. So because some toolchains have more fans it makes them slower and not as fast as others? You do realize that benchmarks can mean absolutely nothing in real world uses most of the time right? Benchmarks don't hit every aspect of software optimizations. Mostly just hardware. While we're at it let's just throw battery life out the window too.
OK so I decided to test a few more TCS to check and for some reason I'm getting the "arm-eabi-gcc: error: unrecognized command line option '-pthread'" error on all of them except Christopher's toolchain....I feel like I'm missing something obvious here. Compiling for nexus 6 if that helps.
Xileforce said:
OK so I decided to test a few more TCS to check and for some reason I'm getting the "arm-eabi-gcc: error: unrecognized command line option '-pthread'" error on all of them except Christopher's toolchain....I feel like I'm missing something obvious here. Compiling for nexus 6 if that helps.
Click to expand...
Click to collapse
We have to enable threads support in LD. I'll see about doing it this week sometime..
@frap129 I wonder what is the difference between HYPER and UBER toolchain?
Hello to all. I hope someone can help me.
Background: I am a relatively experienced programmer. I have been programming with C/C++ (and other) in Linux for the last 6 years or so. However I have never dived in Linux Kernel development yet. So I would appreciate some help from anyone that can help me.
Goal: My goal is to learn more about Linux Kernel development. I want to start from my beloved G2, which is approaching its usage EOL. The device is fine, but I am planning on investing on a new one, so I will be able to squeeze it as much as I want.
I want to create a clean kernel for AOSP (CAF) based versions of Android. My vision is to start with a clean CAF base (without CM patches, etc) and bring it up-to-date till Linux 3.4.113 and manage it to boot. Then start backporting code, enhancements, etc. and making tests.
I searched in CAF repositories and I found them to be a mess. Can someone who is experienced with how things work point to the latest clean CAF source for msm8974?
I also want to hear anyone's thoughts on the attempt. Thanks ahead and regards.
Maybe @GalaticStryder, you can give me some guidelines. Deeply appreciated.
errikosd said:
Hello to all. I hope someone can help me.
Background: I am a relatively experienced programmer. I have been programming with C/C++ (and other) in Linux for the last 6 years or so. However I have never dived in Linux Kernel development yet. So I would appreciate some help from anyone that can help me.
Goal: My goal is to learn more about Linux Kernel development. I want to start from my beloved G2, which is approaching its usage EOL. The device is fine, but I am planning on investing on a new one, so I will be able to squeeze it as much as I want.
I want to create a clean kernel for AOSP (CAF) based versions of Android. My vision is to start with a clean CAF base (without CM patches, etc) and bring it up-to-date till Linux 3.4.113 and manage it to boot. Then start backporting code, enhancements, etc. and making tests.
I searched in CAF repositories and I found them to be a mess. Can someone who is experienced with how things work point to the latest clean CAF source for msm8974?
I also want to hear anyone's thoughts on the attempt. Thanks ahead and regards.
Click to expand...
Click to collapse
I think the pure branch in GalaticStryder's Github is pure caf kernel, I don't think he added anything.
shaneel1491 said:
I think the pure branch in GalaticStryder's Github is pure caf kernel, I don't think he added anything.
Click to expand...
Click to collapse
Unfortunately, I think that that branch does not exist anymore. Except if it is now called "marshmallow-caf".
errikosd said:
Unfortunately, I think that that branch does not exist anymore. Except if it is now called "marshmallow-caf".
Click to expand...
Click to collapse
It could be, not sure though.. I did download the source when he had it, I can zip and upload if you need?
Edit: nevermind, I forked his source a while back. Here https://github.com/shack-32/kernel_lge_msm8974/tree/pure
Also when I built it, as well as when he built, the mpdecision seems to be busted on boot, so the cores won't hotplug, you can enable it by looking in /sys directory and echo '1' for the mpdecision file.
shaneel1491 said:
It could be, not sure though.. I did download the source when he had it, I can zip and upload if you need?
Edit: nevermind, I forked his source a while back. Here https://github.com/shack-32/kernel_lge_msm8974/tree/pure
Also when I built it, as well as when he built, the mpdecision seems to be busted on boot, so the cores won't hotplug, you can enable it by looking in /sys directory and echo '1' for the mpdecision file.
Click to expand...
Click to collapse
Thanks a lot! I believe this would be a good start.
I will try and pair it with anykernel packager and enable mpdecision on boot.
errikosd said:
Thanks a lot! I believe this would be a good start.
I will try and pair it with anykernel packager and enable mpdecision on boot.
Click to expand...
Click to collapse
Cool, good luck with it!
Well, I'd first need to explain some other stuff first before you get started
The CAF release for MSM8974 Kernel is oddly one of the no longer maintained ones: LA.BF.1.1.1.x.
To initialize a brand new clean Kernel you'd need to pull the CAF source code and copy the plain LGE Kernel code from the latest release they pushed which is if I'm not mistaken D80230F, then diff it to see what has got replaced and get it back, adapting the code manually on top of the recently merged LGE source code.
This would basically be the first step, then you'd head over to compilation fixes, create the scripts and the tools to bump the image and flash it to see if it boots.
To support more devices you'd need to merge the other variants as well from LGE source code and then do the same as before...
This doesn't make sense since you'd be getting an old Kernel from CAF and yet an older one from LGE. The little updates made on top of the first CyanogenMod 12.1 (CAF Kernel) were very basic and were caught already either by CM itself on their Kernel tree or mine.
Then you'd go forward to merging the kernel-common updates for 3.4.y coming from Google source code and then head over to update the base Linux Kernel version, fix compilation and such...
Since all this is done already, all you'd need is forking the Kernel at 3.4.110 and cherry-pick the selected changes you'd like up to 3.4.113 and compile using my scripts and all that...
The HEAD for that is c8bd789d12f8299db2e5a319abeb4a95df9078b6 and you're set to freely modify it the way you think should be done...
This is the lazy way of course but a great start...
GalaticStryder said:
Well, I'd first need to explain some other stuff first before you get started
The CAF release for MSM8974 Kernel is oddly one of the no longer maintained ones: LA.BF.1.1.1.x.
To initialize a brand new clean Kernel you'd need to pull the CAF source code and copy the plain LGE Kernel code from the latest release they pushed which is if I'm not mistaken D80230F, then diff it to see what has got replaced and get it back, adapting the code manually on top of the recently merged LGE source code.
This would basically be the first step, then you'd head over to compilation fixes, create the scripts and the tools to bump the image and flash it to see if it boots.
To support more devices you'd need to merge the other variants as well from LGE source code and then do the same as before...
This doesn't make sense since you'd be getting an old Kernel from CAF and yet an older one from LGE. The little updates made on top of the first CyanogenMod 12.1 (CAF Kernel) were very basic and were caught already either by CM itself on their Kernel tree or mine.
Then you'd go forward to merging the kernel-common updates for 3.4.y coming from Google source code and then head over to update the base Linux Kernel version, fix compilation and such...
Since all this is done already, all you'd need is forking the Kernel at 3.4.110 and cherry-pick the selected changes you'd like up to 3.4.113 and compile using my scripts and all that...
The HEAD for that is c8bd789d12f8299db2e5a319abeb4a95df9078b6 and you're set to freely modify it the way you think should be done...
This is the lazy way of course but a great start...
Click to expand...
Click to collapse
So that HEAD has to be the cleanest "working" snapshot I can get, right?
Thanks a lot for outlining the procedure and giving me the boost I needed. It will be definitely easier to get started now.
errikosd said:
So that HEAD has to be the cleanest "working" snapshot I can get, right?
Thanks a lot for outlining the procedure and giving me the boost I needed. It will be definitely easier to get started now.
Click to expand...
Click to collapse
Yes, it's pretty clean. Make sure you clean anykernel too.
There's a lot of work for developing kernels! I would like to learn how to do step by step, but i think i have a lot of things that i must learn before starting developing a kernel... As languages i'm learning C, but i don't know other...
matteo0026 said:
There's a lot of work for developing kernels! I would like to learn how to do step by step, but i think i have a lot of things that i must learn before starting developing a kernel... As languages i'm learning C, but i don't know other...
Click to expand...
Click to collapse
Building a kernel is not too hard, adding stuff is a bit tougher. You should start but simply downloading the source of a kernel already found on GitHub. There are various guides on xda that teach you how to build. Once you are comfortable with building you can go on to adding governors and many other tweaks, that's where commits come into play as it makes everything easier to add stuff.
This is a simple tutorial, try look for some more as well http://forum.xda-developers.com/showthread.php?t=2152819
shaneel1491 said:
Building a kernel is not too hard, adding stuff is a bit tougher. You should start but simply downloading the source of a kernel already found on GitHub. There are various guides on xda that teach you how to build. Once you are comfortable with building you can go on to adding governors and many other tweaks, that's where commits come into play as it makes everything easier to add stuff.
This is a simple tutorial, try look for some more as well http://forum.xda-developers.com/showthread.php?t=2152819
Click to expand...
Click to collapse
I'm yet blocked on one step of guide... i can't find only one file g2_blablabla.deconfig...
matteo0026 said:
I'm yet blocked on one step of guide... i can't find only one file g2_blablabla.deconfig...
Click to expand...
Click to collapse
It's not actually named blablabla, the defconfig directory is basically the insturctions to build for all the different devices, so it should be g2_d802.defconfig or something along those lines for D802, as long as it has your device name, for example when Dorimanx builds, his file would be (https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/tree/LG-STOCK-KK/arch/arm/configs) -> dorimanx_d802_defconfig
The defconfig file is found in /arch/arm/configs directory
shaneel1491 said:
It's not actually named blablabla, the defconfig directory is basically the insturctions to build for all the different devices, so it should be g2_d802.defconfig or something along those lines for D802, as long as it has your device name, for example when Dorimanx builds, his file would be (https://github.com/dorimanx/Dorimanx-LG-G2-D802-Kernel/tree/LG-STOCK-KK/arch/arm/configs) -> dorimanx_d802_defconfig
The defconfig file is found in /arch/arm/configs directory
Click to expand...
Click to collapse
Ok, then there isn't nothing of d802_something_deconfig
See this too
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
matteo0026 said:
Ok, then there isn't nothing of d802_something_deconfig
See this tooView attachment 3929508
Click to expand...
Click to collapse
Which repo did you download source from. You can use the d802 config one from my forked version of galatic's pure branch
https://github.com/shack-32/kernel_lge_msm8974/tree/pure/arch/arm/configs
Dori's config is named: dorimanx_d802_defconfig
shaneel1491 said:
Which repo did you download source from. You can use the d802 config one from my forked version of galatic's pure branch
https://github.com/shack-32/kernel_lge_msm8974/tree/pure/arch/arm/configs
Dori's config is named: dorimanx_d802_defconfig
Click to expand...
Click to collapse
Ok, maybe the problem is that i took full stock sources kernel from opensource.lge.com ... Then now i try to do the same thing with lambda sources...?
matteo0026 said:
Ok, maybe the problem is that i took full stock sources kernel from opensource.lge.com ... Then now i try to do the same thing with lambda sources...
Click to expand...
Click to collapse
Hmmm, as far as I know you might run into problems building LG provided ROM for an AOSP/CM rom, so if you follow the same process with caf kernel it should work.
shaneel1491 said:
Hmmm, as far as I know you might run into problems building LG provided ROM for an AOSP/CM rom, so if you follow the same process with caf kernel it should work.
Click to expand...
Click to collapse
Ok then must i take a CAF kernel? Can i take lambda kernel?
matteo0026 said:
Ok then must i take a CAF kernel? Can i take lambda kernel?
Click to expand...
Click to collapse
Either, lambda is a modified caf version
Introduction
Hello everyone! This will be a thread to assist people with getting their device's Android kernel up to date with the latest linux-stable tag from kernel.org. This process will henceforth be referred to as "upstreaming". This thread will assume that you understand how to compile a kernel as well as working with git if you are looking to do this. If you need assistance with that, please refer to one of the following threads (or search for others):
[REFERENCE] How to compile an Android kernel
GIT 101 - Newbie Friendly
Information
Read through the linux-stable-notes README for all the relevant information!
Custom kernels that are upstreamed
Kirisakura Kernel for the Google Pixel XL by @Freak07
Flash Kernel for the Google Pixel 2 by @nathanchance
Flash Kernel for the Google Pixel 2 XL by @nathanchance
Kirisakura Kernel for the HTC U11 by @Freak07
Flash Kernel for the Huawei Nexus 6P by @nathanchance
Electron Kernel for the Huawei Nexus 6P by @frap129
Jolla Kernel for the LG Nexus 5X by @jollaman999
Sigma Kernel for the Motorola Nexus 6 by @neobuddy89
Pantheon Kernel for the Motorola Z2 Force by @Uzephi
Lightning Kernel for the OnePlus One by @nikhil18
BlueBolt Kernel for the OnePlus 2 by @ShreyanshLodha
EAS Kernel for the OnePlus 2 by @ anupritaisno1
Haruhi Kernel for the OnePlus 2 by @ anupritaisno1
Kawori Kernel for the OnePlus 2 by @aviraxp
Caesium Kernel for the OnePlus 3/T by @MSF Jarvis
Dorimanx Kernel for the OnePlus 3/3T by @dorimanx
Flash Kernel for the OnePlus 5 by @nathanchance
Fusion Kernel for the OnePlus 5 by @jancsessz
Lightning Kernel for the OnePlus 5 by @nikhil18
Modest Kernel for the Samsung Galaxy Note 4 by @kevintm78
IceColdKernel for the Xiaomi Redmi Note 3 by @GreekDragon
ROMs with upstreamed kernels built in
ABC ROM for the Nexus 6P
AIM ROM for the OnePlus 2
Carbon ROM
OnePlus One
OnePlus 2
OnePlus 5
Dirty Unicorns: Statement | Downloads/Support
GZOSP for the OnePlus 3/T and OnePlus 5
Haruhi ROM for the OnePlus 2
MODest ROM for the Samsung Galaxy Note 4 by @kevintm78
Unofficial OmniROM for the OnePlus One by @FSadino
Pure Nexus: Statement
Nexus 5X (bullhead)
Nexus 6 (shamu)
Nexus 6P (angler)
Pixel (sailfish)
Pixel XL (marlin)
Vanilla Android:
Nexus 6 (shamu)
Nexus 6P (angler)
Receiving help
I am more than happy to answer any questions regarding this process in this thread. You can use the repos I have merged linux-stable into as a reference for solving conflicts and seeing how the merge commit style looks. Additionally, if you feel any information is missing or can be improved upon, please let me know! I want this to be a collaborative effort.
Good luck!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The Flash said:
/dev/null
Click to expand...
Click to collapse
Here's a note you should add: Don't "git cherry-pick", "git merge" or "git bisect" during a thunderstorm
Awesome!
I have clarified on how to know where to start (although it is fairly obvious) in section 1 of the how to.
Sent from my Nexus 6P using XDA Labs
Thanks for the guide, it's very helpful, also I personally use this command to merge the tags, it's just one command which is nice
git pull https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git -t (tag)
Sent from my LEX727 using XDA Labs
mosimchah said:
Thanks for the guide, it's very helpful, also I personally use this command to merge the tags, it's just one command which is nice
git pull https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git -t (tag)
Sent from my LEX727 using XDA Labs
Click to expand...
Click to collapse
Yup, git pull is shorthand for git fetch && git merge, so it's fetching the tag then merging it. Definitely quicker if you are going fast.
To everyone, I have added section 5 and 6 under tips and tricks, going over how to easily get notified of upstream updates and known problem commits to help you in the journey upwards!
Thanks Sir @The Flash for your new Guide.
I'm now learning kenel development.
Your guide is very useful.
Thank You very Much.
BTW,
I want to request to use your GitHub's GCC Prebuilt Toolchain Repo for my Nexus5X kernel building.
I want to use this ToolChain Compiler for my Kernel.
Have a permission?
OR
How to request to you?
•••
Sent from my Google Nexus 5X using XDA Labs
Thank you very much, well done.
ZawZaw said:
Thanks Sir @The Flash for your new Guide.
I'm now learning kenel development.
Your guide is very useful.
Thank You very Much.
BTW,
I want to request to use your GitHub's GCC Prebuilt Toolchain Repo for my Nexus5X kernel building.
I want to use this ToolChain Compiler for my Kernel.
Have a permission?
OR
How to request to you?
•••
Sent from my Google Nexus 5X using XDA Labs
Click to expand...
Click to collapse
Go for it.
The Flash said:
Go for it.
Click to expand...
Click to collapse
Thank You Sir.
•••
Sent from my Google Nexus 5X using XDA Labs
I am going to start announcing when new kernel versions are available so people don't need to subscribe to the mailing list if they don't want to. So with that:
Linux 3.10.107 (announcement, tree)
Linux 3.18.59 (announcement, tree)
Linux 4.4.75 (announcement, tree)
I have also included a section for publicly available upstreamed kernels so users can choose one if they would like. They'll be broken up by device. Please suggest either your kernel or one you know is up to date, I'll be adding to some I already know of later today.
Hi, Thanks for this wonderful guide, but I have a question which was not quite answered anywhere.
I have a kernel 3.4.5 and i want to upstream it, I did the cherry-pick process and got it to 3.4.112(purposefully not to 113 yet).
My question is how do I use the Merge process?
I did this:
Code:
git merge v3.4.6
on my base 3.4.5 and it create a whole bunch of conflicts(over 30k)
Here is the output of:
Code:
git status > git_status.txt
(I can't upload it to any online paste service as it is 1.84MB file)
Basically, it says this for all the files(I think)
Code:
both added: tools/perf/util/ui/progress.h
both added: tools/perf/util/ui/setup.c
both added: tools/perf/util/ui/ui.h
both added: tools/perf/util/ui/util.c
both added: tools/perf/util/ui/util.h
Can you tell me how to proceed from here?
sscsps said:
Hi, Thanks for this wonderful guide, but I have a question which was not quite answered anywhere.
I have a kernel 3.4.5 and i want to upstream it, I did the cherry-pick process and got it to 3.4.112(purposefully not to 113 yet).
My question is how do I use the Merge process?
I did this:
Code:
git merge v3.4.6
on my base 3.4.5 and it create a whole bunch of conflicts(over 30k)
Here is the output of:
Code:
git status > git_status.txt
(I can't upload it to any online paste service as it is 1.84MB file)
Basically, it says this for all the files(I think)
Code:
both added: tools/perf/util/ui/progress.h
both added: tools/perf/util/ui/setup.c
both added: tools/perf/util/ui/ui.h
both added: tools/perf/util/ui/util.c
both added: tools/perf/util/ui/util.h
Can you tell me how to proceed from here?
Click to expand...
Click to collapse
I know we discussed this already but a note has been added to the OP under section 3 regarding merging vs. cherry-picking on a tarball source.
The Flash said:
6. Commits known to cause runtime or build errors
3.10:
ASoC: compress: Fix compress device direction check - Introduced in 3.10.96, this will break sound altogether.
Click to expand...
Click to collapse
This commit should solve it:
https://github.com/LineageOS/androi...mmit/104ec98564e210cc1f38647ad98329ad84c3b39e
bodafranus said:
This commit should solve it:
https://github.com/LineageOS/androi...mmit/104ec98564e210cc1f38647ad98329ad84c3b39e
Click to expand...
Click to collapse
There's no point in removing just that block because playback is always going to be 1, it won't take the compress route, which defeats the entire purpose of that commit. Reverting is the better option in my opinion.
Hi
I know this is not the right place to ask but could you please answer my question.
I want to build kernel for my i9100g - Galaxy SII but i have problem with the compiling.
Tried both Omni And CM.
Every time i compile i get error with initramfs, when i remove initramfs in .config file i can compile without any problem.
I get something like this ..
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h’ is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/opt/src/arm/scripts/gen_initramfs_list.sh: Cannot open ‘../initramfs/initramfs.cpio’
make[1]: *** [usr/initramfs_data.cpio.gz] Error 1
make: *** [usr] Error 2
make: *** Waiting for unfinished jobs….
So please help, it's been 2 months i try to fix this problem, But NO LUCK
@AhmAdDev99 ask in the compilation thread that I have in the OP. I'll tell you right of bat, it is probably a permissions issue because you aren't in your home folder.
To everyone else:
3.18.60 (tree, announcement)
4.4.76 (tree, announcement)
I am extremely proud to be on a team leading the charge on this mentality: https://plus.google.com/u/0/+DirtyUnicornsOfficial/posts/2MpHCwKqh5J
I have updated the OP with the stable kernel rules, as they will further clear doubts from the detractors.
Awesome!!! Nice to see one of these! Thanks for taking the time!
Android Kernel Actions - Easily Create an Environment and Build Android Kernels With GitHub Action"GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want." - GitHub.
Well basically, GitHub Action gives you some computing power for building and testing your code. The good thing is, this is FREE! So I though It's a good idea to build kernels with it. No need to let your computer using 100% CPU Usage for a long time, no need to rent a VPS or using cloud provider services like AWS, GCP, etc.
How does this script works? Pretty simple. It launches an Ubuntu container in GitHub Action, Installs necessary packages based on your toolchain preferences, sets environment variables, builds your kernel and zips it with AnyKernel3 (If template provided).
Available toolchains :
GCC from Ubuntu repository
Clang from Ubuntu repository (with or without GNU's binutils)
Proton Clang (with or without GNU's binutils)
AOSP's Clang (with or without GNU's binutils)
Feel free to request another source of toolchain.
Toolchain strings
NOTE: If you want to compile with Clang and LLVM without any of GNU's binutils, make sure your kernel source already supports LLVM options, otherwise compilation may fails or it will not use LLVM utils. In that case, use clang toolchain with GNU's binutils.
Instructions1) You need to host your kernel source in GitHub and optionally your modified AnyKernel3 template in GitHub
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2) Create a .yml file in .github/workflows:
NOTE: This is a YAML-formatted file, which means indentation matters. I won't explain this example code in detail, refer to GitHub Action documentation.
Example code:
Code:
name: "Build Dark Ages kernel on darky." # Description of the workflow.
on:
push:
branches: darky # Branch to build.
workflow_dispatch: # Allow to manually trigger workflow.
jobs:
build:
name: "Build Dark Ages kernel"
runs-on: ubuntu-latest
steps:
- name: "Checkout kernel source" # Clone the kernel source.
uses: actions/[email protected]
- name: "Checkout zipper" # (OPTIONAL) Clone the AnyKernel3 template.
uses: actions/[email protected]
with:
repository: lemniskett/AnyKernel3 # Your own AnyKernel3 repository.
path: zipper # Clone to path "zipper", REQUIRED.
- name: "Android kernel build" # Build kernel with lemniskett/android-kernel-actions.
uses: lemniskett/[email protected]
with:
arch: arm64 # Specify arch
compiler: gcc/9 # Specify toolchain to use
defconfig: vince_defconfig # Specify defconfig to use
image: Image.gz-dtb # Specify final build file
3) Then, start committing the file, the build should starts right after you commit the file. if not, check on.push.branches in the yml file.
Q: Now, how do I get the final build file?
A: You can use other action such as ncipollo/release-action or appleboy/telegram-action to upload the file, Example usage is available in README.md and build-yml
Q: Something is missing in the environment, can you add it?
A: Sure, just open an issue in the repo
Source: https://github.com/lemniskett/android-kernel-actions
Questions, Comments, Feedbacks are welcome.