5,814,939 Members 45,128 Now Online
XDA Developers Android and Mobile Development Forum

[Q] [SOLVED] Compiling and packing custom kernel for Galaxy Note 3

Tip us?
(Last edited by jeweller_by; 29th August 2014 at 06:45 PM.) Reason: Solved
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Aug 2014
Question [Q] [SOLVED] Compiling and packing custom kernel for Galaxy Note 3


I'm trying adding several drivers into my SM-N9005 firmware. My phone runs Omega ROM v21, whose kernel doesn't support kernel module drivers, so I decided to recompile Omega's kernel from sources with needed options. The sources were taken from here:


The compilation was easy, the drivers were compiled too, I have my zImage now.

I downloaded Omega's flashable kernel-only zip N9005_Omega_Kernel_KK_v1.1_XXUFNF4_ramdisk.zip from Omega's repo, unpacked boot.img from the zip and tried disassembling it with split_boot script from bootimg_tools found here:


I got the following output:

Page size: 2048 (0x00000800)
Kernel size: 8259720 (0x007e0888)
Ramdisk size: 1581598 (0x0018221e)
Second size: 0 (0x00000000)
Board name:
Command line: 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3'
Base address: (0x01dfff00)

Writing boot/boot.img-kernel ... complete.
Writing boot/boot.img-ramdisk.cpio.gz ... complete.
Unpacking ramdisk... complete.

So I got original Omega's kernel boot.img-kernel and ramdisk boot.img-ramdisk.cpio.gz. Next I decided to reassemble it and flush back, coz' if it works - my kernel might work too.

I took mkbootimg tool from the same package and created new boot.img with it, using parameters I got previously from split_boot script:

./mkbootimg --kernel boot/boot.img-kernel --ramdisk boot/boot.img-ramdisk.cpio.gz --cmdline 'console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3' --base 0x01dfff00 --pagesize 2048 -o boot.img

So I got new boot.img with size 9846784 bytes, whereas original Omega's boot is 11149312 bytes.

I packed my boot.img into original Omega's kernel zip N9005_Omega_Kernel_KK_v1.1_XXUFNF4_ramdisk.zip, replacing existing original boot.img inside, renamed the zip and flushed with recovery.

Now my phone falls into download mode, saying 'Could not do normal boot'. Flashing back original Omega's kernel restores the phone to normal state, so the problem is with reassembling boot.img

What am I missing? Please, help.
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Aug 2014
The answer was easy: Android Image Kitchen v1.6 for Linux from http://forum.xda-developers.com/show....php?t=2073775

My kernel is rebuilt and my device is now working ok! Thanks to the authors.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes