[HOW-TO] Build your own kernel package from source

so if wifi doesn't work, is there an easy way to fix it instead of building and packaging and installing everything over again?
 
Just signed up to say thanks for this guide. I am using ti for an incredible S, but with a few tweaks it is stil very relevant! Great write up!
 
I'm having some problems following this for my Huawei U8150 running Froyo.

Problem 1: I'm unable to extract the ramdisk from the boot.img file. It complains about it not being gzipped.
Problem 2: I'm not really sure if I'm using the right wlan.ko file for this. My phone doesn't appear to have one, but it does have a system folder in the ROM that includes a wifi folder and a "ar6000.ko" file. Should I rip that out of my existing ROM?
I had the same Problem 1, use unpack-bootimg.pl - worked for me.

I too have a problem, though. I can't boot my own kernel on the U8150. It seems to compile fine - I use the sources from Huawei without modification and make with the .config file from my device. Then, in fastboot, when I try to boot from my compiled kernel and the original extracted Ramdisk, like so:
Code:
fastboot -c "mem=211M console=ttyMSM2,115200n8 androidboot.hardware=huawei console=ttyUSBCONSOLE0 androidboot.console=ttyUSBCONSOLE0" -n 4096 -b 0x00208000 boot clean.img-kernel.gz orig_boot.img-ramdisk.cpio.gz
the phone just shows the splash screen, as if the base address is wrong. I've tried 0x00208000 as indicated by the original boot.img and 0x00200000 - the default in the .config file - neither seems to work. But if I pass the kernel that I extracted from the boot partition the above command works fine. Any ideas?
 
I get my kernel mostly compiled, but then the build fails because "/bin/sh minigzip: not found" when the compiler tries to gzip (or maybe gunzip) the config_data.

I looked into it and minigzip is a part of zlib and I for sure have zlib installed. Maybe I have to symlink something? Ideas? I'm very new to linux and the android kernel.
 
Last edited:
Nice tutorial. I have tried this and got it working for the Nexus One. Can anyone advise me if these steps remain the same if I am building kernels for other phones ( Samsung Galaxy S 4G in particular) I compiled and got the zImage (source obtained from Samsung opensource site) , but am unsure as to how to go about obtaining the ramdisk. /proc/mtd or /dev/mtd seem to be missing...
 
Hi gbhil,
Your post has been very useful for me. :)
I was actually trying to make the DigitalPersona 4500 fingerprint reader work with a M701 pad with Android 2.3.
I had passed the kernel and driver compilation step.
Now, i need to deploy the app into the Android pad.
Will let you know how it goes ;)
 
gbhil,

when i am trying to load the myBoot.img the device went black within 5 secs of boot.
When i ran the image like this in emulator like,
./emulator -kernel ~/kernel-test/myBoot.img -show-kernel -verbose -avd haipad-demo
it gave me this error:
Code:
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /home/mahiti/android-sdk-linux_x86/tools/ddms
emulator: ping command: /home/mahiti/android-sdk-linux_x86/tools/ddms ping emulator 10.0
Unknown cp14 read op1:3 crn:5 crm:13 op2:1
qemu: fatal: goldfish_switch_write: Bad offset ffc

R00=ff019000 R01=000005a1 R02=00000100 R03=00000000
R04=fd9633d0 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=00000000
R12=00000000 R13=00000000 R14=00810020 R15=00010000
PSR=000001db ---- A und32
Aborted
what cud be the issue? :confused:
 
I wanted to mention here, something I recently learned.
if you have fastboot working for your device, you can test boot your new kernel without actually burning it into your device with flash_image (or a different variant of the fastboot command.)
with your phone fully booted and connected by cable to pc,
Code:
adb reboot bootloader
and after it reboots into the fastboot screen,
Code:
fastboot boot /path/to/boot.img
a software reboot or battery pull/restart should boot from your regular boot partition.

fastboot can also combine a ramdisk.gz and zImage with a command line and boot from or flash the result.
type fastboot with no arguments to see its full parameters.

hopefully this can help avoid unnecessary short-term brickings and ease testing slightly.

this its a great walkthrough, OP! thank you!
 
Hi Everybody,
Hope that all is well with you
I am new to this forum and I found it after some search for my question. Now I am writing to find out the answer to these questions: Did I come to the right place?, Is this what I need exactly?

Let me write about my main question.
Actually I am new to Android too, I am working as a java programmer and android optimizer in a team from two weeks ago.
The project is related to VOIP and transfer voice over LAN. we have a hardware device (with arm CPU) and want to run our customized Android on it for our special purpose.
For example we don`t need some applications like browser, music player, etc at all.
our customizing of Android is not just limited to omitting some user level applications. Since we want to improve our processing speed, we need to build our own android ,customized and optimized one.

Thanks in advance for your help...
 
mm/page-writeback.c: In function 'write_cache_pages':
mm/page-writeback.c:820: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <i can't post link> for instructions.
make[1]: *** [mm/page-writeback.o] Error 1
make: *** [mm] Error 2

i am on 2.6.32.9 kernel , i am trying to make rom for huawei u8120 . i can't find mistake on that line , and google , is not giving me the answer i am looking for . plz help me
 
I have an HTC Evo View 4G, and I'm interested in compiling my own custom kernel for it.

I have compiled AOSP ROM's and CM9 before, but now I want to try custom kernels because it seems to be the next level. I downloaded HTC's kernel source for the View, but what I'm really interested in is customizing it. I'm curious about updating it to a more recent version of the Linux kernel, is that possible? If not, what are some general optimizations that I could work on?

After pulling the config file from the device, what would happen if I dropped it into the generic Android kernel source from their GitHub? Would it make a functional kernel? Say I wanted to make a kernel based on Android-3.3, or a different branch of the source, how would that work?

And also, this thread is from almost 2 years ago, and was for the HTC Hero. What has changed since then? What do I need to know now that could help me understand all of this better?

Sorry to put so many questions in a single post, but I have them so I figured I should try asking them!
 
I have an HTC Evo View 4G, and I'm interested in compiling my own custom kernel for it.

I have compiled AOSP ROM's and CM9 before, but now I want to try custom kernels because it seems to be the next level. I downloaded HTC's kernel source for the View, but what I'm really interested in is customizing it. I'm curious about updating it to a more recent version of the Linux kernel, is that possible? If not, what are some general optimizations that I could work on?

After pulling the config file from the device, what would happen if I dropped it into the generic Android kernel source from their GitHub? Would it make a functional kernel? Say I wanted to make a kernel based on Android-3.3, or a different branch of the source, how would that work?

And also, this thread is from almost 2 years ago, and was for the HTC Hero. What has changed since then? What do I need to know now that could help me understand all of this better?

Hi. I am also looking to build a View kernel. Have you found anymore useful information? Tiamat team has made a lot of headway on HTC devices lately. They're good guys. If you talk to them it'd be a good place to start. they can be found on freenode IRC at #Tiamat Let me know your progress or if I can assist in anyway.
Peace. Bill.

billdollar777@gmail.com

Sorry to put so many questions in a single post, but I have them so I figured I should try asking them!
 
[ASK]

Do you have link to download kernel sources for Samsung Galaxy mini?

Please help me,
Best Regards
 
Last edited:
Hello, I'm using a HTC Amaze 4G and I'm interested in building a jb kernel but HTC gave up on our phone long time ago with only ics kernel source code so I I'm just wondering what are the major difference in jb n ics kernels I googled alot but didn't have a satisfying answer anywhere :) every kernel dev is bailing on it due to a lot complications so just wondering what are the major differences I like to give it a try so I can port sense 4+ or 5 to Amaze 4G :) thanks...
 

Latest posts

Trending Posts

Forum statistics

Threads
956,461
Messages
6,968,359
Members
3,163,550
Latest member
jimmyrichard