Porting Android to Older Kernel Version

Please, this is not tutorial, you’ll find some craps things here, so please DO NOT FOLLOW instruction below! just read it, maybe, you’ll find a clue for your own problems. I found people refer to this page and see nothing here, please refer to newer post, i have already update step by step porting, hope it helps. :-) [edited]

Yeah, this is the tittle, this morning i start after read from:

Android Internal, there is clear explanation about Android running on amadillo on 2.6.18 kernel version. It’s even older than mine, i use 2.6.19.2 then, the most pretiest thing is there is android kernel patch for 2.6.18. you can download it, here android4-linux-2.6.18at3.tar.bz2.

my plan is to reverse patch the kernel version to 2.6.18, then patch it against android4-linux-2.6.18at3.tar.bz2. Well sounds great, but there are more than problems.

uhm, there are so many thing to do. so just patch it to the silly things, errors and also stumbled codes:

$ patch -p1 < ../android4-linux-2.6.18at3.patch > ../patch3

$ grep Hunk ../patch3

now, i have applied android patch to 2.6.18. Let’s upgrade it to 2.6.19, just patch it against 2.6.19 patch, not reversely! Then upgrade it to 2.6.19.2, just do the same to related patch file, not reversely!

so now, i have 2.6.19.2 kernel version with android patch applied! Namaste! What the life, it’s easy!

then edit Makefile, edit SUBARCH=arm, CROSS_COMPILE=path/to/toolchain

make clean first.

$ make clean

$ make pxxx_defconfig

$ vim .config

edit

CONFIG_BINDER=y

CONFIG_LOW_MEMORY_KILLER=y

now compile the source, wait, take a glass of beer, and see what’s output on the console.

i got these :

drivers/video/mxc/mxcfb.c: In function ‘mxcfb_set_par’:
drivers/video/mxc/mxcfb.c:237: error: too few arguments to function ‘ipu_init_channel_buffer’
make[3]: *** [drivers/video/mxc/mxcfb.o] Error 1
make[2]: *** [drivers/video/mxc] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2

Well, i plan to edit this file. Just remember there are too much fuzz and FAILED ignored. so this is time to analyze. Stay tuned.

9 Comments

  1. shyjumon
    Posted April 15, 2008 at 12:08 pm | Permalink

    Hi
    I am also unlucky in this point. Do you find any fixes for the following error.

    drivers/video/mxc/mxcfb.c:237: error: too few arguments to function ‘ipu_init_channel_buffer’
    Thank you.
    Shyjumon N

  2. Posted April 16, 2008 at 5:21 am | Permalink

    Hi, basically, i don’t do anything with mxcfb.c, after facing that error. Then, i only patch android related driver (drivers/android*, drivers/binder, drivers/misc/lowmemorykiller ). Nothing to do with mxcfb. As it has it’s own pan display function.
    The last post i write about FBIOPAN_DISPLAY function in drivers/video/fbmem.c which call mxcfb_set_par all the time.

    What you have to do is add 0 to last argument inside binder.c :

    transaction_cache = kmem_cache_create(”binder_transaction_t”, sizeof(binder_transaction_t)+pad, 0, cache_flags, transaction_slab_xtor, 0);

    cheers

  3. shyjumon N
    Posted April 16, 2008 at 9:54 am | Permalink

    Hi Ruckuus,
    Thank you for the response. I am getting the following errors after the modification. I tried to put binder_modules.h mannually in include/linux/ path. but endup in more errors. Please look the following error. If you get any clues, please let me know.

    In file included from drivers/binder/iobuffer.c:20:
    drivers/binder/binder_defs.h:32:33: error: linux/binder_module.h: No such file or directory
    drivers/binder/iobuffer.c: In function ‘iobuffer_write_void’:
    drivers/binder/iobuffer.c:81: warning: initialization discards qualifiers from pointer target type
    make[2]: *** [drivers/binder/iobuffer.o] Error 1
    make[1]: *** [drivers/binder] Error 2
    make: *** [drivers] Error 2
    Shyjumon N

  4. Posted April 16, 2008 at 10:33 am | Permalink

    >I tried to put binder_modules.h
    >linux/binder_module.h: No such file or directory

    binder_module.h != binder_modules.h

  5. shyjumon N
    Posted April 16, 2008 at 10:50 am | Permalink

    Hi
    oops that was a typing mistake… i tried to put binder_module.h in include/linux/binder_module.h
    Sorry
    Shyjumon N

  6. Posted April 17, 2008 at 2:02 am | Permalink

    No such file or directory ? did you ?

  7. Shyjumon
    Posted April 17, 2008 at 6:55 am | Permalink

    Hi
    I just deleted everything and tried again. now i have binder_module.h in include/linux path and able to comple the kernel successfully. But i am unable to test it since i couldn’t yet get the useland filesystem image. Do you have any idea about it ? I was actually referring to one Japanese web page of brillant systems, but not able to download completely.
    How you build the android userland, can you can share those information ?

    Thanks and regards
    Shyjumon N

  8. Posted April 17, 2008 at 9:35 am | Permalink

    You can see here : http://ruckuus.wordpress.com/2008/03/29/step-by-step-porting/

  9. Posted April 17, 2008 at 9:35 am | Permalink

    and also, later post. :)

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*