[DEV][INFO] Optimized Toolchain & Kernel Build ! - Gen9 Android Development

Hi !
For all who want to make your own kernel :
- Optimized Toolchain - include all patch of archos & update GCC to Version 4.4.7 - 13 March 2012 => http://gcc.gnu.org/gcc-4.4/ !
Download archos_toolchain.tar.bz2 , extract where you want ( or follow this tut !).
Update your environment ( ex. for Ubuntu x86 11.10 )
Code:
sudo apt-get install grep sed bzip2 gunzip git original-awk gnupg flex bison gperf zip build-essential curl zlib1g-dev libc6-dev libncurses5-dev x11proto-dev libx11-dev libreadline6-dev libgl1-messa-dev xsltproc gettext make info automake libsdl-dev xsltproc
Download kernel source code
For build Kernel we need to download source code kernel/ics => http://gitorious.org/archos/archos-gpl-gen9-kernel-ics
Code:
git clone git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git archos_ics
Now copy & extract toolchain in to Desktop directory :
Code:
/home/name$ cp Downloads/archos_toolchain.tar.bz2 Desktop
/home/name$ cd Desktop
/home/name/Desktop$ tar -xjf archos_toolchain.tar.bz2
Build Kernel
- we need to go in directory archos_ics ( this directory contains kernel source code !)
Code:
/home/name$ cd archos_ics
/home/name/archos_ics$ sudo su
/home/name/archos_ics# cp linux.config arch/arm/configs/archos_defconfig
/home/name/archos_ics# export ARCH=arm
/home/name/archos_ics# export CROSS_COMPILE=/home/name/Desktop/archos_arm_toolchain/usr/bin/arm-linux-uclibcgnueabi-
/home/name/archos_ics# make ARCH=arm archos_defconfig
/home/name/archos_ics# make -j2
Your kernel - zImage ( cd to ..)
Code:
/home/name/archos_ics/arch/arm/boot/zImage
This tools was tested on machine x86, Ubuntu 11.10 ! I chose the easy way to configure this stuff ( without "make path" - of course you can do ) to be understood by all !!!
Without "make path" - you need always to follow all the steps in Build Kernel after restart your linux machine !
Solved Error libmpfr.so.1 !!!
Download libmpfr1ldbl_2.4.2-3ubuntu1_i386.deb , double click on it and into Ubuntu Software Center -> choose Install !!!
name = your directory name !!!
Click to expand...
Click to collapse
regards,
Surdu Petru

surdu_petru said:
Hi !
For all who want to make your own kernel :
- Optimized Toolchain - include all patch of archos & update GCC to Version 4.4.7 - 13 March 2012 => http://gcc.gnu.org/gcc-4.4/ !
Download archos_toolchain.tar.bz2 , extract where you want .
Build kernel
For build Kernel we need to download source code kernel/ics => http://gitorious.org/archos/archos-gpl-gen9-kernel-ics
Code:
git clone git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git archos_ics
Click to expand...
Click to collapse
great job, so these optimization are the things archos has in its other repo, right ?
from here http://gitorious.org/archos/archos-gpl-gen9 ???

djnilse said:
great job, so these optimization are the things archos has in its other repo, right ?
from here http://gitorious.org/archos/archos-gpl-gen9 ???
Click to expand...
Click to collapse
Hi!
Yes , the source code is right , but also I updated GCC 4.4.1 to 4.4.7 !

surdu_petru said:
Hi!
Yes , the source code is right , but also I updated GCC 4.4.1 to 4.4.7 !
Click to expand...
Click to collapse
cool
just downloaded what you uploaded, but it doesnt contain the whole toolchain
just a few binaries, do i have to merge it with the orginal toolchain ?

djnilse said:
cool
just downloaded what you uploaded, but it doesnt contain the whole toolchain
just a few binaries, do i have to merge it with the orginal toolchain ?
Click to expand...
Click to collapse
Hi!
You do not need to install my toolchain !!! just extract it and use it as described above ! Good luck !
This toolchain is extracted of buildroot directory ( after all was compiled ) - so it's work 100% and is tested by me ! - take a look in image -GCC 4.4.7 !!!

surdu_petru said:
Hi!
You do not need to install my toolchain !!! just extract it and use it as described above ! Good luck !
Click to expand...
Click to collapse
with installing i mean extraced (i have a brain)
ahhh, i looked in the wrong dir
thoug it was directly in bin not in usr/bin
sorry

gcc-4.4 is past... 4.6/4.7 can be named 'optimized' but 4.4?

haerwu said:
gcc-4.4 is past... 4.6/4.7 can be named 'optimized' but 4.4?
Click to expand...
Click to collapse
Hi !
Yes 4.4.7 is part of 4.4 but is updated on 13/03/2012 => http://gcc-uk.internet.bs/releases/gcc-4.4.7/ :good:
And also Toolchain Android-NDK-R8-Linux use 4.4.3 !!! - but is not optimized for archos ( with archos patch ) !!!
And "Optimized" - refers to the fact that he included the archos patch !!!

I know that 4.4 still gets bug fixes. But no new optimizations for quite long time. Look at Linaro toolchain team for example - they abandoned 4.4 when 4.6 got released. Now they work on 4.8 (trunk), 4.7 (as stable) and 4.6 only gets bugfixes from them.

haerwu said:
I know that 4.4 still gets bug fixes. But no new optimizations for quite long time. Look at Linaro toolchain team for example - they abandoned 4.4 when 4.6 got released. Now they work on 4.8 (trunk), 4.7 (as stable) and 4.6 only gets bugfixes from them.
Click to expand...
Click to collapse
Ok ! I also managed to build Kernel with linaro toolchain 4.7.1 - but for build your toolchain is quite another thing !!! :good:
Take a loook here => http://forum.xda-developers.com/newreply.php?do=newreply&p=28241681

For kernel there is nearly nothing to be improved by Linaro changes. Android can get faster string/mem* routines, some multimedia improvements (more neon etc) and so on.

haerwu said:
For kernel there is nearly nothing to be improved by Linaro changes. Android can get faster string/mem* routines, some multimedia improvements (more neon etc) and so on.
Click to expand...
Click to collapse
Ok ! I know ...
but still should be .....even a little !!! but is not !

Related

[ABANDONED]FIXED/MODIFIED][KERNEL][16 JULY] franco.Kernel | 2.6.35.10

So I compiled franco's kernel with his sources at github with incoming call fix from CM with other improvements. All Credit goes to franciscofranco who was so kind to compile this kernel even-though he has other devices, and also other developers for all these patches included in the kernel.
I decide what I want not you. No means no, if you ask me to add *insert feature here* IF I consider it useless etc etc
Also one thing to note that it doesn't have :
* (Since franco didnt release his sources for it)
Doubled busses frequencies - system will go faster but you'll possible lose some overclocking capabilities. Busses frequency OC > cpu OC.
* Your megaduper governors (people failed to realise that tuned stock governors(or they can tune them themselves) have almost same performance with smartass etc)
Click to expand...
Click to collapse
Changelog - other changes are in my source
#12 http://www.mediafire.com/?vdm3xs1hdjuh7ju
- revert "conservative from 3.2 kernel", use .38 kernel version instead (works correctly now)
- revert back to .35 cpuidle
- use latest linaro toolchain for fun and testing
Click to expand...
Click to collapse
Sources:https://bitbucket.org/cresqo/2.6.35.10-p500
Cresqo said:
So I compiled franco's kernel with his sources at github with incoming call fix from CM. Also one thing to note that it doesn't have :
If all goes well I'll update the kernel with camera flicker bug fix, 652, 672, 691, 710 cpu frequencies, recent LCD patch and maybe the bluetooth sleep bug fix
So here's the link: http://www.mediafire.com/?zi2k8yp7ilvpibc
I need tests on this. (camera and incoming calls)
Also white noise is back as expected.
Click to expand...
Click to collapse
Well done!
Sent from my LG-P500 using xda premium
Just updated the kernel with latest linaro toolchain and other things
Great job!
Why not move it to the Development section if you are planning on improving this kernel?
Sent from my LG-P500 using xda premium
RockR172 said:
Great job!
Why not move it to the Development section if you are planning on improving this kernel?
Sent from my LG-P500 using xda premium
Click to expand...
Click to collapse
Well once I figure out how the heck do I use git (need help here)
Btw, this kernel with fix feels a bit faster than franco #3, but I don't think is nowhere near the speed of #4
nice, but why not compiled franco's kernel #4 ? why #3 ?
Edit: did u added Added tun.ko and cifs.ko ?
GonDr said:
nice, but why not compiled franco's kernel #4 ? why #3 ?
Edit: did u added Added tun.ko and cifs.ko ?
Click to expand...
Click to collapse
There are no sources for #4...
Sent from my LG-P500 using xda premium
Cresqo said:
Well once I figure out how the heck do I use git (need help here)
Btw, this kernel with fix feels a bit faster than franco #3, but I don't think is nowhere near the speed of #4
Click to expand...
Click to collapse
What kind of help do you need?
GonDr said:
nice, but why not compiled franco's kernel #4 ? why #3 ?
Edit: did u added Added tun.ko and cifs.ko ?
Click to expand...
Click to collapse
Added I guess, idk if working
DJNoXD said:
What kind of help do you need?
Click to expand...
Click to collapse
It sounds like a noob question, but how do you add alot of files as once and commit them, do I have to manually do it or do I need to use a git GUI like git-cola?
Cresqo said:
It sounds like a noob question, but how do you add alot of files as once and commit them, do I have to manually do it or do I need to use a git GUI like git-cola?
Click to expand...
Click to collapse
I did not find a gui (for linux) that I like. Therefor I only use the console git.
Adding all filles at once:
Code:
git add .
Commit all changed / modified / added files at onces:
Code:
git commit -a
Commit all changed / modified / added files at onces and set commit message (no editor opens).
Code:
git commit -a -m "my commit message"
Cresqo said:
So I compiled franco's kernel with his sources at github with incoming call fix from CM with other improvements. All Credit goes to franciscofranco who was so kind to compile this kernel even-though he has other devices. Also one thing to note that it doesn't have :
Click to expand...
Click to collapse
Dear Cresqo,
Please go thru following link it may be helpful to extract .config file from Franco kernel #4
Link:
http://droid-force.com/archive/index.php/thread-184.html
This what the thread says:
There is a simpler way to get the basic .config file, and this is to get it from a running kernel built by someone else. You can extract the .config from a running kernel with these commands:
Code:
cd ~/android/kernel/bravo_2.6.35_gb-mr
adb pull /proc/config.gz
zcat config.gz > .config
Now we can open menuconfig and add anything we need in addition.
Note: I think "bravo_2.6.35_gb-mr" is the working folder \ Home directory on PC
Cresqo said:
compiled with latest GCC 4.7.1 Linaro toolchain
Click to expand...
Click to collapse
Do you notice any advantages compiling kernel by using linaro toolchain?
Kanad said:
Dear Cresqo,
Please go thru following link it may be helpful to extract .config file from Franco kernel #4
Link:
http://droid-force.com/archive/index.php/thread-184.html
This what the thread says:
There is a simpler way to get the basic .config file, and this is to get it from a running kernel built by someone else. You can extract the .config from a running kernel with these commands:
Code:
cd ~/android/kernel/bravo_2.6.35_gb-mr
adb pull /proc/config.gz
zcat config.gz > .config
Now we can open menuconfig and add anything we need in addition.
Note: I think "bravo_2.6.35_gb-mr" is the working folder \ Home directory on PC
Click to expand...
Click to collapse
Honestly I don't think it will work and my .config is quite OK actually...so the only way is to ask Franco for it since he didn't enable the option for the config to be in config.gz
DJNoXD said:
Do you notice any advantages compiling kernel by using linaro toolchain?
Click to expand...
Click to collapse
Hmm, tough question, maybe a little smooth, maybe, but i'll revert as soon as there is any bug associated with it (didn't encounter static sound bug so far, perhaps it's due to compiling the ROM with linaro toolchain)
Btw i'm uploading my sources to bitbucket(though all changes are not visible as i've already modified the files and i'm lazy and don't have that much time to do it again...)
Cresqo said:
Btw i'm uploading my sources to bitbucket(though all changes are not visible as i've already modified the files and i'm lazy and don't have that much time to do it again...)
Click to expand...
Click to collapse
I'm curious about to see your sources.
DJNoXD said:
I'm curious about to see your sources.
Click to expand...
Click to collapse
My sources: https://bitbucket.org/cresqo/2.6.35.10-p500
Though the commits are wrong(was messed up with an earlier source from last time)
Cresqo said:
My sources: https://bitbucket.org/cresqo/2.6.35.10-p500
Though the commits are wrong(was messed up with an earlier source from last time)
Click to expand...
Click to collapse
Is your repo private?
DJNoXD said:
Is your repo private?
Click to expand...
Click to collapse
Oops sorry didn't know I enabled the option, just disabled it.
You have added lots of temp files, which (I think) you don't wont to upload (e.g. all *.o files).
Add a gitignore file to your repo and those files will be ignored.
DJNoXD said:
You have added lots of temp files, which (I think) you don't wont to upload (e.g. all *.o files).
Add a gitignore file to your repo and those files will be ignored.
Click to expand...
Click to collapse
Eh...gitignore file is gone...will recommit it again
Sorry Cresqo, i haven't repplied your PM cause i had exams... now two biggest exams now is gone! I've finished it! Now I can do everythings i want: learn C, C++, play badminton , play games, compile ROM or kernel ...
Love Tyn!

[WIP][DEV][ROM][ARC/S] Project Stock MooDeD JB - Project Open Source For Everyone!

Hi.. Guys what is special here is that Will try to Compile the JB from Source 6.0+GB Plus Thats A Big File from there server BTW. I Need some help regarding to some Kernel We need. So Stock JB will work on your Arc. So Ill Start compiling This ROM This night + I Need little help regarding on Ramdisk So we can Start That amazing Stock JB... :good:
My Procedure :
Sync all JB Source 9 ( Tree ) 6.0+GB Will Take A Night 20Mbps Of Speed :silly:
Get A Info Building JB Kernel for Unit/Device
RAMDISK Configuration [ Usually This Is What I Need An Help ]
Make My Own Git
And Lastly The ROM Will be Alpha for our Xperia Arc
So Ill Be Adding More Info Tom / This Night / Next Week Based on my Timeline of Development per Device Maintaining 4+ Device :cyclops:
Current Work Im Doing :
Find Info and ready to Sync and Compiling my Own CWM Thanks To pyvparts
This Is A Real WIP !! Everybody Get in
[ Placeholder For More Info ]
Compiling My OwnRamdisk For JB Kernel Alpha..
Google also test compiling on Ubuntu 10.04 LTS, but I used 10.10, 32 bit. These instructions are for Ubuntu version 10.04-11.10
To install JDK6 (needed):
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get install sun-java6-jdk
FOR 64bit: You will need the required packages, so open up your terminal and enter:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc
On Ubuntu 10.10:
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
sudo apt-get install libx11-dev:i386
FOR 32bit (what I used): You will need the required packages, so open up your terminal and enter:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \ libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \ libxml2-utils xsltproc
Now, onto downloading the source
First of all, you need to get the google repo tool, in a terminal:
Code:
mkdir ~/bin PATH=~/bin:$PATH curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo chmod a+x ~/bin/repo
Then reboot the PC
Now, we will actually initialize the repository:
Code:
mkdir -p ~/android/ics/ cd ~/android/ics/ repo init -u git://github.com/CyanogenMod/android.git -b ics
Then enter your name and email address
Then:
Code:
repo sync -j8 if you have bad internet, use a smaller number than 8, eg. 4 or 2
Now, wait for the repo to sync (all 6GB of it )
Then after that is done, you need to setup vendor and device trees for our device
In the terminal again:
Code:
cd ~/android/ics/vendor/ git clone https://github.com/koush/proprietary_vendor_semc.git -b ics semc
Then:
Code:
cd ~/android/ics/device/ mkdir semc cd semc git clone https://github.com/CyanogenMod/android_device_semc_msm7x30-common.git -b ics msm7x30-common git clone https://github.com/CyanogenMod/android_device_semc_anzu.git -b ics anzu git clone https://github.com/CyanogenMod/android_device_semc_mogami-common.git -b ics mogami-common
to sync changes since last sync:
Code:
cd ~/android/ics/ repo sync
get CM props:
Code:
cd ~/android/ics/vendor/cm/ ./get-prebuilts
then to build :
Setup environment:
Code:
cd ~/android/ics/ . build/envsetup.sh
then to get device list:
Code:
lunch
Now, select the number that is anzu-full (or something like that number 4 for me NOT THE ONE WITH "cm_" before it.)
if you get an error about the room service fine and substrings n stuff open the file
build / tools / roomservice.py
goto line 16 or 17
it will have this
device = product[product.index("_") + 1:]
change it to
device = product
save then lunch and you should be able to build (will break other device builds tho)
Now to finally build:
Code:
make -j4 recoveryimage
once you have done that then the recovery + ramdisk will be in
out/target/anzu/recovery/combinedroots/
MAYBE THIS AOSP Kernel Will Work On MooDeD Stock JB Alpha! Kinda Let See.
Click to expand...
Click to collapse
I'm pretty sure I saw code for compiling for job which I believe is slightly different than ics. If urz doesn't work I would suggest looking around xda for a job specific tutorial
Sent from my LT18i using xda app-developers app
zainthesnipe said:
I'm pretty sure I saw code for compiling for job which I believe is slightly different than ics. If urz doesn't work I would suggest looking around xda for a job specific tutorial
Sent from my LT18i using xda app-developers app
Click to expand...
Click to collapse
Thats A Good Opinion But ICS Kernel [ Cyanogenmod ICS Source ] maybe Good To Start A Pre-Alpha MooDeD JB From Source
can't wait
hope you release it soon
Tell me one thing... If the internet connection drops while i'm syncing the repo (the 6 gbs of source) do i have to download it all again or it gets resumed from the part it dropped..?
flsmidth said:
Tell me one thing... If the internet connection drops while i'm syncing the repo (the 6 gbs of source) do i have to download it all again or it gets resumed from the part it dropped..?
Click to expand...
Click to collapse
For Me I dont experienced that kind of error My Answer is Unkown I left it overnight to sync the Repo.
Sent from my GT-I9100G using xda app-developers app
ChaosFirZen said:
For Me I dont experienced that kind of error My Answer is Unkown I left it overnight to sync the Repo.
Sent from my GT-I9100G using xda app-developers app
Click to expand...
Click to collapse
Actually I tried syncing the repo once to make AOSP for Arc.. But due to power failure there a connection drop and i didn't bother to sync it again because i have slow internet connection..
flsmidth said:
Actually I tried syncing the repo once to make AOSP for Arc.. But due to power failure there a connection drop and i didn't bother to sync it again because i have slow internet connection..
Click to expand...
Click to collapse
We Have 20MBps Of Internet Speed
Sent from my GT-I9100G using xda app-developers app
Nice, I like to have a pure AOSP 4.1 rom for the Xperia Arc. Always wondered why there were no AOSP roms for the Arc
The problem is that there is not a lot of device in the git "only samsung and nexus", other devices aren't present. So when you sync, you can't build JB.
"https://github.com/koush/proprietary_vendor_semc.git" don't exist.
Replace ics with jb in the google repo and ics with jellybean in CM repo to sync the Jelly Bean tree.
Good luck.
ChaosFirZen said:
We Have 20MBps Of Internet Speed ;
Click to expand...
Click to collapse
In download or upload?
mekayzer said:
The problem is that there is not a lot of device in the git "only samsung and nexus", other devices aren't present. So when you sync, you can't build JB.
"https://github.com/koush/proprietary_vendor_semc.git" don't exist.
Replace ics with jb in the google repo and ics with jellybean in CM repo to sync the Jelly Bean tree.
Good luck.
Click to expand...
Click to collapse
Even better to sync fxp's vendor trees.. fxp have modified their's to work with jb..
i dont know about arc but here's the one for pro
https://github.com/CyanogenMod/android_device_semc_iyokan/tree/jellybean
* try replacing "iyokan" with anzu or ayame.. You may get the jb tree for Arc/S
rod555 said:
In download or upload?
Click to expand...
Click to collapse
Download
flsmidth said:
Even better to sync fxp's vendor trees.. fxp have modified their's to work with jb..
i dont know about arc but here's the one for pro
https://github.com/CyanogenMod/android_device_semc_iyokan/tree/jellybean
* try replacing "iyokan" with anzu or ayame.. You may get the jb tree for Arc/S
Click to expand...
Click to collapse
Pro Will work on It but the PROBLEM is the Kernel + RAMDISK { Ramdisk 10% Complete }
ChaosFirZen said:
Download
Pro Will work on It but the PROBLEM is the Kernel + RAMDISK { Ramdisk 10% Complete }
Click to expand...
Click to collapse
Ramdisk can't be ported i guess..
I tried 2days ago, but can't build for anzu.
Perhaps when fxp release CM10, we will build again from source.
Someone got the kernel build ?
the only thing that i can say is, THANK YOU ALL!!
very good news.
i have 100 MB internet conection, if that helps any one!!
flsmidth said:
Ramdisk can't be ported i guess..
Click to expand...
Click to collapse
\Thats Why Im Creating My Own Ramdisk ... For MooDeD JB Alpha
ChaosFirZen said:
\Thats Why Im Creating My Own Ramdisk ... For MooDeD JB Alpha
Click to expand...
Click to collapse
Try the ramdisk from the ARC JB AOKP.. the problem with their boot image is gallroc. You might make it work..
Let's use ICS Kernel for the meantime, we'll work on Jelly Bean kernel when we have a working build of it. But with ICS Kernel I doubt Project Butter will function very good, and maybe Voice Action won't work too.
But for a pre-alpha, ICS Kernel would be acceptable!
maybe this can help you
butits tutorial how to build cm10 rom
http://forum.xda-developers.com/showthread.php?t=1789190

Development! Project JellyBeanSwift - Open Source Project!

I will teach you build ROM.
Lets get some ROCK!!!
Operating System
First step is having a fully functional linux distro. You can choose what you prefer, I'm using ubuntu and I write commands for it. You can use OSX too, as I know, but I've completely no idea how, I never had a Mac.
Well, talking about linux, you need a 64bit distribution, so if you have an old 32 bit processor youn cannot go ahead.
To check which version do you have, type in a shell
uname -a
If the results include "x86_64" you're ok.
Required Packages
You need to install some little packages, to be able to proceed, you can do this with your favorite package manager:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 g++-multilib mingw32 openjdk-6-jdk pngcrush schedtool tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Some systems need some trick to install all this package, is your care to check this process completed correctly and fix eventually problems.
Install "repo"
Repo is the program that handles synchronization between our pc and the repository, in this case Cyanogen's one. To install do:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
So we have downloaded and added executables flag to it. Now we need a folder to store locally the sources, you can put it everywhere, but to be coherent with other guides, I do:
mkdir -p ~/CM10/
Repository initialization
Well, now it's time to initialize our source folder to correctly sync with repository:
cd CM10
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Nota: Maybe the repo command is not recognized. In this case you can restart the shell or te machine.
Download
Now is download time! Write this command and get a fresh beer, you have to download several GB of data, please wait.
repo sync -j16
The "-j16" switch may be modified as you want, is the number of concurrent thread downloading from repo. 16 is my value, for a 100Mbit connection, maybe you can decrease a little to match your line speed. Someone uses 8 threads for an 8Mbit ADSL line.
Download precompiled files.
There are some others files needed, like the toolchain, including GCC, to compile code.
~/CM10/vendor/cm/get-prebuilts
Another small wait time and we're ready!
Add sources code for GT540
Copy sources from https://github.com/mmxtrem/device_lge_swift to ~/CM10/device/lge/swift
Or extract this archive http://depositfiles.com/files/1chflk58r to ~/CM10/device/lge/swift
Build
Great, we're ready to build!
The build process takes some hours, so be patient. My notebook, takes more than 10 hours!
cd CM10
source build/envsetup.sh && brunch swift
Install
When is ready, we can find the result here:
~/CM10/system/out/target/product/swift/cm-10-XXXXX-JellyBeanSwift-XXXX.zip
This is the package to be flashed in recovery mode.
There are Gapps included.
Update
If you want to update your build, you have to do only this:
cd CM10
repo sync
and build again!
P.S. Dont forget write Credit my name, when will be publish your ROM. Good Luck!
[Guide] How to use Github
http://forum.xda-developers.com/showthread.php?t=1877040
Wow I always wanted to try this out! Thanks for the surprise tutorial!
Wow wow wow.. forget my post in the other thread. This thing miro, this thing here is possible your best contribution to this community.. I'm getting my old gt540 back from my brother and trying these right tomorrow..
I actually thought about asking you for such a tutorial but scratched it as I didn't believe you would do it. But thank you again and again.. I was so wrong
I've just one question, we do the build, ok and we try it, ok, but if we find any bug, where we solve it?! and where we put the corrects librarys for our phone?!
Sorry i'm just very noob
Miroslav is best men on a whole world
Thank you so much for this tutorial
Btw is gt540 msm 7x27 ? if yes could someone try to build this kernel for our phone https://github.com/Californication/lge-kernel-msm7x27-ics-3.0.8
-bfar97- said:
I've just one question, we do the build, ok and we try it, ok, but if we find any bug, where we solve it?! and where we put the corrects librarys for our phone?!
Sorry i'm just very noob
Click to expand...
Click to collapse
+1
Sent from my LG-P990 using Tapatalk 2
smileydr0id said:
Miroslav is best men on a whole world
Thank you so much for this tutorial
Btw is gt540 msm 7x27 ? if yes could someone try to build this kernel for our phone https://github.com/Californication/lge-kernel-msm7x27-ics-3.0.8
Click to expand...
Click to collapse
Yes, gt540 is msm7x27
smileydr0id said:
Miroslav is best men on a whole world
Thank you so much for this tutorial
Btw is gt540 msm 7x27 ? if yes could someone try to build this kernel for our phone https://github.com/Californication/lge-kernel-msm7x27-ics-3.0.8
Click to expand...
Click to collapse
https://github.com/Californication its my repo!
lge-kernel-msm7x27-ics-3.0.8 - not working. I did try port it from LG L5. Kernel not starting, kernel not finish.
lge-kernel-msm7x27 - kernel from SDSL and AOSP, I ported it from https://github.com/CyanogenMod/lge-kernel-msm7x27 for LG 7227 devices (P500/510/C660/and other), but it dont have latest fixes.
Please dont write stupid massages like "smiles" or +1 or other, make it clean! Devs only, if you want build ROM real, if no go spaming into other thread!
XiproX said:
Yes, gt540 is msm7x27
Click to expand...
Click to collapse
https://github.com/Californication its my repo!
lge-kernel-msm7x27-ics-3.0.8 - not working. I did try port it from LG L5. Kernel not starting, kernel not finish.
lge-kernel-msm7x27 - kernel from SDSL and AOSP, I ported it from https://github.com/CyanogenMod/lge-kernel-msm7x27 for LG 7227 devices (P500/510/C660/and other), but it dont have latest fixes.
Click to expand...
Click to collapse
damn
-bfar97- said:
I've just one question, we do the build, ok and we try it, ok, but if we find any bug, where we solve it?! and where we put the corrects librarys for our phone?!
Sorry i'm just very noob
Click to expand...
Click to collapse
^ This, make a guide for this, or is just all "lets google it"?
thanks for that tut miroslav !!
i would be happy if you can make example of bug fixing/driver porting (something simple as example).
Oh, nice post Miro
But one thing, why don't you post how to make device files. It would be of more use as people will try to make their own sources and a good chance that they could make their own device in collaboration. :good:
i've ear i can do a build in a 32bits processor too! but you know xD do what was said up please!!
Could someone try to build this because I can't cause I have 32bit system in my PC.
We need JB for daily use!
Why are you using -mfloat-abi=softfp
why not -mfloat-abi=hard ?
aaa801 said:
Why are you using -mfloat-abi=softfp
why not -mfloat-abi=hard ?
Click to expand...
Click to collapse
forgot about this line, not using for ROM. it need only for android-ndk for kernel building.
Niquel97 said:
We need JB for daily use!
Click to expand...
Click to collapse
Just do it! (c. Nike)
P.S. Dreams-dreams-dreams.... :laugh:
miroslav_mm said:
forgot about this line, not using for ROM. it need only for android-ndk for kernel building.
Click to expand...
Click to collapse
So should work fine if set to hard yes?
i'm getting this error when compiling:
Install system fs image: out/target/product/swift/system.img
out/target/product/swift/system.img+ maxsize=262225920 blocksize=135168 total=277360512 reserve=2703360
error: out/target/product/swift/system.img+ too large (277360512 > [264929280 - 2703360])
al3000 said:
i'm getting this error when compiling:
Install system fs image: out/target/product/swift/system.img
out/target/product/swift/system.img+ maxsize=262225920 blocksize=135168 total=277360512 reserve=2703360
error: out/target/product/swift/system.img+ too large (277360512 > [264929280 - 2703360])
Click to expand...
Click to collapse
Yes, me too, the build comes so big that it fails the size checks on the default partition layout.
To avoid that change the contents in device/lge/swift/BoardConfig.mk, I've used these values:
Code:
# PARTITIONS
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00500000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00900000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x0010B07600
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x007478A00
BOARD_FLASH_BLOCK_SIZE := 131072
I believe you can still zip up the right files in out/target/product/swift/ to have a signable update zip, the command "make otapackage" which I found somewhere didn't seem to work.

[HOWTO] Building from sources [Kernel only for now]

Hello everyone.
This guide will help you in building a kernel from source for your Nexus 4
Later, when 4.2 hits AOSP, i'll add a guide for building that too
You will need a computer running Linux / OSX to build the kernel, natively, or via a VM.
This guide assumes you’re running any Linux distro.
Getting a toolchain:
You need a toolchain to build the kernel.
The preferred one is Google’s toolchain, the same they use to build AOSP.
In a terminal, type:
Code:
git clone [url]https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/[/url]
export PATH=$PATH:$(pwd)/arm-linux-androideabi-4.6/bin
export CROSS_COMPILE=arm-linux-androideabi-
TIp: paste the export statements in your ~/.bashrc to have them exported each login.
Getting the kernel source:
The kernel source for Nexus devices is available from Google’s servers.
Nexus 4 : https://android.googlesource.com/kernel/msm
Github Mirror: https://github.com/android/kernel_msm
Open the terminal, and type the below commands to get the kernel source on your computer.
Code:
mkdir -p android/kernel
cd android/kernel
For Nexus 4, we get the msm kernel sources.
Code:
git clone [url]https://android.googlesource.com/kernel/msm[/url]
Next, we change our directory to the newly fetched source.
Type
Code:
cd msm
Figuring out what to build:
Now, we need to figure out which revision to build.
You need to be exactly sure about this, otherwise there are chances that the compiled kernel won’t work.
The commit to build upon can be found by a few ways.
To get the kernel sources matching the device tree, type the below in the device tree.
Code:
git log kernel
Next, type the below in the kernel tree
Code:
git checkout <commit>
The commit of the version running of the current review units is 7a47627, which is same as branch android-msm-mako-3.4-jb-mr1-fr .
Compiling:
Name of defconfig: mako_defconfig
cd to the directory of the kernel source, then type the below in a terminal.
Code:
export ARCH=arm
export SUBARCH=arm
Code:
make <name_of_defconfig>
make
The kernel image will be ready at arch/arm/boot/zImage
To flash it, you need to make it into a boot.img, more on that later, when we have more sources.
1) what is the branch "android-msm-mako-3.4-jb-mr1-fr" for?
2) what does mr1 mean? sounds like milestone/alpha/beta. Maybe it's not final? Last commit is 2 weeks ago.
3) great guide
m11kkaa said:
1) what is the branch "android-msm-mako-3.4-jb-mr1-fr" for?
2) what does mr1 mean? sounds like milestone/alpha/beta. Maybe it's not final? Last commit is 2 weeks ago.
3) great guide
Click to expand...
Click to collapse
mr1 could stand for "Milestone Release 1", it might not be final.
That being said, you should never checkout a branch directly for compiling a kernel, but the commit directly.
cdesai said:
...You need a toolchain to build the kernel. The preferred one is Google’s toolchain, the same they use to build AOSP.
Click to expand...
Click to collapse
Could you also use linaro to compile the kernel? I believe it's a toolchain anyway, but I'm not too sure on it's benefits or compatibility...
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
randomblame said:
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
Click to expand...
Click to collapse
Are you planning on developing for the N4?
Loved your work on the DHD
espionage724 said:
Could you also use linaro to compile the kernel? I believe it's a toolchain anyway, but I'm not too sure on it's benefits or compatibility...
Click to expand...
Click to collapse
Linaro isn't a toolchain, but they do make toolchains.
Yes, you can use it to compile the kernel, though it may not compile at all with it, or not work well - your mileage may vary.
randomblame said:
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
Click to expand...
Click to collapse
Nope, LZO compression is enabled by default
cdesai said:
Linaro isn't a toolchain, but they do make toolchains.
Yes, you can use it to compile the kernel, though it may not compile at all with it, or not work well - your mileage may vary.
Click to expand...
Click to collapse
Linaro has proven to increase android performance up 30 - 100% not sure if that is with -O3 optimizations or not. That is all I use on my kernels
Sucks this phone is not coming to Sprint, might be time to change carriers...
randomblame said:
nice didn't realize kernel source was already available- can't wait to test this zImage and start testing changes noticed they left out kernel compression makes for a big zimage
Click to expand...
Click to collapse
-mvectorize-with-neon-quad ---> I use this in my makefile for cflags and drops the zImage size from 5.0mb to 4.4mb.
cdesai said:
Linaro isn't a toolchain, but they do make toolchains.
Yes, you can use it to compile the kernel, though it may not compile at all with it, or not work well - your mileage may vary.
Nope, LZO compression is enabled by default
Click to expand...
Click to collapse
ah I didn't see it - 6+mb still pretty big from what I'm used to at least
I'm going through the mind numbing process of bringing in mainline patches and squashing them all together. I'm up to 3.4.1 ... woot where's the hang me emoticon lol
*finally got smart and cloned mainline and reset the head back to each sublevel and merged into my local n4 source
got it all the way up to date with mainline 3.4.18
Thanks cdesai. I didn't think anything was out yet!!
randomblame said:
ah I didn't see it - 6+mb still pretty big from what I'm used to at least
I'm going through the mind numbing process of bringing in mainline patches and squashing them all together. I'm up to 3.4.1 ... woot where's the hang me emoticon lol
*finally got smart and cloned mainline and reset the head back to each sublevel and merged into my local n4 source
got it all the way up to date with mainline 3.4.18
Click to expand...
Click to collapse
Yea, it's big, but partitions on new devices are big as well.
y u no use git to merge
Just add korg as a remote, fetch, merge.
Each version is tagged, so you can do that incrementally too.
Also, kernel.org hosts patches as well, if you prefer that way.
snowman77 said:
Thanks cdesai. I didn't think anything was out yet!!
Click to expand...
Click to collapse
Google <3
I got it straightened out so it's up to date with mainline and I think I've got overclocking up to 1.89ghz ready lots of more fun to be had but damn I'm just teasing myself till tuesday/whenever the thing comes in the mail. hard to test anything without hardware.
I may need a tip. I have followed your guide - which I find great and simple - but I'm having a problem with the arm binaries when I launch the make command after checking out the remotes/origin/android-msm-mako-3.4-jb-mr1-fr and executed make mako_defconfig:
Code:
/bin/sh: 1: arm-linux-androideabi-ld: not found
I have cloned the toolchain and msm repos, and added to the PATH environment var the location of the bin directory. I can reach arm-linux-androideabi-ld from the command line, but no luck executing it:
Code:
[email protected]:~/android/kernel/msm$ /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
bash: /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld: No such file or directory
And it is there with execution rights:
Code:
[email protected]:~/android/kernel/msm$ ll /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
-rwxrwxr-x 1 echedey echedey 3145332 Nov 10 16:32 /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld*
My repos are in these paths:
Code:
/home/echedey/android/arm-linux-androideabi-4.6
/home/echedey/android/kernel
And my $PATH is:
Code:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/echedey/android/arm-linux-androideabi-4.6/bi
Am I missing anything?
josjator said:
I may need a tip. I have followed your guide - which I find great and simple - but I'm having a problem with the arm binaries when I launch the make command after checking out the remotes/origin/android-msm-mako-3.4-jb-mr1-fr and executed make mako_defconfig:
Code:
/bin/sh: 1: arm-linux-androideabi-ld: not found
I have cloned the toolchain and msm repos, and added to the PATH environment var the location of the bin directory. I can reach arm-linux-androideabi-ld from the command line, but no luck executing it:
Code:
[email protected]:~/android/kernel/msm$ /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
bash: /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld: No such file or directory
And it is there with execution rights:
Code:
[email protected]:~/android/kernel/msm$ ll /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld
-rwxrwxr-x 1 echedey echedey 3145332 Nov 10 16:32 /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld*
My repos are in these paths:
Code:
/home/echedey/android/arm-linux-androideabi-4.6
/home/echedey/android/kernel
And my $PATH is:
Code:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/echedey/android/arm-linux-androideabi-4.6/bi
Am I missing anything?
Click to expand...
Click to collapse
You path has a "n" missing from bin at the end.
You could type arm- and try to use tab-completion to see if it's accessible, then the same thing with full path (~/android/arm-linux-androideabi-4.6)
cdesai said:
You path has a "n" missing from bin at the end.
You could type arm- and try to use tab-completion to see if it's accessible, then the same thing with full path (~/android/arm-linux-androideabi-4.6)
Click to expand...
Click to collapse
Sorry, the missing 'n' came from the c&p. I can actually see the file by tabing it from any path but after the auto completing it tells this weird thing:
Code:
[email protected]:~$ arm-linux-androideabi-ld
bash: /home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld: No such file or directory
I'm a experienced *nix user but I don't get this. The repos are correctly cloned and all files under bin has exec rights. I'm running ubuntu 12.10. Maybe a problem with the shell? I should try any other environment, but that would be like killing flies with missiles. Thanks for your help.
Do you definitely have the appropriate executable at
'/home/echedey/android/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-ld'?
Can you do an ls -lF of that directory?
Perhaps the arm-linux-androideabi-ld file there is actually just a symlink which has lost its target.
@josjator Yeah, seems I have the same problem as you. I'm also using Ubuntu 12.10 with a bash shell. I think it may be a recursive make/shell issue thing (sorry, I'm not too hot on make files). Will keep plugging away to see if I can resolve the problem.
The device trees have hit AOSP
https://android.googlesource.com/device/lge/mako/
dsana123 said:
@josjator Yeah, seems I have the same problem as you. I'm also using Ubuntu 12.10 with a bash shell. I think it may be a recursive make/shell issue thing (sorry, I'm not too hot on make files). Will keep plugging away to see if I can resolve the problem.
Click to expand...
Click to collapse
@josjator: Using the 4.7 toolchain sorted me out (at least it's building now and past the initial problem).
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7
Click to expand...
Click to collapse
The objdump and ld binaries are much happier now.
BTW, I did download the 4.6 toolchain again (just in case there was some problem in the initial git clone), but I still encountered objdump and ld problems.
Works like a champ on Ubuntu 12.10 exactly as outlined in the OP. Thanks!
Code:
[email protected]:~/Documents/AOSP/kernel/msm$ ls -l arch/arm/boot/zImage
-rwxrwxr-x 1 android android 6314888 Nov 16 23:45 arch/arm/boot/zImage
[email protected]:~/Documents/AOSP/kernel/msm$ uname -a
Linux ubuntu 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[email protected]:~/Documents/AOSP/kernel/msm$ arm-linux-androideabi-gcc -v
[...]
gcc version 4.6.x-google 20120106 (prerelease) (GCC)

Help me compile and build a Lollipop kernel (currently BlissPop preferable)

I want to compile a kernel for lollipop, but I always get somekind of error... Can this be cause of toolchain that I use or cause sources from GitHub arent good? Do u have any recomendation on stable, working source, and toolchain that goes along with it? I compiled cm11 rom, but couldn't compile just a kernel... Do u have any nice tutorials on that, ones that i found arent working for me...
i tried with this toolchain gcc/linux-x86/arm/arm-eabi-4.6 from tutorial source.android.com/source/building-kernels.html
download the kernel source. in this tutorial we will use the cm-12.1 cyanogen kernel.
Code:
git clone -b cm-12.1 https://github.com/CyanogenMod/lge-kernel-p880
there now is a folder in your home 'lge-kernel-p880'
download a toolchain. for now i prefer the google aosp toolchain because i am not knowing the code of the cyanogen kernel. compiling with other toolchains and recenter releases (for example 4.9 5.0 5.1 5.1 and 6.0 needs a few changes and fixes in the coding else it will not complete compiling)
Code:
git clone -b aosp-4.8-arm-eabi https://github.com/ArchiDroid/Toolchain toolchain
now that u have both u are ready to compile.
in terminal cd to the downloaded source.
Code:
cd lge-kernel-p880
set some things up and start compiling
Code:
export ARCH=arm
export CROSS_COMPILE=/home/[B]yourubuntu-username[/B]/toolchain/bin/arm-eabi-
make cyanogenmod_x3_defconfig
start compiling
Code:
make -j4
Now sit back, relax, and watch the code! Or you could read a book, watch ****, count your fingers, play with your toes...
If you have an error during the waterfall of code, find the part where it actually says *error* (you'll probably have to scroll upwards) and search it on Google or post it here.
If you manage to get something that says "the kernel zImage is ready" or something like that, that means you've made it!
You have officially compiled your own kernel from source! Now you need to put it in a flashable zip with the .ko files.
As i dont know what .ko files cyanogenmod compiles u should find this out yourself.
it is probably listed in the end of the terminal when the compiling is finished
hope this will bring u further then you are now.
mistercheese said:
download the kernel source. in this tutorial we will use the cm-12.1 cyanogen kernel.
Code:
git clone -b cm-12.1 https://github.com/CyanogenMod/lge-kernel-p880
there now is a folder in your home 'lge-kernel-p880'
download a toolchain. for now i prefer the google aosp toolchain because i am not knowing the code of the cyanogen kernel. compiling with other toolchains and recenter releases (for example 4.9 5.0 5.1 5.1 and 6.0 needs a few changes and fixes in the coding else it will not complete compiling)
Code:
git clone -b aosp-4.8-arm-eabi https://github.com/ArchiDroid/Toolchain toolchain
now that u have both u are ready to compile.
in terminal cd to the downloaded source.
Code:
cd lge-kernel-p880
set some things up and start compiling
Code:
export ARCH=arm
export CROSS_COMPILE=/home/[B]yourubuntu-username[/B]/toolchain/bin/arm-eabi-
make cyanogenmod_x3_defconfig
start compiling
Code:
make -j4
Now sit back, relax, and watch the code! Or you could read a book, watch ****, count your fingers, play with your toes...
If you have an error during the waterfall of code, find the part where it actually says *error* (you'll probably have to scroll upwards) and search it on Google or post it here.
If you manage to get something that says "the kernel zImage is ready" or something like that, that means you've made it!
You have officially compiled your own kernel from source! Now you need to put it in a flashable zip with the .ko files.
As i dont know what .ko files cyanogenmod compiles u should find this out yourself.
it is probably listed in the end of the terminal when the compiling is finished
hope this will bring u further then you are now.
Click to expand...
Click to collapse
Ty for help, i tried it, it worked, i guess it was the toolchain the first time...
After that i compiled euphoria kernel, but with uber 5.2 which didnt work for cm kernel...
I had to change some < > to " ", why are sources set with wrong ones, or am i making some mistake?
I replaced only zImage with euphoria zImage in anykernel .zip, can something go wrong when i do it like that?

Categories

Resources