[Kernel] ElementalX+ (Some Help needed) - Nexus 5 Developer Discussion [Developers Only]

Hey,
first off, I'm not sure if this thread really belongs here, but I also thought its not something General and not a usual Q&A topic.
I see my self as a developer now, one really at the beginning, but I thought I can get the best help here.
So the most important step is already done, I know what I want to make. A better ElementalX (yes, hard do believe I know).
What i want to do? Add CPU OC Support (outside of the installer), GPU OC Support, GPU Voltage Control Support (for the KControl App) and more CPU and I/O Governors.
Also, if it works easy, I would try to add a short Boost of 2.8 GHz (or 2.6/2.7) like in faux123's Kernel, maybe for 2-5 Seconds, as it otherwise crashes (my nexus 5 at least).
So, are you interested? Yes? Cause so am I. I'm reading about how to make my own Kernel since a lot of time, but got back to it yesterday and today i installed Ubuntu 15.04 and updated it with anything needed.
GCC 4.9.2 was installed already, I followed this tutorials:
oh and before, i run Ubuntu 15.04 (Dual Boot) as I feel like in the totally wrong place with Linux and Ubuntu is easier for Windows people like me.
Code:
[URL="http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276"]http://forum.xda-developers.com/android/software/ultimate-guide-compile-android-kernel-t2871276[/URL]
the above link didnt gave me links to Google Devices Source Code so I searched for myself :
[URL="https://source.android.com/source/building-kernels.html"]https://source.android.com/source/building-kernels.html[/URL]
[URL="http://jhshi.me/2014/06/30/build-kernel-in-tree-with-aosp-for-nexus-5-hammerhead/"]http://jhshi.me/2014/06/30/build-kernel-in-tree-with-aosp-for-nexus-5-hammerhead/[/URL]
So, can someone give me a quick guide on how to get the source code of LMY48B Kernel?
I already did this:
Code:
sudo apt-get install openjdk-8-jre
sudo apt-get install openjdk-8-jdk
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
git clone https://android.googlesource.com/kernel/msm.git kernel
but i cant find that "Kernel" folder anywhere on my Ubuntu partition...
So what are my next steps? I could also try asking flar2 directly but I am not sure if he would give his source code to a noob like me
I would keep the Kernel private until I am confident with Updating it.
Is someone interested in working with me? would be more like me telling what I would like and him giving me the code oh well, maybe that's a bad idea :silly:
I am also open for Eclipse, as I already have that installed on Windows, sadly I'm unable to find the "Choose SDK location". Not in settings, not under help, not under any other tab. So I googled that problem and I just found out that other users seem also not able to find it. And I stopped using that thing. Maybe someone here knows how to do that, than I would start learning about how to do it in there again.
Help is very very appreciated.

https://dcrin3.com/unscrambled/?p=756
https://android.googlesource.com/kernel/msm/+/android-5.1.1_r0.6

xXDanielHDXx said:
I could also try asking flar2 directly but I am not sure if he would give his source code to a noob like me
I would keep the Kernel private until I am confident with Updating it.
Click to expand...
Click to collapse
All @flar2 work is already public. His N5 branch has been forked 26 times. Check his Github. As long as you give him credit if you ever release it as your own fork away.

garynych said:
https://dcrin3.com/unscrambled/?p=756
https://android.googlesource.com/kernel/msm/+/android-5.1.1_r0.6
Click to expand...
Click to collapse
thanks for the reply
the first page is really nice. Simple, yet anything I need is shown.
I already know the second one though. I tried to download the url with ubuntu but it said that that url doesnt include any git data.
Is there a correct url for that, or how to download it at all? That Question and maybe 1-2 more and I should have my Kernel ready

Related

Kovsky Kernel Development [2.6.27]

Guys,
Seems like there are lots of threads popping up with new 'packages'. I thought we should create a thread solely for the discussion of kernel hacks/patches so that we can separate the two:
For those of you who dont know, http://gitorious.org/linux-on-qualcomm-s-msm/linux-msm-xdadev is the repo were are working on.
Just to clarify, this topic is ONLY for discussion regarding Kernel patches. Thanks to vdelf's headset patch it seems sensible to focus on:
1. Backlight always on problem FIXED 01/05/10 (vdelf)
2. Battery Issue FIXED 11/05/10 (drlucky)
3. Camera
4. USB
5. GPS
Makes sense. Lets add USB to the list. While charging works, data transfer does not. Also USB might allow us to debug kernel/android on the x1 and that is what dev's always dream of
:suggestion: why not add the latest kernel as download in the 1st post if there is progress. So everyone know where to download the latest updates u ppl do
dexteral said:
:suggestion: why not add the latest kernel as download in the 1st post if there is progress. So everyone know where to download the latest updates u ppl do
Click to expand...
Click to collapse
It will be great to do this, and stick it
@dexteral,
Anyone can checkout the kernel from the above repo I posted. To do what you require we would need to upload the Kernel everytime someone adds a patch...
vdelf said:
Makes sense. Lets add USB to the list. While charging works, data transfer does not. Also USB might allow us to debug kernel/android on the x1 and that is what dev's always dream of
Click to expand...
Click to collapse
Is data transfer even possible in haret? I mean how would system unmount sdcard if it's running from sdcard itself?
not fast data but normal will work
love it
vietdoan20062006
Hi, Lets add fm-radio to the list
Great idea ... otherwise we are creating such a mess with lots of different kernel versions in different threads.
If anyone is interested in compiling the kernel as well as the wifi modules, I have setup a VMWare debian appliance containing all necessary tools and scripts to compile everything. Since this is a few hundes MB, I haven't got a place to upload ... need to check this first. If you are interested, let me know.
@drlucky
Have you had a chance to look at the backlight issue? I am almost out of ideas
Can you post your modifications on the microp-module and what you found out until now?
_Sensible said:
Guys,
Seems like there are lots of threads popping up with new 'packages'. I thought we should create a thread solely for the discussion of kernel hacks/patches so that we can separate the two:
For those of you who dont know, http://gitorious.org/linux-on-qualcomm-s-msm/linux-msm-xdadev is the repo were are working on.
Just to clarify, this topic is ONLY for discussion regarding Kernel patches. Thanks to vdelf's headset patch it seems sensible to focus on:
1. Backlight always on problem
2. Battery Issue
3. Camera
4. USB
5. GPS
Click to expand...
Click to collapse
hey could you post the steps involved for compiling the kernel i am able to comile the kernel but it is not running
Wich toolchain do you use? arm-2008q1 or arm-2009q3?
X1iser said:
Wich toolchain do you use? arm-2008q1 or arm-2009q3?
Click to expand...
Click to collapse
arm-2010q1
could u write all the commands used by you
the way i have written
Personally I'll start to see how to compile the kernel. Can you share the link to download arm-2010q1?
Have you read this post ?
X1iser said:
Personally I'll start to see how to compile the kernel. Can you share the link to download arm-2010q1?
Have you read this post ?
Click to expand...
Click to collapse
http://www.codesourcery.com/downloa...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
but may be it is not the right one it has got 202 in it insted of 67
ya i read that post only
i was able to compile the kernel but it is giving some errors
_Sensible said:
@drlucky
Have you had a chance to look at the backlight issue? I am almost out of ideas
Click to expand...
Click to collapse
Sorry, haven't had the time. Could you push your changes to the git repo, I will try to have a look at it this week ...
okay i tried to make the kernel bt following the guide above by fatsal...
but i got stuck at
make htckovsky_defconfig ARCH=arm
htckovsky_defconfig doesn't exist (in the new repo anyway, i believe)
any help? which defconfig to use? :S
drlucky said:
Sorry, haven't had the time. Could you push your changes to the git repo, I will try to have a look at it this week ...
Click to expand...
Click to collapse
Just played with the klt-driver a bit. I always get version 0x0000, which on a hero means "bootloader mode". I have tried to migrate the hero code, but with no luck. It seems that the microp-klt needs a "reset", which shoudl be done by using a magical GPIO (on hero: 76), but this doesn't currently work at all. Kernel boots up, but still gets no valuable version number.

[development]-kernel 3.4-freexperia

hy all
this is an project starter for android 3.4 kernel development for all msm7x30 mogami devices
sources are hosted on
https://github.com/freexperia/android_kernel_semc_msm7x30
br
J
Project Status
- we got initial branch after diffing lost of branches
M7630AABBQMLZA203029A
https://www.codeaurora.org/gitweb/q...it;h=4b2b84c6a0b6d29864e982a7aecc223acfd2eaa1
forked to our git and with mogami patches aplied
https://github.com/freexperia/android_kernel_semc_msm7x30/tree/M7630AABBQMLZA203029A
latest CAF tag for 7630 not usefull for now
https://www.codeaurora.org/xwiki/bin/QAEP/release
"November 16, 2012 M7630AABBQMLZA40701070 - msm7630 - M7630AABBQMLZA40701070.xml - 04.01.02" android 4.1
ETA
depending on problems and developers that will join
from 6 months to NEVER
This is a bold task. Perhaps you could look at the developments of irii-soft (and some others), they have replaced some crap Sony-specific code with generic wrappers. Main obstacle if I remember is memory maps now, there was an issue with partition maps but ATAG can be easily over-ridden via kernel command-line.
Getting it to boot should be trivial, sound and video will be difficult, and RIL may be never working due to lack of sources. Regardless, all the best. When I have more time I plan to help irii with his work on a "generic" 2.x kernel newer than what we have (because 3.x seems outrageous at this point).
Is there a wiki, a forum or something like that lists all the non-standard things that have already been found ? (some base of work to do)
Boudin said:
Is there a wiki, a forum or something like that lists all the non-standard things that have already been found ? (some base of work to do)
Click to expand...
Click to collapse
Easy to do yourself - download official SEMC kernel source and diff it with the same version of the linux baseline kernel. So to port to newer kernel you can isolate or "extract" the specific code that has been added and changed, and merge or "inject" that into a newer kernel. Easier said than done though, there are massive changes even in linux kernel revisions (0.0.x.0) - let alone alone new majors and minors (x.x.0.0).
There wouldn't be a wiki or anything of this research, because documenting it all would take an unrealistic amount of labor. Considering there are only a small handful of developers capable of it, there's no point. Besides, that's what GitHub and commit logs are for.
To FXP team,
I don't know if you know or not or even got this far in the development stage but I just wanted to point out a couple of things which may or may not help you...
So with the 3.4 kernel brings newer WiFi drivers which will give a better connection signal on wpa2 security but you might find that devices won't be able to connect to open security networks and WiFi hotspot will probably be broken. I'm posting this as on my gnex using custom kernel (FrancoFransico) he incorporated the 3.4 WiFi drivers a few times and broken hotspot and not being able to use open security WiFi networks were repeatedly reported problems.
I think it may be something hardware specific which allows these features to work on the 3.4 WiFi drivers specific to the nexus 4? You may have more luck trying the 3.0.xx WiFi drivers and getting those to work fully.
Best of luck to you guys!
Sent from my Galaxy Nexus
I'm pretty sure wifi is way down on the priority list, not to be rude but really - who cares about that now. Priority list would be like this:
(1) Get it to boot
(2) Fix primary/critical hardware-specific code for msm7k and qcom platform (display, audio)
(3) Fix RIL
(4) Fix secondary hardware (sensors, bluetooth, wifi)
One step at a time. Getting wifi will probably be trivial because bcm sources are part of the mainline kernel.
With that said, I'm unsubscribing from this thread now. There is massive work to be done and I can see this thread is just going to be filled with posts that have nothing to do with actual development.
All non-dev related posts, and especially "Thank You" posts, will be deleted without further notice. If I have to delete 5 pages of useless posts again, this thread will be locked.
Thank you!​
We have tried for a long time already (as you may already know).
https://github.com/adridu59/semc-msm-3.4/commits/master
https://github.com/adridu59/semc-msm-2.6.35
https://github.com/adridu59/android-msm-2.6.35
https://github.com/ExPeacer/CAF_android-msm-3.0/commits/master
https://github.com/ExPeacer/CAF_android-msm-2.6.32
Have fun with it anyways.
adridu59 said:
We have tried for a long time already (as you may already know).
https://github.com/adridu59/semc-msm-3.4/commits/master
https://github.com/adridu59/semc-msm-2.6.35
https://github.com/adridu59/android-msm-2.6.35
https://github.com/ExPeacer/CAF_android-msm-3.0/commits/master
https://github.com/ExPeacer/CAF_android-msm-2.6.32
Have fun with it anyways.
Click to expand...
Click to collapse
Whats the progress so far on this? Bootable already?
CosmicDan said:
Easy to do yourself - download official SEMC kernel source and diff it with the same version of the linux baseline kernel. So to port to newer kernel you can isolate or "extract" the specific code that has been added and changed, and merge or "inject" that into a newer kernel. Easier said than done though, there are massive changes even in linux kernel revisions (0.0.x.0) - let alone alone new majors and minors (x.x.0.0).
There wouldn't be a wiki or anything of this research, because documenting it all would take an unrealistic amount of labor. Considering there are only a small handful of developers capable of it, there's no point. Besides, that's what GitHub and commit logs are for.
Click to expand...
Click to collapse
I was asked by some user of this forum to give some kernel porting guidelines in this thread, so let me introduce myself first. I'm the developer of 3.0.x kernel for Samsung Galaxy Spica (also several other projects for Spica and Galaxy Apollo/Galaxy 3) and currently also Linux kernel developer at Samsung Poland R&D Center. Porting the kernel for Spica was a difficult task, because of poor quality of original kernel code, which required rewriting from scratch most of it, but it was very educational.
It's not easy to give advice, but I'd say that taking all the differences from clean kernel and applying all of that on top of newer version is what should be avoided. Of course those differences should be collected to see what was changed by the manufacturer, but this should be only used for further analysis, not as a ready code.
Another thing, rather than using the mainline Linux kernel to compare your phone sources with, it should be better to use Android kernel from Google's kernel/common tree (see https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary for older version archive) bumped to the same minor version using minor patches (found on kernel.org) or, possibly even better way, by pulling appropriate version tag from kernel.org git on top of proper branch of Android kernel tree. This will elminate Google's changes (that would be already available in your new base - android-3.4 branch of kernel/common) from the diff.
For getting the diff, I would personally also use Git. If you create a branch in your working tree which contains Android kernel in the version corresponding to your device kernel (using the way I described in previous paragraph), then copying your device kernel sources onto your working tree (remember to make distclean both trees to remove any compiled/generated files) will allow you to see the differences using git status and git diff. (See http://gitimmersion.com/ if you want to learn more about Git.)
Now it's important to split the changes into logically separate parts, for example core changes in arch/arm/mach-whatever_suitable_for_your_device, adding of particular drivers in drivers/, sound/ and include/, modifications to core kernel code in any other directories. It's essential to check whether all the changes are really required or not and why, because minimalizing the set of changes required to be replayed on top of your new base kernel sources will simplify your work.
After collecting all the changes, it's the time to apply them on top of your new kernel sources. All the changes should be applied one by one, checking how much the component that is being touched has changed since your old kernel and adjusting the changes properly. After applying each change, it should be verified that the kernel at least compiles, although it would be even better if you could get the kernel without any (or almost any) modification to boot to some state, e.g. showing something on the console (any chance to get access to serial console on your device?), and then check if it still boots after applying each next change.
Some links that might be useful:
- Linux cross reference, for comfortable reading of kernel code - http://lxr.linux.no/+trees
- Linux Device Drivers, a book about kernel programming - http://lwn.net/Kernel/LDD3/
- Git Immersion, a great Git tutorial - http://gitimmersion.com/
- Android kernel/common repository with full archive - https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary
- Linux stable repository, with all version tags - http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
Hopefully what I wrote will be helpful in your project. Good luck and best regards.
Hey tom3q,
thanks a lot for leaving some useful statements here!
tom3q said:
Another thing, rather than using the mainline Linux kernel to compare your phone sources with, it should be better to use Android kernel from Google's kernel/common tree (see https://www.codeaurora.org/gitweb/quic/la/?p=kernel/common.git;a=summary for older version archive) bumped to the same minor version using minor patches (found on kernel.org) or, possibly even better way, by pulling appropriate version tag from kernel.org git on top of proper branch of Android kernel tree.
Click to expand...
Click to collapse
I digged for some base kernel for a while.
Found a chromium msm kernel 2.6.32.9 at codeaurora (i know this is not Android).
Anyway, the diff against stock was ~30MB... quite too much.
Like i assumed many basic things are missing as well, so too much to start from.
I guess, i'll step through the other projects... might try 2.6.32-rc8 from the msm tree... just for fun of course :angel:
tom3q said:
After applying each change, it should be verified that the kernel at least compiles, although it would be even better if you could get the kernel without any (or almost any) modification to boot to some state, e.g. showing something on the console (any chance to get access to serial console on your device?), and then check if it still boots after applying each next change.
Click to expand...
Click to collapse
Nice point... i like these hardware hacks and asked about testpoints for UART3 on the Pro mainboard a few days ago.
It's mentioned and so far i got it, initialized in stock kernel as well. Unfortunately no-one seems to know anything about these testpoints.
Anyway i don't want to spam this thread, so thanks for your attention
Regards,
scholbert
hy
scuse my ignorance
but
HOW do you compile an kernel ?
and maybe someone can explain what is the difference between bring-up and port
scholbert said:
Hey tom3q,
thanks a lot for leaving some useful statements here!
I digged for some base kernel for a while.
Found a chromium msm kernel 2.6.32.9 at codeaurora (i know this is not Android).
Anyway, the diff against stock was ~30MB... quite too much.
Like i assumed many basic things are missing as well, so too much to start from.
I guess, i'll step through the other projects... might try 2.6.32-rc8 from the msm tree... just for fun of course :angel:
Nice point... i like these hardware hacks and asked about testpoints for UART3 on the Pro mainboard a few days ago.
It's mentioned and so far i got it, initialized in stock kernel as well. Unfortunately no-one seems to know anything about these testpoints.
Anyway i don't want to spam this thread, so thanks for your attention
Regards,
scholbert
Click to expand...
Click to collapse
FXP said:
hy
scuse my ignorance
but
HOW do you compile an kernel ?
and maybe someone can explain what is the difference between bring-up and port
Click to expand...
Click to collapse
I would say that porting is moving and correcting sources from 2.6.32 kernel in our case into 3.x. And bring up is writing particular drivers from scratch?
Sent from my Nexus 7
voyteckst said:
I would say that porting is moving and correcting sources from 2.6.32 kernel in our case into 3.x. And bring up is writing particular drivers from scratch?
Sent from my Nexus 7
Click to expand...
Click to collapse
ok
nice explanation
look on first page
diff is 5mb on proper tag
pushed on github
nice to see so many developers trying to help
FXP said:
diff is 5mb on proper tag
pushed on github
Click to expand...
Click to collapse
Sorry to throw my 3 cents again, but seeing the repository on github, I'd recommend you to use some time to go through Git Immersion. Even if it takes some time, it will simplify your further work, as Git used properly can really make many things easier.
Otherwise, the diff itself looks mostly fine as a starting point, although some of the differences can be probably eliminated.
tom3q said:
Sorry to throw my 3 cents again, but seeing the repository on github, I'd recommend you to use some time to go through Git Immersion. Even if it takes some time, it will simplify your further work, as Git used properly can really make many things easier.
Otherwise, the diff itself looks mostly fine as a starting point, although some of the differences can be probably eliminated.
Click to expand...
Click to collapse
sony added too many changes to be usefull
since there are several api changes on 32->3.x diff is no good
we have to start from clean board-7x30 and populate devices porting drivers 1 by 1
we have to try an device bringup based on sony changes

[ DIY ] How To Compile Your Own Nightlies (and Learn Something in the Process)

--- copied with permission from nathanpfry.com ---​
Hi everyone! Have you ever wanted to compile your own nightlies, but are too intimidated or "not a dev"?
For various reasons, I've decided to write a guide about how you too can enter the wonderful world of development.
Before we begin, I'm going to say one thing. I'll probably repeat it a bunch of times too, to be sure everyone reads it at least once while skimming through this. PLEASE GOOGLE YOUR QUESTION FOR AT LEAST 5 MINUTES BEFORE ASKING IT HERE. The main reason I wrote this guide is to try to refocus the point of the "Development" forums on XDA. There are many users out there that seem to think this is a place to make demands for answers without trying to contribute or learn anything themselves. Developing isn't an easy thing. You should know a little bit of Linux going into this, if not, prepare yourself for some reading. This isn't the place for you to ask how to install Ubuntu, or why you need 64 bit. Just have a little faith and trust me.
Major thanks goes out to Hashcode.. Seriously, you have no idea what an inspiration he's been. For all intents and purposes, this guide will show you how to set up your system and compile ROMs based on his work, perhaps even help work on fixes. I suppose I should thank google, cyanogenmod, team aokp, thingonaspring (minimoto rocks!) a few others. You know who you are.
On with the show.
Here's a list of things you will need:
1) A decent computer (at least dual core, 2+ gig of RAM, 50 gig free HD space) capable of running Linux
2) A copy of Builduntu
3) Spare time and the desire to learn.
Double check that your main system is 64 bit. 32 bit OS will not work!
Once you get Builduntu up and running (there are instructions @ the above link), read on.
You need to make a decision. What flavor of Android do you want to compile? In other words, AOKP, Cyanogenmod, AOSP, LiquidSmooth, SimpleAOSP etc etc etc.
For the purposes of teaching everyone, I'm going to base this guide on AOKP.
You've made it this far, you're basically almost there. *cue motivational montage music*
When Builduntu says, "initialize the build repo", that means to sync your source code with a git repository. Run these commands in a terminal:
Code:
mkdir ~/android
Code:
cd ~/android
The following command will do the actual initialization:
Code:
repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
Ok, after this next part you're going to want to take a break. It's time to actually download to your computer (sync) the source code. As of writing this guide, it is over 10 gigabytes of information, depending on which "flavor" of Android. In the terminal:
Code:
repo sync
Don't worry, just execute and walk away. Depending on the speed of your internet connection, this could take a long time. Anywhere from one hour to "maybe-you-should-do-this-before-you-go-to-sleep". Up next is actually doing the compiling.
When that finishes, you have the source code. Let's get to business. This next bit will probably take a while also, but again, it's a set-it-and-forget-it situation.
Code:
cd ~/android
source build/envsetup.sh
lunch yourdevicenamehere
make otapackage
That should do it! Watch for errors, but everything should work at this point. Again, how long this takes is completely dependent on how fast your computer is. If it completes without a hitch, you'll have a flashable zip file located in ~/android/out/target/product/yourdevicename/
Congrats, you just compiled from source! Now, if you really want to get adventurous, you can start delving into the code itself and make some changes. But this post isn't the place to get into all that. Good luck, and please say thanks if this guide was helpful!
PLEASE PLEASE PLEASE If you happen to find an error in my guide (not just a question about it!) PLEASE PM ME. I will give you credit in the post. A potentially useful fix could be buried pages deep in the thread and unfortunately get lost if it's only a reply. Thanks!
Many thanks!
Although I didn't tried this howto yet, I feel obligated to thank you for this. In the past I though about trying to do something directly tweaking the code and, who knows, contribute with something nice to our "D3 society". But could never figure how to start it. I will spend some time trying to make it work using this "manual" and give some feedback about it.
Again, thanks.
Re: [DIY] How To Compile Your Own Nightlies (and Learn Something in the Process)
Great post.
Sent from my XT926 using Tapatalk 2
Thank you for taking the time to show the community how to contribute and give back what has been given.
Thanks for this awesome guide! I followed your directions and did produce a zip that I can flash with safestrap. Unfortunately it will not boot though:crying: Is there anything else to do with the kexec zip to make it safestrap compatible? Or did I just screw something up
Either way I am glad I did this and without your 2 great guides I never would have. So thank you again sylentprofet! :highfive:
Caldair said:
Thanks for this awesome guide! I followed your directions and did produce a zip that I can flash with safestrap. Unfortunately it will not boot though:crying: Is there anything else to do with the kexec zip to make it safestrap compatible? Or did I just screw something up
Either way I am glad I did this and without your 2 great guides I never would have. So thank you again sylentprofet! :highfive:
Click to expand...
Click to collapse
Hmmmmmm. That is a frustrating problem. I've had it happen before..
Just tried a compile myself, and CM10 doesn't work. Silly me for thinking that everything would go smoothly. It could be some changes reflected recently on CM's end. The joys of development!
However, I just tried an AOKP 4.2 build, and it does boot. So I'm going to make some quick changes to the guide to reflect building for AOKP while I examine the code and see what's up.
There's nothing more frustrating when a build completes successfully and then won't flash. I'll keep everyone posted.
this looks amazing
thank you for spending the time to write this up!
May be up for a reinstallation of my Ubuntu (currently 12.04 x86 :/).
Wonderful, might try to adapt for the galaxy note 3.
Lillie via LG Spectrum (waiting for N3 DE) & tapatalk

Compiling cm11

Hello,
I don't want to ask how to build ROM.
I am new to building and compiling. I followed tutorial here on xda.
I installed everything crucial, then I do "repo init" ( repo init -u https://github.com/P880-dev/android.git -b cm-11.0) and then "repo sync". Source has downloaded. Then I do "source \envsetup.sh", "lunch", chose 11 as cm_p880-userdebug and at last "make -j6 otapackage". Now I have a question: I am compiling it for like 6 hours and in "home\username\android\out\project\p880" is around 12 GB of data, is that good?
Sent from my LG-P880 using Tapatalk
yep that is good.. every next time would be faster..
how long ? depends on processor and ram
@gerciolisz
Oh, forgot my specs:
Asus laptop
Core i5 3120m
6 GB ram
in virtualbox:
3 cores
2,5 gb
60 gb disk
And run make -j6
whoah it can be a long day to you i have ubuntu in dualboot with windows i5 and 12gb ram and it took about 4 hours
I am more concerned about that I have only 6 gb of disk available. But I think it is on the end of process. It is worth if waiting
Compiling done First compiling successed Tomorrow time for testing.
Just 2.3 GB of storage left
Do I need to manually now run ccache=1 (or sth like that - to not compile everytime everything) or is good if it is already in file somewhere in repos configuration?
You have to initialize ccache before compilation, that way it can cache the code when you first compile it. Check here.
LGaljo said:
Compiling done First compiling successed Tomorrow time for testing.
Just 2.3 GB of storage left
Do I need to manually now run ccache=1 (or sth like that - to not compile everytime everything) or is good if it is already in file somewhere in repos configuration?
Click to expand...
Click to collapse
Just like Adam said.. But anyway it needs more space to cache..
Sent from my LG-P880 using xda app-developers app
I will expand disk. I added first two lines in bashrc. But I didn't run prebuilts/misc/linux-x86/ccache/ccache -M 50G. It is good if I do it now?
Sent from my LG-P880 using Tapatalk
LGaljo said:
I will expand disk. I added first two lines in bashrc. But I didn't run prebuilts/misc/linux-x86/ccache/ccache -M 50G. It is good if I do it now?
Sent from my LG-P880 using Tapatalk
Click to expand...
Click to collapse
You can, but won't have effect now as you already compiled.
gerciolisz said:
whoah it can be a long day to you i have ubuntu in dualboot with windows i5 and 12gb ram and it took about 4 hours
Click to expand...
Click to collapse
Today I built my new build from scratch in 2 hours and half. I made dualboot and run make -j12 otapackage. Mean while I was able to surf the web :laugh:.
Hi!
Perhaps this thread actually can be some kind of a tutorial on how to build CM11 for P880, if you succeded?
I have followed this thread:
http://forum.xda-developers.com/showthread.php?t=2515305
Except i did some mistakes, so i simply did a fresh Ubuntu reinstall on a SSD-disk so it hopefully also will build faster..
I have some questions though:
- Don't we need to insert the code into the local_manifest.xml?
- Also, i see you don't compile it using "brunch p880" command.. Is there a reason for this?
LGaljo said:
Today I built my new build from scratch in 2 hours and half. I made dualboot and run make -j12 otapackage. Mean while I was able to surf the web :laugh:.
Click to expand...
Click to collapse
make -j12 with 3 core inside virtualbox? seems pointless 3-4 would be sufficient. also try schedtool and see if it's faster. (install schedtool, then use schedtool -B -e make -j4 otaimage)
gingerboy92 said:
make -j12 with 3 core inside virtualbox? seems pointless 3-4 would be sufficient. also try schedtool and see if it's faster. (install schedtool, then use schedtool -B -e make -j4 otaimage)
Click to expand...
Click to collapse
You didn't read well, I made dualboot with windows. I don't know how is it possible to run -j12 and no lag. (I was also able to surf the web). can be installed with apt-get? does otaimage produce .img file?
faabak said:
Hi!
Perhaps this thread actually can be some kind of a tutorial on how to build CM11 for P880, if you succeded?
I have followed this thread:
http://forum.xda-developers.com/showthread.php?t=2515305
Except i did some mistakes, so i simply did a fresh Ubuntu reinstall on a SSD-disk so it hopefully also will build faster..
I have some questions though:
- Don't we need to insert the code into the local_manifest.xml?
- Also, i see you don't compile it using "brunch p880" command.. Is there a reason for this?
Click to expand...
Click to collapse
just follow the instructions from the thread until creating the working directory, for initializing repo, use the one from laufersteppenwolf's thread (http://forum.xda-developers.com/showthread.php?t=2551006).
repo init -u https://github.com/P880-dev/android.git -b cm-11.0the next steps are the same.
repo sync
cd vendor/cm/
. get-prebuilts
and other steps. i'm lazy to retype everything if you are really willing to build android from source, you should be able to figure out what i'm saying
---------- Post added at 11:33 PM ---------- Previous post was at 11:23 PM ----------
LGaljo said:
You didn't read well, I made dualboot with windows. I don't know how is it possible to run -j12 and no lag. (I was also able to surf the web). can be installed with apt-get? does otaimage produce .img file?
Click to expand...
Click to collapse
there's no point of using numbers higher than the amount your cpu cores. -j5 or -j6 is fine for quad core cpu, any higher, it doesn't effect anything, just pointless. sudo apt-get install schedtool should work, but again, i have no idea how much difference it will make. otaimage will produce a zip file. you can also use make bacon. make bacon will produce a zip with the proper naming, and more, i guess, idk.
gingerboy92 said:
just follow the instructions from the thread until creating the working directory, for initializing repo, use the one from laufersteppenwolf's thread (http://forum.xda-developers.com/showthread.php?t=2551006).
repo init -u https://github.com/P880-dev/android.git -b cm-11.0the next steps are the same.
repo sync
cd vendor/cm/
. get-prebuilts
and other steps. i'm lazy to retype everything if you are really willing to build android from source, you should be able to figure out what i'm saying
---------- Post added at 11:33 PM ---------- Previous post was at 11:23 PM ----------
there's no point of using numbers higher than the amount your cpu cores. -j5 or -j6 is fine for quad core cpu, any higher, it doesn't effect anything, just pointless. sudo apt-get install schedtool should work, but again, i have no idea how much difference it will make. otaimage will produce a zip file. you can also use make bacon. make bacon will produce a zip with the proper naming, and more, i guess, idk.
Click to expand...
Click to collapse
I'm actually doing the sync now, with the https://github.com/P880-dev/android.git so i'm guessing i'm onto the right path!
Thanks!!
faabak said:
I'm actually doing the sync now, with the https://github.com/P880-dev/android.git so i'm guessing i'm onto the right path!
Thanks!!
Click to expand...
Click to collapse
you are welcome.
hope it will compile.
and boots
don't worry if it bootloops, we all had it at least once.
gingerboy92 said:
you are welcome.
hope it will compile.
and boots
don't worry if it bootloops, we all had it at least once.
Click to expand...
Click to collapse
It compiled!
But.. Of course it bootloops, as i expected! Maybe i should just try to compile it again? What did you do?
faabak said:
It compiled!
But.. Of course it bootloops, as i expected! Maybe i should just try to compile it again? What did you do?
Click to expand...
Click to collapse
it have been a while since i compiled from 4.4 source. i think i read from cm11 development thread someone mentioned that the some patches causes bootloop. perhaps your problem is the same as his. take a look at the thread
gingerboy92 said:
it have been a while since i compiled from 4.4 source. i think i read from cm11 development thread someone mentioned that the some patches causes bootloop. perhaps your problem is the same as his. take a look at the thread
Click to expand...
Click to collapse
Yeah, i also noticed! But it does'nt seems like everyone has that problem.. I run "brunch" again now, it only used like 15 minutes or so.. Will try to install it!

[Q] Strange Error Compiling Note 5 Kernel - PLEASE HELP!

Hi All,
I have been building permissive kernels for my own use for a while now, but the Note 5 kernel (both the "C" and "I" versions from Samsung open Source) is giving me fits. As you can see from my terminal output, I get through the creation of the image, the modules build fine, but when the firmware install makefile starts, I get an error I've never seen before, even if I have made no changes at all to the source code:
Code:
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
Building modules, stage 2.
MODPOST 2 modules
CC net/ipv4/tcp_htcp.mod.o
LD [M] net/ipv4/tcp_htcp.ko
CC net/ipv4/tcp_westwood.mod.o
LD [M] net/ipv4/tcp_westwood.ko
[B]/home/parallels/ANDROID/KERNEL/920c_kernel/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule[/B].
I have looked at the cited section code, but don't see anything obvious. I have also google searched for this error way too thoroughly and PM'd some who have successfully compiled this kernel, but alas...
I am running Ubuntu 14.04 via Parallels on a Macbook Pro running Yosemite. As noted above, I am compiling from the Samsung OpenvSource files for The 920I and have also tried the 920C version, as well. As for toolchains, I have tried the Android NDK aarch64 4.9 toolchain, linaro aarch64 4.9 and linaro aarch64 5.2, all to no avail. I have tried make clean, make mrproper, deleted .ccache, etc., as well as using/not using -jX.
Here is a link to a repo with the untouched source code: https://github.com/sk806/N5_Kernel.git
ANY HELP IS GREATLY APPRECIATED!!!
Thanks!
Steve
sk806 said:
Hi All,
I have been building permissive kernels for my own use for a while now, but the Note 5 kernel (both the "C" and "I" versions from Samsung open Source) is giving me fits. As you can see from my terminal output, I get through the creation of the image, the modules build fine, but when the firmware install makefile starts, I get an error I've never seen before, even if I have made no changes at all to the source code:
Code:
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
Building modules, stage 2.
MODPOST 2 modules
CC net/ipv4/tcp_htcp.mod.o
LD [M] net/ipv4/tcp_htcp.ko
CC net/ipv4/tcp_westwood.mod.o
LD [M] net/ipv4/tcp_westwood.ko
[B]/home/parallels/ANDROID/KERNEL/920c_kernel/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule[/B].
I have looked at the cited section code, but don't see anything obvious. I have also google searched for this error way too thoroughly and PM'd some who have successfully compiled this kernel, but alas...
I am running Ubuntu 14.04 via Parallels on a Macbook Pro running Yosemite. As noted above, I am compiling from the Samsung OpenvSource files for The 920I and have also tried the 920C version, as well. As for toolchains, I have tried the Android NDK aarch64 4.9 toolchain, linaro aarch64 4.9 and linaro aarch64 5.2, all to no avail. I have tried make clean, make mrproper, deleted .ccache, etc., as well as using/not using -jX.
Here is a link to a repo with the untouched source code: https://github.com/sk806/N5_Kernel.git
ANY HELP IS GREATLY APPRECIATED!!!
Thanks!
Steve
Click to expand...
Click to collapse
That is Samsung for ya. Maybe @g.lewarne could provide some insight
mikeyinid said:
That is Samsung for ya. Maybe @g.lewarne could provide some insight
Click to expand...
Click to collapse
I hope so! Thanks.
It's weird, as i've gotten the same error on both a virtual box and parallels setup. I am going to try boot camping it and then I'm done, unless someone knows what is going on.
sk806 said:
I hope so! Thanks.
It's weird, as i've gotten the same error on both a virtual box and parallels setup. I am going to try boot camping it and then I'm done, unless someone knows what is going on.
Click to expand...
Click to collapse
Have you resolved this issue? I am running into it too trying to compile S6 Kernel for 5.1.1
elesbb said:
Have you resolved this issue? I am running into it too trying to compile S6 Kernel for 5.1.1
Click to expand...
Click to collapse
I haven't. I can get every kernel to compile for my current devices, except this one. Strange.
sk806 said:
I haven't. I can get every kernel to compile for my current devices, except this one. Strange.
Click to expand...
Click to collapse
It is related to modules compiling from what I can gather. If I use Ktoonsez source, I don't get that error. However, I notice it doesn't compile any modules. I still get an Image in my boot directory. Do you? I think the kernel itself is safe to use. You could probably ignore this error.
You guys just need to read what the error exactly refers to and then search for it in your source.
Would have brought you to. ....
https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235
Easy
UpInTheAir said:
You guys just need to read what the error exactly refers to and then search for it in your source.
Would have brought you to. ....
https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235
Easy
Click to expand...
Click to collapse
I don't have anything like that in my makefile.fwinst file. Here is what is at line 45, which is where terminal is telling me the error is at:
$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
$(call cmd,install)
Here is the actual terminal error message:
/home/seth/S6-Kernel_Parent/Extracted_S6_Source/Kernel.tar/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule.
So I'm confused.
EDIT: Nevermind I'm an idiot. I found it. Thank you so much!! Finally solved
UpInTheAir said:
You guys just need to read what the error exactly refers to and then search for it in your source.
Would have brought you to. ....
https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235
Easy
Click to expand...
Click to collapse
HA! I googled the error a million times and never saw your repo! I wasn't sure if removing "stm_z1.fw tsp_stm" from the makefile would screw anything up, but apparently it doesn't. Many thanks, sir!
It's odd that others have built with the same sources (920C, mainly, from what I have seen), and have not changed that section of the makefile, but still succeeded in their build. I wonder what it is about my setup that caused this error. Anyway, not an issue now. Thanks again.
Steve
sk806 said:
HA! I googled the error a million times and never saw your repo! I wasn't sure if removing "stm_z1.fw tsp_stm" from the makefile would screw anything up, but apparently it doesn't. Many thanks, sir!
It's odd that others have built with the same sources (920C, mainly, from what I have seen), and have not changed that section of the makefile, but still succeeded in their build. I wonder what it is about my setup that caused this error. Anyway, not an issue now. Thanks again.
Steve
Click to expand...
Click to collapse
There are others I've seen using my commit (no credit) and didn't cherry-pick keeping the history. I believe the Image still flashes with or without though
I am having the same issue can you explain what was the issue ?
UpInTheAir said:
You guys just need to read what the error exactly refers to and then search for it in your source.
Would have brought you to. ....
https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235
Easy
Click to expand...
Click to collapse
I have the same problem as OP with my S6. This link would help me but it is broken. Can you please provide some info about the commit or another link or whatever?
elesbb said:
I don't have anything like that in my makefile.fwinst file. Here is what is at line 45, which is where terminal is telling me the error is at:
$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
$(call cmd,install)
Here is the actual terminal error message:
/home/seth/S6-Kernel_Parent/Extracted_S6_Source/Kernel.tar/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule.
So I'm confused.
EDIT: Nevermind I'm an idiot. I found it. Thank you so much!! Finally solved
Click to expand...
Click to collapse
Can you tell me what you did? I have the same error and i cant fix it ????
minealex2244 said:
I have the same problem as OP with my S6. This link would help me but it is broken. Can you please provide some info about the commit or another link or whatever?
Click to expand...
Click to collapse
Did you figure it out?
EncryptedCurse said:
Did you figure it out?
Click to expand...
Click to collapse
Uhm somehow. I used a script which ignored that error as your kernel image is already built and you shouldn't care about modules. But if you still want a fix then see my commit: https://github.com/minealex2244/AldeXus/commit/e89301766b3d251b285649a38ee4dea4f2871b99
This commit shows you what to remove (it may be the perfect fix or just an example of what you should do in your code).
Tell me if it helped.
Broken link
Hey, I'm having the same issue but I can't find your commit, could you please fix the link?. Thanks in advance.

Categories

Resources