Kernel Devs: Write a kernel once, and have it work on any ROM

Discussion in 'Android Roms' started by koush, Apr 6, 2010.

  1. koush
    Offline

    koush Premium Member Premium Member Developer

    Joined:
    Mar 22, 2010
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Here's an update.zip template that lets you flash a kernel to ANY ROM, regardless of ramdisk. How it works:

    updater-script runs and extract the boot.img from your current ROM.
    It unpacks the boot.img into kernel and ramdisk.
    It repacks newboot.img with the new kernel and the same ramdisk.
    It flashes the newly created boot image.

    If you distribute your zImage and tiwlan in this format, it will work with *any* ROM. No need to repack per ROM anymore!


    http://koush.romraid.com//motorola/sholes/anykernel.zip
     
  2. bL33d
    Offline

    bL33d Member

    Joined:
    Jan 2, 2010
    Messages:
    819
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    illinois
    Ratings:
    +0
    Nice looking for diffrent kernels for diffrent rms got old.
     
  3. DroidxRage
    Offline

    DroidxRage Member

    Joined:
    Nov 17, 2009
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New England - Home of Champions
    Ratings:
    +0
    Damn, what else you brewing up over there Koush? ;)
     
  4. caboyzcoti
    Offline

    caboyzcoti Member

    Joined:
    Jan 23, 2010
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    so we have to wait for our kernel of choice to "If you distribute your zImage and tiwlan in this format, it will work with *any* ROM" for it to work for our kernel? or what am i doing wrong all i did was boot into clockwork apply update.zip and it changed my kernel. i did this again with sprecovery with the same results, i just thot id give it a shot another way. thanks for any help you might have
     
  5. koush
    Offline

    koush Premium Member Premium Member Developer

    Joined:
    Mar 22, 2010
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    If a kernel is distributed in this format, it will work with ANY ROM.
     
  6. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    Is there anyway to unpack an existing boot.img to get just the kernel without the header, ramdisk, etc? I have the perl script for unpacking the boot.img but dont fully understand how to use it. Seems like the boot.img has to be flashed onto your phone?
     
  7. koush
    Offline

    koush Premium Member Premium Member Developer

    Joined:
    Mar 22, 2010
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    You can use that perl script to do it, or on the device, you can use the included unpackbootimg binary after you dump it using dump_image.
     
  8. 19DroidRage84
    Offline

    19DroidRage84 Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    LC, KS
    Ratings:
    +0
    What I am trying to do is use one of bekit's kernels (I dont use cyanogenmod. No offense I just never use roms. Im trying to learn as much as possible). Ive been searching and his are the only kernels that I can find that will mount the ext partitions of the sdcard as /sd-ext. But I cant use the unpackbootimg binary since my phone wont boot up with one of his boot.img's. And I dont fully understand how to use the perl scripts.
     
  9. bgill55
    Offline

    bgill55 Silver Member Theme Developer

    Joined:
    Feb 8, 2010
    Messages:
    2,344
    Likes Received:
    8
    Trophy Points:
    103
    Ratings:
    +8
    Simply Amazing!! Thank you for your work!
     
  10. bL33d
    Offline

    bL33d Member

    Joined:
    Jan 2, 2010
    Messages:
    819
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    illinois
    Ratings:
    +0
    I hope p3droid starts useing this method I like his kernels.
     
  11. P3Droid
    Offline

    P3Droid Member

    Joined:
    Oct 30, 2009
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Hehehe, I updated all of my kernels to the format 2 days ago. You can get them through RomManager or directly from my website.
     
  12. bL33d
    Offline

    bL33d Member

    Joined:
    Jan 2, 2010
    Messages:
    819
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    illinois
    Ratings:
    +0
    sweet :icon_ banana:
     
  13. jrummy16
    Offline

    jrummy16 Premium Member Theme Developer Premium Member Developer

    Joined:
    Jan 25, 2010
    Messages:
    1,211
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Orange County, CA
    Ratings:
    +0
    Great work Koush.
     
  14. bL33d
    Offline

    bL33d Member

    Joined:
    Jan 2, 2010
    Messages:
    819
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    illinois
    Ratings:
    +0
    P3droid thanks ur kernels are so stable and include USB tether. :)
     
  15. teddyearp
    Offline

    teddyearp Senior Member

    Joined:
    Jan 13, 2010
    Messages:
    1,800
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Randle, WA
    Ratings:
    +3
    Well, just as an FYI, I tried one of your updated kernels this morning with my old DroidMod using rom manager to d/l and install and upon reboot it hung on the "M" forever. Battery pull and manual reboot to recovery, etc. got me back.

    So, maybe this anykernel doesn't quite work with "any" rom.
     
Search tags for this page
any kernel updater
,
dump rom and kernel anroid
,
extract android zimage
,
extract zimage
,
open a zlmage
,
open zimage
,
unpack android zimage
,
unpack boot.img
,
unpack-zimage.sh
,

unpackbootimg