Kernel Development Discussion Thread

ivyvisors

Senior Member
Dec 29, 2010
233
52
I've still had no luck with building kernels. But I think that's more me than anything, as I'm quite new to android.

~ivy
 

SikYou

Member
Dec 25, 2010
180
17
We still need some work on recovery and the kernel source before we can cook some ROMs for Eclair, never mind other versions of Android

I'm going to try some changes to the framebuffering tonight and see where that gets me with the cwr port.

Sent from my nonsensikal froyo
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
I set my environment up via the guide here: Howto: Build a Kernel Port - CyanogenMod Wiki

To unpack and repack the boot.img, you will need to use the Pearl scripts. Be sure to specify --base 0x20000000 to the mkbootimg commandline when repacking.

To compile the kernel, you can just download the source from razor's github. Then get your config.gz, unpack it to .config, and do 'make oldconfig' followed by 'make -j4' (4 being the number of threads you want for the operation). Wait for it to compile, and the output will be a zImage.

You can repack the zImage with the extract ramdisk with a command like: repack-H.pl zImage ramdisk boot.img

Then use fastboot to either 'fastboot boot' to test, or do a 'fastboot flash boot boot.img' to make changes permanent.
 

ivyvisors

Senior Member
Dec 29, 2010
233
52
Thanks for this xaueious, I'm going to see what I can get going tonight when I get home =)

~Ivy
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
Just repeating myself here, but no changes were necessary to the kernel to get the recovery image 'working' as it stands.
 

Entropy

Member
Dec 24, 2010
42
1
thats really good news, can you run cwr off of it? if so its time to start looking at aosp code and maybe skipping froyo and going right to gingerbread.
Apparently a lot of architecture changes were made between froyo and gingerbread that have caused a lot of things to need to be reimplemented.

Probably best to get an open source eclair build running first - then there is at least have proper source for everything. (Some of the drivers are implemented in userland - for example Qualcomm GPS drivers are in userspace for the xdandroid froyo builds with the exception of some on-chip RPC stuff in the kernel.)
 

rictec

Member
Jan 30, 2011
127
24
hi
something is wrong on my setup
everytime i try to unpack with the unpack-H.pl i get 2 files
mtd0.img.kernel and mtd0.image-ramdisk.gz the problem is i cant gzip -dc i allways get not a gzip file
any ideas why?

and if i use unpack-bootimg.pl on the some file i get the ramdisk but the kernel this time is .gz..
now i m lost lol

help!! :)
 
Last edited:

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
Use dump_image instead of dd to dump the mtd. Or I think you need to trim off the trailing bits in the mtd dump.
 

rictec

Member
Jan 30, 2011
127
24
Use dump_image instead of dd to dump the mtd. Or I think you need to trim off the trailing bits in the mtd dump.

oh i was using the cat /dev/mtd
that dump_image is the same command used to do nandroid right?
 

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
Not sure. I haven't looked at the sources for nandroid. It's magic to me :D
 

rictec

Member
Jan 30, 2011
127
24
it worked with that file now your repack is telling me unknow command on the mkbootimg
at least i have a kernel and a ramdisk dir with no errors using the recovery nandroid backup ;)
why does mkbooting does this if i do it manually i got a 2.4 MB boot.img so something is still wrong

this was hard
after unpack my 2.4Mb packet file everything is there so i put it on my s7 and boot
the result
# busybox uname -a
Linux localhost 2.6.29-s70 #4 PREEMPT Sun Mar 6 14:18:53 WET 2011 armv7l GNU/Linux
now how do we put wireless in there too?
;)
 
Last edited:

xaueious

Administrator
Staff member
Jul 9, 2010
3,483
436
Very nice :D

You can drop it in the folder, then modify the makefile and the kconfig files in /driver/net/wireless/

I did make more changes to my makefile of bcm4329 because it was missing a few things. You can find the original by Huawei makefile under the src folder. I think I forgot to add the deep sleep EXTRA_CFLAG and I forgot what else.

Here:
http://www.androidtablets.net/forum...broadcom-bcm4329-android-2-1-a.html#post52752

I don't have GIT knowledge. I did use gitorious for about 2 weeks, but I redid my setup and I have no idea how to do this anymore.
 
Top