[TUTORIAL] 【GUIDE】【LINARO】《《How to Build FULL LINARO》》【06/05/13】 - HTC Rezound

[TUTORIAL] 【GUIDE】【LINARO】《《How to Build FULL LINARO》》【06/05/13】
{
"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"
}
Welcome! This thread will teach you how to correctly build AOSP Roms for the HTC Rezound using the Linaro toolchains or other 4.8+ toolchains.
***PLEASE NOTE*** You must already have a knowledge of building roms before attempting this. This is not a how to build rom thread.
Thanks goes out to XDA Recognized Contributor DJLamontagneIII for helping me to learn how to do this, and for helping me resolve some conflicts along the way! I could not have done it without you sir. Thanks!
Additionally, thanks goes out to Recognized Developer sparksco aka "SaberMod" for the use of his optimized tool chains and for teaching me and helping me along the way.
Thanks also goes out to Flyhalf205 for coming on board with this mission and working with me to make this possible for everyone else to build.
PLEASE NOTE:
I or the above mentioned or anyone else for that matter am/are not responsible for anything you do to your phone.
That being said, let's begin ​
Recently, I have come up with a major simplified way of achieving this goal. for those who are interested in the intricate details of what all goes into this lengthy process and just how much time my script is actually saving you, it will be in a hidden window near the end of this post.
(Remember again, that these instructions are for individuals how have already compiled a rom and are certain their current source builds)
Fetch the script.
Do that by typing one of the three following from your root directory:
Code:
THIS IS BEING UPDATED. ONCE UPDATED, THE FOLLOWING THREE OPTIONS WILL BE AVAILABLE TO YOU:
linaro.sh
saber.sh
codefire.sh
then do:
Code:
. script-you-chose.sh
This script that I've put together is incredibly convenient in that it will do all of the following tasking essentials that you would normally have to do manually for you automatically (which would normally take a good deal of time!)
-Pulls the optimized chain of choice and places it into prebuilts/gcc/linux-x86/arm
-Pulls other optimized chains from google source as well
-Modifies your build repo and a few other build files to direct it to the new chain
-Pulls about 32 different linaro patches and optimizations made by the linaro team that improve the performance of the rom
-modifies whichever kernel you are currently building with to allow it to build Linaro
-Modifies our device specific repos to allow it to build with the linaro chain
-Sets the building variables
-Fetches your vendor prebuilts
-Builds your envsetup.sh for you
Any questions or concerns or need for assistance? Please post in this thread and we will be happy to assist you when available (and if we know how to fix it)
Donations are always appreciated and never expected!
Mine: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ER36WF5HCHTEU
sparksco's: http://forum.xda-developers.com/donatetome.php?u=2394329
DJLamontagneIII's: http://forum.xda-developers.com/donatetome.php?u=1249390
FlyHalf's: http://forum.xda-developers.com/donatetome.php?u=3082717​

One more for kicks

You will have to run ". android/linaro.sh" again after you perform a "repo sync". It will discard those Linaro commits.​

thank you guys very much:thumbup:
Sent from my HTC Rezound using xda premium

Very nice!
Sent from my XenonHD Infused Samsung Galaxy s3 using xda premium

Sweet!

I just built yesterday, so I know everything works...
Tried again after a fresh repo sync and running linaro.sh
Code:
/home/vwmofo/android/MofoROM-2.0/kernel/htc/vigor-3.0/drivers/base/sync.c:32:31: fatal error: trace/events/sync.h: No such file or directory
compilation terminated.
make[4]: *** [drivers/base/sync.o] Error 1
make[3]: *** [drivers/base] Error 2
make[2]: *** [drivers] Error 2
make[2]: *** Waiting for unfinished jobs....
then a little further down
Code:
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/vwmofo/android/MofoROM-2.0/kernel/htc/vigor-3.0'
make: *** [TARGET_KERNEL_BINARIES] Error 2

Try another repo sync and run linaro script again. I made some kennel commits last night. Make sure you get those
Sent from my ADR6425LVW using Tapatalk 2

@kkozma, is that with the default kernel from fly's git or someone else's?
If it's with funky kernel from the jb-aosp branch, then you don't need to do the kernel commit part of the script as his is linaro ready

It's the default kernel.
I just ran a new repo sync and there were no changes other than the removal of all the commits from the script. Re-ran the script and started up a brunch.
But considering nothing new was downloaded, I don't think it's going to work.
*edit* I did clobber and clean before the build the first time.

If it crashes again, revert all of yesterday's commits to the kernel except for the linaro commit and see if it builds then. You will have to do a make clean obviously after the crash just as you just did

kkozma said:
It's the default kernel.
I just ran a new repo sync and there were no changes other than the removal of all the commits from the script. Re-ran the script and started up a brunch.
But considering nothing new was downloaded, I don't think it's going to work.
*edit* I did clobber and clean before the build the first time.
Click to expand...
Click to collapse
repo sync again right now.... I might have forgotten a commit.

DOH! Ok, I killed the last build, and re-ran repo sync. It did download something from your github.
It's brunching now. Will report back.

kkozma said:
DOH! Ok, I killed the last build, and re-ran repo sync. It did download something from your github.
It's brunching now. Will report back.
Click to expand...
Click to collapse
My bad. If it errors out one more time. Just do a another repo sync. My box didn't push all my commits. Really weird. But all should be pushed now. As of 1 minute ago.

So we're all bubble gum and kittens again?
Sent from my HTC One X using Tapatalk 4 Beta

IAmTheOneTheyCallNeo said:
So we're all bubble gum and kittens again?
Sent from my HTC One X using Tapatalk 4 Beta
Click to expand...
Click to collapse
You got it dude!

FYI: It built.
Running backups now and will be flashing soon.

kkozma said:
FYI: It built.
Running backups now and will be flashing soon.
Click to expand...
Click to collapse
Glad to know the script works In the future, I plan to add more linaro patches to it along with eventually updating us to linaro 4.9 which has been reported much faster than the previous chains

SAMSUNG GALAXY NEXUS (Tuna) Support
I just finished putting together a script specifically for the Samsung Galaxy Nexus AOKP building and can confirm that it works beautifully.
In case any of you out there build for that device. I gave it to Apophis if you need it
-Neo

IAmTheOneTheyCallNeo said:
Glad to know the script works In the future, I plan to add more linaro patches to it along with eventually updating us to linaro 4.9 which has been reported much faster than the previous chains
Click to expand...
Click to collapse
Yeah, seems like it works great. My phone definitely seems more responsive too.
Hopefully the RR's are fixed since my last build.

Related

[ROM] AOKP 4.2.2 - unofficial m7 builds

{
"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"
}
Device: m7 (HTC One)
All I've done is compiled sources to bring you these builds. All the heavy lifting is done over at https://github.com/htc-msm8960 - thank those guys, they are working incredibly hard to bring AOSP to this device. I think the list of developers goes something like this: h8rift, intervigil, toastcfh, deck, Flinny, Flemmard, Codeworkx, birdman
That means that any bugs that exist in other AOSP builds will probablacy exist in these builds.
Click to expand...
Click to collapse
» Installation is simple:
If coming from another ROM or another major AOKP version, wipe data in recovery
Make sure you're using the latest CWM or TWRP
Flash ROM
Flash Google Apps (GAPPS)
Reboot
Code:
May 22
- included test call audio fix
- included xxhdpi device commits
May 21
- latest AOKP sources
- latest CM m7 sources
from gerrit:
- updated ribbons
- LockScreen: Fix crash when unlocking twice
- Add transparency settings for lockscreen (2/2)
- Smooth Spinners: Makes the loading "spinner" animation smoother in non-holo apps
sorry for the delay for those who waited :)
» Check merged commits on AOKP's Gerrit
build: http://goo.im/devs/roman/aokp_m7 - my nightlies will be in this folder. I'll also probably push them through AOKPush
gapps: http://goo.im/gapps/gapps-jb-20130301-signed.zip - b7e53e96e1c8b1a1c4865bf29418c8e0
» Building AOKP for your m7
First, create file .repo/local_manifests/m7.xml with the following contents: https://gist.github.com/romanbb/5517890
repo sync
Cherry pick this: http://gerrit.aokp.co/#/c/8320/
Cherry pick this: http://gerrit.aokp.co/#/c/8159/
Cherry pick this: http://gerrit.aokp.co/#/c/8321/
Build aokp_m7:
Code:
. build/envsetup.sh && brunch aokp_m7-userdebug
» AOKP Gerrit
» AOKP on Github
» SOURCE on AOKP.co
We greatly appreciate your contribution in the form of code, or PayPal donations.
» Donation options on AOKP.co
Enjoy!
for science
Whhhhhhhat?!?!?! Awesome sauce, great to see you here Roman!!
Did you get the one Roman? My wife got it and I'm debating selling my s3 for it. Any thoughts on the phone or are you gonna dev for it? Thanks
Sent from my SGH-T999 using Tapatalk 2
eliasadrian said:
Did you get the one Roman? My wife got it and I'm debating selling my s3 for it. Any thoughts on the phone or are you gonna dev for it? Thanks
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
He's got the HTC One on T-Mobile
https://twitter.com/romanbb/status/330053433702887425
eliasadrian said:
Did you get the one Roman? My wife got it and I'm debating selling my s3 for it. Any thoughts on the phone or are you gonna dev for it? Thanks
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Yeah, Amazon hardware. I'm not going to dev so much "for" it, even though I might try... but I think I'll dev with it?
Sent from my Nexus 7 using Tapatalk HD
new build up http://goo.im/devs/roman/aokp_m7/
coming from the s3, any word on what works and what does not work?
nicksmizzle said:
coming from the s3, any word on what works and what does not work?
Click to expand...
Click to collapse
Camera doesn't work
Sent from my HTC One using xda app-developers app
Camera Bummer
Once camera works, this will be my daily driver! can hardly wait!!!:highfive:
Roman,
Good to see you around, I think something is up with AOSP with the GFX. If you download the live wallpaper below you will see it has some strange effects that do not happen on the stock rom. My Nexus 10 tablet on 4.2.2 does not have the artifacts so I do not believe this is a 4.2.2 issue with the phone but both your rom and the ALPHA for Cyanogen 10.1 both display the issue.
https://play.google.com/store/apps/details?id=com.tribok.android.livewallpaper.springtideshower.lite
Its a great wallpaper BTW but wanted to bring it to your attention because maybe something is off with the GFX driver being used? I understand that major work is done by https://github.com/htc-msm8960 but thought I would let you know if you could help pass along.
Thanks,
1WayJonny
Roman, good to have you on the one.
I sure hope you all can get the camera working....
I get this on compiling from the new .xml and instructions today
device/htc/m7-common/overlay/packages/apps/Settings/res/values/arrays.xml:8: error: Error: No resource found that matches the given name (at '^index_0' with value '@string/pulse_length_always_on').
make: *** [/home/joey/aokp/out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs....
warning: no entries written for dimen/password_keyboard_height
warning: no entries written for drawable/sym_keyboard_delete_holo
any suggestions?
superg81 said:
I get this on compiling from the new .xml and instructions today
device/htc/m7-common/overlay/packages/apps/Settings/res/values/arrays.xml:8: error: Error: No resource found that matches the given name (at '^index_0' with value '@string/pulse_length_always_on').
make: *** [/home/joey/aokp/out/target/common/obj/APPS/Settings_intermediates/src/R.stamp] Error 1
make: *** Waiting for unfinished jobs....
warning: no entries written for dimen/password_keyboard_height
warning: no entries written for drawable/sym_keyboard_delete_holo
any suggestions?
Click to expand...
Click to collapse
check the op. there are new build instructions. it's specifically the overlay commit that will fix that for you
Romanbb said:
check the op. there are new build instructions. it's specifically the overlay commit that will fix that for you
Click to expand...
Click to collapse
just did and get this now
From http://gerrit.aokp.co/AOKP/device_htc_m7-common
* branch refs/changes/81/8481/1 -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
overlay/frameworks/base/core/res/res/values/config.xml
Please, commit your changes or stash them before you can merge.
Aborting
let me re post here
From http://gerrit.aokp.co/AOKP/device_htc_m7-common
* branch refs/changes/20/8320/4 -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
overlay/frameworks/base/core/res/res/values/config.xml
Please, commit your changes or stash them before you can merge.
Aborting
superg81 said:
just did and get this now
From http://gerrit.aokp.co/AOKP/device_htc_m7-common
* branch refs/changes/81/8481/1 -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
overlay/frameworks/base/core/res/res/values/config.xml
Please, commit your changes or stash them before you can merge.
Aborting
let me re post here
From http://gerrit.aokp.co/AOKP/device_htc_m7-common
* branch refs/changes/20/8320/4 -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
overlay/frameworks/base/core/res/res/values/config.xml
Please, commit your changes or stash them before you can merge.
Aborting
Click to expand...
Click to collapse
in each of those dirs, you could do a "git reset --hard HEAD" to clear out any changes you may have made
Romanbb said:
in each of those dirs, you could do a "git reset --hard HEAD" to clear out any changes you may have made
Click to expand...
Click to collapse
gotcha,shall try that
did you realize 4 and 5 in op for picks are same?
superg81 said:
gotcha,shall try that
did you realize 4 and 5 in op for picks are same?
Click to expand...
Click to collapse
i did not
Romanbb said:
i did not
Click to expand...
Click to collapse
:silly:
are you guys using the tmo htc one having any issues with call audio?

[GUIDE][BOOT][MT2L03] Tutorial guide for compiling boot image from source code

DISCLAIMER: Rooting your phone and using custom ROMS/kernels have risks, I am not responsible any abnormal behaviour of your phone, ex. your phone bricks, or your phone catches on fire, or your phone explodes. USE IT AT YOUR OWN RISK!!
DON"T FORGET TO BACKUP YOUR ORIGINAL BOOT IMAGE.
What you need:
Original BOOT IMG extracted from your phone
Android/Linux kernel source code for MT2L03:
https://github.com/j42lin/android_kernel_huawei_mt2l03
Android cross-compilation toolchains (Credit to DooMLoRD)
https://github.com/j42lin/android_prebuilt_toolchains
Kernel package tool(Credit to xiaolu)
https://github.com/j42lin/mkbootimg_tools
and basic knowledge in Linux shell conmmands
(Also you might want to setup your 64 bit Ubuntu enviroment based on Google/Cyanogenmod requirements)
Q&A:
Q: What is difference between Android BOOT IMG and kernel?
A: Kernel is often refered to as Linux kernel. BOOT IMG(boot image) contains Linux kernel, ram disk, and device trees(Qualcomm stuff).
Q: Have you always wondered what kind of data structure Android boot image is like?
A:
Old school struct: http://stackoverflow.com/questions/18284787/android-boot-image-format
Qualcomm way: https://github.com/j42lin/mkbootimg_tools/blob/master/dtbtool.txt
Instructions
Step 1.
Download Android kernel source code and cross compilation tool chains, and run these commands to under kernel source code folder compile Linux zImage
export CROSS_COMPILE=~/android/toolchains/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-
export ARCH=arm
make clean && make mrproper
make mt2l03_defconfig
make menuconfig
make CONFIG_NO_ERROR_ON_MISMATCH=y -j4
Note: your CROSS_COMPILE tool chain folder might be different than mine, use your brain :good:
Step 2:
Use mkbootimg_tools to unpack original BOOT IMG
This step will extract device trees and ram disk from your BOOT IMG (Damn you Qualcomm and your device trees)
Step 3:
Place your zImage into the folder you just extracted in Step 2
View attachment 3249210
View attachment 3249211
Step 4:
Use mkbootimg_tools to pack new BOOT IMG
and flash onto your phone using fastboot:victory::victory:
View attachment 3249294
Tips: You can add fastboot path as an environment variables if you are under windows
{
"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"
}
Download(compiled by me ):
https://drive.google.com/file/d/0B5mys64Sigs_RmdYMnRpSHpXVVk/view?usp=sharing
20140406:
What is not working?
WIFI
reserved
reserved 2222
Tried updating after this? Just curious.
WiFi isn't working because when you build a kernel without modifying the source to allow no module support then you must make sure to build the modules. These modules must match with the kernel version or else you will get issues such as WiFi breakage.
The current modules on your device does not match with your newly compiled kernel version.
Easy fix in the end.
I always build kernels without module support to prevent this problem and to prevent from having to build and share new modules down the road.
Not sure that's the case here. Since everything else must be working as he didn't list anything else but WiFi. Possible though. And sometimes builds just don't compile correctly.
If it's his first attempt I would say grats. Takes a few tries to get familiar with it.
If he didn't replace the old modules on his device with the new modules after running the command
Code:
make modules
Then I am pretty confident why WiFi is broken. Kernel Version must match unless you play with the source to disable module support. This is a must with any Android device.
As for the other Modules not being listed as causing errors or not working, but just WiFi... Simple testing internally would confirm such as logcats and dmesgs for example.
Anyways, congrats on the kernel build. For first timers it can be very challenging to get a successful compilation.
@Moody66,
I took a look at the kernel source that he forked. mdmower already modified the source so that the modules would be built into the kernel during compilation. Though he commented that some work for FM is needed still. So, as you stated earlier, could be a bad build or the changes mdmower made are still incomplete. I am leaning on both being the issue .
https://github.com/j42lin/android_k...mmit/b4685f010bc0bb7543a3a4257b3ea461640e6458
---------- Post added at 02:25 PM ---------- Previous post was at 02:20 PM ----------
Also, xialou made some bug fixes to his mkbootimg_tools repo. OP hasn't merged those changes yet so for now I would recommend grabbing the project directly from xialou mkbootimg_tools
I still need to go through and merge some of those changes to the ARM directory for those who use the project straight on their phone and send him a pull request. Was just looking at it last night.
Figured as much. Assuming he's following up he may make the changes now anyway. Especially after you dug through to find the problem. I should have kept mine just to throw a build out. I wouldn't dare do one without testing first. Made one or two for the touchpad that just didn't compile right. Lol. Odd why they do that sometimes. I am sure he will appreciate your input. One less headache for him!
SHM said:
@Moody66,
I took a look at the kernel source that he forked. mdmower already modified the source so that the modules would be built into the kernel during compilation. Though he commented that some work for FM is needed still. So, as you stated earlier, could be a bad build or the changes mdmower made are still incomplete. I am leaning on both being the issue .
https://github.com/j42lin/android_k...mmit/b4685f010bc0bb7543a3a4257b3ea461640e6458
---------- Post added at 02:25 PM ---------- Previous post was at 02:20 PM ----------
Also, xialou made some bug fixes to his mkbootimg_tools repo. OP hasn't merged those changes yet so for now I would recommend grabbing the project directly from xialou mkbootimg_tools
I still need to go through and merge some of those changes to the ARM directory for those who use the project straight on their phone and send him a pull request. Was just looking at it last night.
Click to expand...
Click to collapse
I haven't been looking into Android OS lately, but thank you so much for some of kernel insights. :good: I always find it super hard to learn Android system development, since Android is advancing and tightening security every year.

[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 Angler, they picked 3.10.73. 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.74 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 (arm64). However, upstream Linux is not unstable and by adding each version one at a time, you can verify this. I found only two patches between 3.10.73 and 3.10.105 that gave me issues and it is easy enough to either fix/revert them. 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.73 to 3.10.74, 3.10.74 to 3.10.75, 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 angler-upstream branch) and another one with a plain AnyKernel source for you to modify (angler-stock is the most basic, angler-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/angler/tree/7.1.2-upstream
AnyKernel source: https://github.com/nathanchance/AnyKernel2/tree/angler-stock-decrypt
Toolchain source: https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/
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/angler.git source
git clone https://github.com/nathanchance/AnyKernel2.git anykernel
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 AOSP-4.9
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.9 toolchain into a folder named AOSP-4.9
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 7.1.2-upstream
cd ../anykernel && git checkout angler-stock-decrypt
Explanation:
First command: move into the source directory and checkout the branch "n7.1.2-upstream", which has all of the necessary patches in it.
Second command: move into the AnyKernel directory and checkout the branch "angler-decrypt". If you don't want to disable forced encryption, use the "angler-stock" branch.
Tell the compiler what you are are compiling
Code:
export CROSS_COMPILE=${HOME}/Kernel/AOSP-4.9/bin/aarch64-linux-android-
export ARCH=arm64 && export SUBARCH=arm64
make clean && make mrproper
make angler_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.9" part.
Second command: tell the compiler which architecture we are compiling for. In this case, our device is an arm64 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 angler_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$(grep -c ^processor /proc/cpuinfo)
Explanation:
make tells the compiler to make the kernel (duh) and the -j$(grep -c ^processor /proc/cpuinfo) tells the compiler to use the maximum number of cores your computer has available
Make the AnyKernel zip
Code:
cp -v arch/arm64/boot/Image.gz-dtb ../anykernel/zImage-dtb
cd ../anykernel
zip -r9 stock-upstream.zip * -x README stock-upstream.zip
Explanation:
First command: copies the completed kernel (Image.gz-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.
Reserved
Nice
Awesome! Thanks
Sent from my ONEPLUS A3000 using Tapatalk
This is awesome! Can't wait to try this out. I've been looking for a good guide on building kernels for a long time.
I have cleaned up and reworded the OP a bit, I write better at 12pm than 4am it seems :silly:
This is nice
Sent from my Nexus 6P using XDA-Developers mobile app
Any performance or any other benefits? Normally I would just flash. But I've been trying to stay completely stock on N these days.
Smallsmx3 said:
Any performance or any other benefits? Normally I would just flash. But I've been trying to stay completely stock on N these days.
Click to expand...
Click to collapse
Most likely not. Just bug fixes and stability improvements.
Sent from my Nexus 6P using XDA Labs
Been using this kernel all day today and it seems pretty solid and good on battery life
{
"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"
}
Sent from my Nexus 6P using XDA-Developers mobile app
syrkles said:
Been using this kernel all day today and it seems pretty solid and good on battery life
Sent from my Nexus 6P using XDA-Developers mobile app
Click to expand...
Click to collapse
Guess that means I did a good job adding all the necessary patches haha.
Will this be updated as more patches are released?
Sent from my Nexus 6P using XDA-Developers mobile app
bossofindy said:
Will this be updated as more patches are released?
Sent from my Nexus 6P using XDA-Developers mobile app
Click to expand...
Click to collapse
That's the goal. I'll rebase on top of new Android security releases as they are available and I'll add Linux versions as they come out.
Github and the kernel in the OP are updated to 3.10.104.
Added to Nexus 6P index thread:
[INDEX] Huawei Nexus 6P
Work on 7.1???
I'm going to nickname this the Streak Kernel for myself.
I quite like keeping up to date stability wise. Bleeding edge is nice but I've learned my lesson.
Pheoxy said:
I'm going to nickname this the Streak Kernel for myself.
I quite like keeping up to date stability wise. Bleeding edge is nice but I've learned my lesson.
Click to expand...
Click to collapse
@Pheoxy how are the folks at the i9305 forum going with their ROMs, I left there with a terrible build of cm13,,, i really hope that they had sorted out the RIL issue in source instead of using a really dirty hack of using chmod with cm12.1 to get Radio working... glad to see you here in the 6p forums though
Sent from my Nexus 6P using XDA-Developers mobile app
winxuser said:
@Pheoxy how are the folks at the i9305 forum going with their ROMs, I left there with a terrible build of cm13,,, i really hope that they had sorted out the RIL issue in source instead of using a really dirty hack of using chmod with cm12.1 to get Radio working... glad to see you here in the 6p forums though
Sent from my Nexus 6P using XDA-Developers mobile app
Click to expand...
Click to collapse
It was time to upgrade. Still got the old S3 but I must have left around the same time as you. Bit to busy to really do anything of my own anymore so @theflash makes some awesome but not clogged full stuff stuff and seems alright.
Have to take this to PMs [emoji1].
Nathan, say I have stock kernel source and I just want to update it to 3.10.74 how to u upstream/Cherry pick just 3.10.74 updates all at once instead of having the source update to 3.10.104. WITHOUT having to download the patch file
Sent from my Nexus 6P using XDA-Developers mobile app

Problem about build lineageOS from source!!!!

I'm so sorry about this thread.
Today, I tried to build this rom from source but I faced with a lot of problem because no dev do this rom so I try to it by myself.
Here is there steps I did:
download source code with repo.
- Prepare kernel: I use some guide in AOSP to build this kernel.
- Repair software binaries: Im just download it from Xperia dev.
the first big thing I got is when I use command breafast to build, I didn't not find anything about my device althought I create some folder and place the material on this as same as the guide in AOSP.
So can someone help me rewrite these code to make it work ?
max26292 said:
I'm so sorry about this thread.
Today, I tried to build this rom from source but I faced with a lot of problem because no dev do this rom so I try to it by myself.
Here is there steps I did:
download source code with repo.
- Prepare kernel: I use some guide in AOSP to build this kernel.
- Repair software binaries: Im just download it from Xperia dev.
the first big thing I got is when I use command breafast to build, I didn't not find anything about my device althought I create some folder and place the material on this as same as the guide in AOSP.
So can someone help me rewrite these code to make it work ?
Click to expand...
Click to collapse
You can use OmniROM as a source. Re-writing the sources to compile should not be a big thing. Can you share your sources?
eagleeyetom said:
You can use OmniROM as a source. Re-writing the sources to compile should not be a big thing. Can you share your sources?
Click to expand...
Click to collapse
first i Follow this guide: https://wiki.lineageos.org/devices/nicki/build
and change these thing on this step with something under this line: Prepare the device-specific code
after that I use this guide to build suzu kernel: https://developer.sonymobile.com/op.../#how-to-automatically-build-the-linux-kernel
And I download binaries from source: https://developer.sonymobile.com/op.../#how-to-automatically-build-the-linux-kernel
and I store these thing on google cloud engine, so how to share it to you?
max26292 said:
first i Follow this guide: https://wiki.lineageos.org/devices/nicki/build
and change these thing on this step with something under this line: Prepare the device-specific code
after that I use this guide to build suzu kernel: https://developer.sonymobile.com/op.../#how-to-automatically-build-the-linux-kernel
And I download binaries from source: https://developer.sonymobile.com/op.../#how-to-automatically-build-the-linux-kernel
and I store these thing on google cloud engine, so how to share it to you?
Click to expand...
Click to collapse
I recommend Github
eagleeyetom said:
I recommend Github
Click to expand...
Click to collapse
I read that limit bandwidth is 1gb per month and storage is 5gb, isn't it?
I didn't rewrite any code, just build everything from the source
https://github.com/max26292/lineageos_suzu
Hold on. I'm planning to start working on a custom ROM after fixing the encryption in TWRP. Github has almost unlimited storage, so you shouldn't be worried. You need to fork the OmniROM tree for suzu and loire-common and adapt it to work with LOS.
eagleeyetom said:
Hold on. I'm planning to start working on a custom ROM after fixing the encryption in TWRP. Github has almost unlimited storage, so you shouldn't be worried. You need to fork the OmniROM tree for suzu and loire-common and adapt it to work with LOS.
Click to expand...
Click to collapse
ok i will try :3 I read some guide but It didn't give me enough knowledge to build
eagleeyetom said:
Hold on. I'm planning to start working on a custom ROM after fixing the encryption in TWRP. Github has almost unlimited storage, so you shouldn't be worried. You need to fork the OmniROM tree for suzu and loire-common and adapt it to work with LOS.
Click to expand...
Click to collapse
I'm waiting for great News about your custom rom Projekt, Are there progresses?
rec0re said:
I'm waiting for great News about your custom rom Projekt, Are there progresses?
Click to expand...
Click to collapse
Not yet. I need to sort out my health issues first.
Have you any news about LineageOS for Xperia X?
At this time, no develop build this rom for our device
Maybe had better to wait Android O with vendor layer and LOS 15, will be much easier to update.
@eagleeyetom
As I wanted to get into android rom development/building, I started today syncing the LOS source an forking the omnirom device tree for suzu and loire-common and adapted already some stuff a little bit.
But you probably know more than me about this, so when forking the device tree, loire-commen, etc... for suzu from omnirom, there are these omni.dependencies files, I somehow don't have a plan what to do with those.
Do they need some adapting too or something else?
I would be very grateful if you could point me into the right direction what do with them.
Greetings.
SahilCrazy said:
@eagleeyetom
As I wanted to get into android rom development/building, I started today syncing the LOS source an forking the omnirom device tree for suzu and loire-common and adapted already some stuff a little bit.
But you probably know more than me about this, so when forking the device tree, loire-commen, etc... for suzu from omnirom, there are these omni.dependencies files, I somehow don't have a plan what to do with those.
Do they need some adapting too or something else?
I would be very grateful if you could point me into the right direction what do with them.
Greetings.
Click to expand...
Click to collapse
You need to clone all the repos mentioned in that file. If you are porting LOS, just leave it blank until it gets official.
eagleeyetom said:
You need to clone all the repos mentioned in that file. If you are porting LOS, just leave it blank until it gets official.
Click to expand...
Click to collapse
Yeah I cloned them all and created a manifest where I included them all to sync them all with "repo sync" and to place them in the correct folders etc.
But it looks like theres something wrong with the sepolicy in loire-common:
Code:
device/sony/loire-common/sepolicy/device.te:4:ERROR 'duplicate declaration of type/attribute' at token ';' on line 39737:
type trim_area_partition_device, dev_type;
type persist_block_device, dev_type;
checkpolicy: error(s) encountered while parsing configuration
/root/android/system/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /root/android/system/out/target/product/suzu/obj/ETC/sepolicy_intermediates/policy.conf
[ 28% 16734/57899] Import includes file: /root/android/system/out/target/product/suzu/obj/EXECUTABLES/init_intermediates/import_includes
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
This happens later also with init.te and tad.te, not only device.te. I tried commenting those lines out but this resulted in an error saying that theres no type declaration.
SahilCrazy said:
Yeah I cloned them all and created a manifest where I included them all to sync them all with "repo sync" and to place them in the correct folders etc.
But it looks like theres something wrong with the sepolicy in loire-common:
Code:
device/sony/loire-common/sepolicy/device.te:4:ERROR 'duplicate declaration of type/attribute' at token ';' on line 39737:
type trim_area_partition_device, dev_type;
type persist_block_device, dev_type;
checkpolicy: error(s) encountered while parsing configuration
/root/android/system/out/host/linux-x86/bin/checkpolicy: loading policy configuration from /root/android/system/out/target/product/suzu/obj/ETC/sepolicy_intermediates/policy.conf
[ 28% 16734/57899] Import includes file: /root/android/system/out/target/product/suzu/obj/EXECUTABLES/init_intermediates/import_includes
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
This happens later also with init.te and tad.te, not only device.te. I tried commenting those lines out but this resulted in an error saying that theres no type declaration.
Click to expand...
Click to collapse
You can try to build permissive first and try to fix sepolicy later.
eagleeyetom said:
Yeah I cloned them all and created a manifest where I included them all to sync them all with "repo sync" and to place them in the correct folders etc.
But it looks like theres something wrong with the sepolicy in loire-common:
You can try to build permissive first and try to fix sepolicy later.
Click to expand...
Click to collapse
Okey, how do you build permissive? There needs to be something done in the kernel/.../security/selinux/makefile or am I wrong?
SahilCrazy said:
Okey, how do you build permissive? There needs to be something done in the kernel/.../security/selinux/makefile or am I wrong?
Click to expand...
Click to collapse
Take this line as a reference: https://github.com/OrdenKrieger/android_device_zuk_ham/blob/cm-14.1/BoardConfig.mk#L51
eagleeyetom said:
Take this line as a reference: https://github.com/OrdenKrieger/android_device_zuk_ham/blob/cm-14.1/BoardConfig.mk#L51
Click to expand...
Click to collapse
So here's the first boot:
{
"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"
}
I switched the sources, I used now the repos from sonyxperiadev instead of omnirom as I kept getting the sepolicy errors even when I tried building permissive.
There are a few things that still need work, like the sim is not recognized etc.
Will release it here on xda when most of stuff is working fine.
Thanks for your great help!:good:
SahilCrazy said:
So here's the first boot:
I switched the sources, I used now the repos from sonyxperiadev instead of omnirom as I kept getting the sepolicy errors even when I tried building permissive.
There are a few things that still need work, like the sim is not recognized etc.
Will release it here on xda when most of stuff is working fine.
Thanks for your great help!:good:
Click to expand...
Click to collapse
Congratulations! I hope that you will make it stable soon

[REFERENCE] ELS - exynos-linux-stable (4.9.193)

{
"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"
}
Project: Exynos-Linux-Stable​- Exynos-Linux-Stable is an organisation on GitLab & GitHub containing upstreamed linux for some of the latest flagship handset from SAMSUNG like the S7, S7E, S8, S8+, Note 8, S9, S9+, Note 9 kernel upstreamed to be inline with respective linux branches.
What does this bring?
- All of the devices mentioned above uses Long Term Support (LTS) releases, they are like old softwares.
- LTS releases are supported through their specified support duration by security updates, bug fixes, backports, and new device drivers, just like a regular release.
So updating or up-streaming your device's kernel brings many improvements talking security, performance wise etc...
How do I use?
If you are a developer, the reference tree is located in the exynos-linux-stable organization: https://github.com/exynos-linux-stable
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, ask your kernel developer KINDLY to use this source for his kernel that has all the changes added in!
Getting notified about updates
There are a few ways to get notified of linux-stable updates:
The exynos-linux-stable Telegram channel: https://t.me/exynos_linux_stable
Subscribe to this thread
XDA:DevDB Information
ELS - exynos-linux-stable, Kernel for the Samsung Galaxy Note 9
Contributors
farovitus
Source Code: https://github.com/exynos-linux-stable/crownlte
Kernel Special Features:
Version Information
Status: Stable
Stable Release Date: 2019-05-18
Created 2018-08-24
Last Updated 2019-09-17
Reserved
Reserved
This source appears to be broken (apparently now differently to when I tried a few days ago):
Code:
~$ mkdir note-9
~$ cd note-9
~/note-9$ git clone https://bitbucket.org/UBERTC/aarch64-linux-android-4.9-kernel
~/note-9$ git clone https://github.com/exynos-linux-stable/crownlte
~/note-9$ cd crownlte
~/note-9/crownlte$ export ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- PATH=$PWD/aarch64-linux-android-4.9-kernel/bin:$PATH
~/note-9/crownlte$ make exynos9810-crownlte_defconfig
~/note-9/crownlte$ make -j1
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC init/version.o
LD init/mounts.o
AS init/_uh.o
init/_uh.S: Assembler messages:
init/_uh.S:40: Error: file not found: init/uh.8g.elf
scripts/Makefile.build:393: recipe for target 'init/_uh.o' failed
make[1]: *** [init/_uh.o] Error 1
Makefile:1036: recipe for target 'init' failed
make: *** [init] Error 2
stock source builds in the same environment.
Phoenix09 said:
This source appears to be broken (apparently now differently to when I tried a few days ago):
stock source builds in the same environment.
Click to expand...
Click to collapse
Well i did compile the source before i pushed it to GitHub and it was totally fine... but i will double check tomorrow.
farovitus said:
Well i did compile the source before i pushed it to GitHub and it was totally fine... but i will double check tomorrow.
Click to expand...
Click to collapse
did you manage to check?
Sent from my SM-N960F using Tapatalk
Phoenix09 said:
did you manage to check?
Click to expand...
Click to collapse
No, i am quiet busy these days. Send me a link of your source so i can check it out from my phone.
Again, i am sure the ELS source will compile just fine.
farovitus said:
No, i am quiet busy these days. Send me a link of your source so i can check it out from my phone.
Again, i am sure the ELS source will compile just fine.
Click to expand...
Click to collapse
https://github.com/exynos-linux-stable/crownlte
I made zero changes, what I posted is exactly what I did, it does not compile.
Edit: what OS are you compiling on?
Sent from my SM-N960F using Tapatalk
Phoenix09 said:
This source appears to be broken (apparently now differently to when I tried a few days ago):
stock source builds in the same environment.
Click to expand...
Click to collapse
Source compile just fine. Please do a proper clone to the source to avoid any issue.
4.9.140 has been merged.
farovitus said:
4.9.140 has been merged.
Click to expand...
Click to collapse
that now builds for me.. in the exact same environment, Ubuntu 14.04 in vagrant with a script:
Code:
#!/bin/sh
set -e
sudo apt-get update
sudo apt-get install -y git build-essential bc
cd $HOME
[ -d aarch64-linux-android-4.9-kernel ] || git clone --depth=1 https://bitbucket.org/UBERTC/aarch64-linux-android-4.9-kernel
[ -d crownlte ] || git clone --depth=1 https://github.com/exynos-linux-stable/crownlte
export ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- PATH=$HOME/aarch64-linux-android-4.9-kernel/bin:$PATH
cd crownlte
make exynos9810-crownlte_defconfig
make -j8
4.9.141 has been released.
hi, i need a stock note 9 pie kernel (CSB3), i flashed another kernel and it wont allow me to go past my login, can you please direct me to a stock pie kernel so i can flassh and get in?
mafioso345 said:
hi, i need a stock note 9 pie kernel (CSB3), i flashed another kernel and it wont allow me to go past my login, can you please direct me to a stock pie kernel so i can flassh and get in?
Click to expand...
Click to collapse
Don't ask here.. Just take a Rom like ketan and flash only kernel via aroma. Done
Ketan p06 has CSB3 base so that kernel will work no problem.
- 4.9.177 merged in.
- Merged CSDE OSRC into crownlte exynos-linux-stable tree.
https://github.com/exynos-linux-stable/crownlte
As always, join https://t.me/exynos_linux_stable to get instantly notified of every ELS update.
I know it's a stupid question but how to pack kernel inside IMG? I want to get image for heimdall.
I've honestly googled but it looks like everybody just knows how to do this. And nobody discuss it
-W_O_L_F- said:
I know it's a stupid question but how to pack kernel inside IMG? I want to get image for heimdall.
I've honestly googled but it looks like everybody just knows how to do this. And nobody discuss it
Click to expand...
Click to collapse
You'll want to use Android Image Kitchen to unpack and repack kernels inside images. You can diff the unpacked boot.img provided in devbase with mine to see the basic ramdisk modifications to prevent forced encryption or various other issues. Or you can just unpack my image, it's relatively basic with it's modifications. Hope this helps.
EDIT: You can also look at my make9810.sh script on GitHub to see the various steps I take for repacking my images.
Can someone explain what this is for? Is this purely for use with linux on DEX or are you guys flashing linux direct to your Note9 somehow? Or updating the kernel that android is running on?
bandario said:
Can someone explain what this is for? Is this purely for use with linux on DEX or are you guys flashing linux direct to your Note9 somehow? Or updating the kernel that android is running on?
Click to expand...
Click to collapse
It's a reference kernel source with all recent patches from vanilla kernel applied to Samsung stock one. Some developers use this source as a base for their custom kernels. This is what it's for.
ELS is for Android. But I'm developing a kernel that can boot Linux (GNU/Linux) on Note9. And yes, it's based on ELS sources.
4.9.193 has been merged into the exynos-linux-stable tree.
https://github.com/exynos-linux-stable/crownlte

Categories

Resources