So you wanna dev kernels?

jcole20

Well-known member
Jan 3, 2012
428
56
0
Visit site
Alright... lemme start off by saying this is for the Q (L55C)

I've noticed a lot of people in the Android Community do not like to share how-to's. And a lot of people are interested in Kernel Dev... while I won't be teaching you how to compile a kernel, I'll show you how to modify a kernel. YOU NEED LINUX (I USE UBUNTU 11.04) TO DO THIS.

Attached below is a .zip of the mkbootimg, unbootimg, and 2 cheat sheets and guides I made to help you out... ENJOY

K,

here's basic kernel devving 101

First off extract the mkbootimg and unbootimg to a directory (I use the Desktop and put it in /home/username/Desktop/Kernel

Then you need to put the boot.img in there with it.

Next you need to cd into that directory eg cd /home/username/Desktop/Kernel

next run this command just like this
Code:
./unbootimg boot.img

this will split the boot.img into a ramdisk file and everything else...

Next in /home/username/Desktop/Kernel create a new file named ramdisk or whatever will help you remember it.

Put the boot.img-ramdisk.cpio.gz file in there. Then cd to that directory

eg cd /home/username/Desktop/Kernel/ramdisk

Now run this command to split the ramdisk archive open...
Code:
zcat boot.img-ramdisk.cpio.gz | cpio -idv

Now delete the boot.img-ramdisk.cpio.gz file from the */ramdisk folder.

Do your kernel edits...

Then to re archive the ramdisk run this command
Code:
find . | cpio -o -H newc | gzip > ../boot.img-ramdisk.cpio.gz

This will make a boot.img-ramdisk.cpio.gz file in /home/username/Desktop/Kernel with all of your edits. So delete your ramdisk folder.

Next to rebuild the kernel delete the boot.img from /home/username/Desktop/Kernel and then cd into that directory

Code:
cd /home/username/Desktop/Kernel

then to rebuild the kernel run this command..
Code:
./mkbootimg --cmdline 'mem=477m console=ttyMSM2,115200n8 androidboot.hardware=gelato' --kernel boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz -o boot.img --base 12200000 --pagesize 2048

It will create a boot.img file...and there you go. You've made your own Kernel... congrats :)
 

jcole20

Well-known member
Jan 3, 2012
428
56
0
Visit site
You'll just need to modify the mkbootimg command to fit the sliders kernel. If you unbootimg the kernel it'll create a mk-kernel file that gives you the appropriate code to repack the kernel... you'll have to edit the code to fit the syntax I explained above (for the slider that is). And you're welcome. :)

Sent from my LGL55C using Tapatalk