Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,173 Members 41,499 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
padest.com
Old
#11  
Member
Thanks Meter 9
Posts: 84
Join Date: Sep 2012
Hello, Cdesai.
Thanks for your guide!
I will do my best to learn it.
 
jrod091
Old
#12  
Senior Member
Thanks Meter 74
Posts: 320
Join Date: Feb 2012
Location: Atlanta, GA
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
Phone:
Samsung Galaxy S4
ROM: Latest AOKP by Task650
Kernel: Latest KT-SGS4 by Ktoonsez

Tablet:
Google Nexus 10
ROM: Latest AOKP by Task650
Kernel:Latest KTManta by Ktoonsez

Barnes and Noble NookColor
ROM: Dual-boot CM9/stock
Kernel: stock
 
renzyyy
Old
#13  
renzyyy's Avatar
Junior Member
Thanks Meter 14
Posts: 22
Join Date: Aug 2010
Location: Milwaukee, WI
Quote:
Originally Posted by jrod091 View Post
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
The Following User Says Thank You to renzyyy For This Useful Post: [ Click to Expand ]
 
matt95
Old
#14  
matt95's Avatar
Recognized Contributor
Thanks Meter 2324
Posts: 5,779
Join Date: Aug 2010
Location: Verona

 
DONATE TO ME
Quote:
Originally Posted by renzyyy View Post
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
yeah that's true, but for instance with HTC S-OFFed devices you don't even need to flash the boot.img....


Donate and support my studies at the MIT University! Unruu HTC RUUs | Setup Android Development Environment on Ubuntu | Decrypt HTC RUUs
 
renzyyy
Old
(Last edited by renzyyy; 17th November 2012 at 05:35 AM.)
#15  
renzyyy's Avatar
Junior Member
Thanks Meter 14
Posts: 22
Join Date: Aug 2010
Location: Milwaukee, WI
Quote:
Originally Posted by cdesai View Post
... To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
you can extract the contents from the factory image & use getramdisk.py to get the ramdisk.img out of the current boot.img (or use this ramdisk.img)

then once youve compiled the kernel successfully, use mkbootimg from android_bootimg_tools.tar.gz to repack your boot.img.

if you want to just test...
fastboot boot [new-boot.img]

and flash if satisfied...
fastboot flash boot [new-boot.img]

just tested out if anyone wants some verification... screenshot
The Following 2 Users Say Thank You to renzyyy For This Useful Post: [ Click to Expand ]
 
craigacgomez
Old
#16  
craigacgomez's Avatar
Senior Member
Thanks Meter 2575
Posts: 1,824
Join Date: Jan 2010
Location: Lake Forest, CA

 
DONATE TO ME
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE

Code:
Select Code
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fro...el/dzEIOVuxtEo

And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr

CRAiG GoMEZ

Donate to me

Google LGE Nexus 5 [D820] | SlimKat (Android 4.4.2) - SlimRoms
Google Samsung Nexus 10 [GT-P8110HAEXAR] ThunderKat (Android 4.4.2) - craigacgomez
The Following User Says Thank You to craigacgomez For This Useful Post: [ Click to Expand ]
 
Matthileo
Old
#17  
Matthileo's Avatar
Senior Member
Thanks Meter 52
Posts: 274
Join Date: Apr 2009
Location: Wichita, KS
Is there any chance of this becoming an OC kernel in the future?
 
sam3000
Old
#18  
Senior Member
Thanks Meter 267
Posts: 230
Join Date: Jul 2009
Location: Seattle
Quote:
Originally Posted by craigacgomez View Post
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE

Code:
Select Code
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fro...el/dzEIOVuxtEo

And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-

The modules load okay:
shell@android:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000

(Now I have to work out why neither mount nor cifsmanager are working as expected...)
 
craigacgomez
Old
#19  
craigacgomez's Avatar
Senior Member
Thanks Meter 2575
Posts: 1,824
Join Date: Jan 2010
Location: Lake Forest, CA

 
DONATE TO ME
Quote:
Originally Posted by sam3000 View Post
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-

The modules load okay:
shell@android:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000

(Now I have to work out why neither mount nor cifsmanager are working as expected...)
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet

https://github.com/OpenELEC/OpenELEC...901d208cf4fff9

CRAiG GoMEZ

Donate to me

Google LGE Nexus 5 [D820] | SlimKat (Android 4.4.2) - SlimRoms
Google Samsung Nexus 10 [GT-P8110HAEXAR] ThunderKat (Android 4.4.2) - craigacgomez
 
sam3000
Old
#20  
Senior Member
Thanks Meter 267
Posts: 230
Join Date: Jul 2009
Location: Seattle
Quote:
Originally Posted by craigacgomez View Post
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet

https://github.com/OpenELEC/OpenELEC...901d208cf4fff9
I had actually just got to the point of realising I could make it work by explicitly setting the unc path in mount command options. The missing patch would explain it.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes