1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

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:
    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 New Member

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

    DroidxRage New Member

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

    caboyzcoti New Member

    Joined:
    Jan 23, 2010
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    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:
    0
    If a kernel is distributed in this format, it will work with ANY ROM.
  6. 19DroidRage84
    Offline

    19DroidRage84 New Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    LC, KS
    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:
    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 New Member

    Joined:
    Jan 30, 2010
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    LC, KS
    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 New Member Theme Developer

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

    bL33d New Member

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

    P3Droid New Member

    Joined:
    Oct 30, 2009
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    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 New Member

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

    jrummy16 Premium Member Theme Developer Premium Member Developer

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

    bL33d New Member

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

    teddyearp New Member

    Joined:
    Jan 13, 2010
    Messages:
    1,800
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Randle, WA
    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.
  16. teddyearp
    Offline

    teddyearp New Member

    Joined:
    Jan 13, 2010
    Messages:
    1,800
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Randle, WA
    OK, maybe my previous post was a bit vague.:mad:

    I like alot of the features of my CyanogenMod/koush rom, but at the end of the day, the only feature that keeps me with it is the USB tether that is mainly contained within the kernel itself. Over all, I find that the DroidMod ROM is the most stable/predictable as far as how it interacts and handles ringtones, alarms, notifications, and most of the other "little things".

    So, that being said, how can I use this template to get *any* kernel that allows me to overclock and has USB tethering enabled to work on DroidMod 1.0?
  17. teddyearp
    Offline

    teddyearp New Member

    Joined:
    Jan 13, 2010
    Messages:
    1,800
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Randle, WA
    Well, maybe this is just me and/or my phone. Maybe it just gave out from overclocking? I just thought I should post this URGENT info just in case anyone else tries to do what I tried to do as shown in my last two posts, especially in absence of the 'devs' responses:

    DON'T TRY WHAT I TRIED (this is where I am now):

    http://www.droidforums.net/forum/rescue-squad/37644-brick-not-brick.html

    Thanks.
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

,
zimage unpack