Step by step porting

Following previous post, this is step by step porting notes.

  1. Log in from minicom
  2. mount /dev/mmcblkop1 -> i use SDCARD to put android data and system.
  3. i get android android image from : http://androidzaurus.up.seesaa.net/image/android-sdboot-image.tar.gz
  4. mount it -> mount -o loop android.img androidroot/
  5. make symbolic link to data and system
           ln -s /android/androidroot/system /system
           ln -s /android/androidroot/data /data
  1. export android environment variables
                export PATH=/sbin:/system/sbin:/system/bin:$PATH
                export LD_LIBRARY_PATH=/system/lib
                export ANDROID_ROOT=/system
                export ANDROID_ASSETS=/system/app
                export ANDROID_DATA=/data
                export EXTERNAL_STORAGE=/sdcard
                export DRM_CONTENT=/data/drm/content
  1. These steps :

/bin/chmod -R a+rw /data /tmp
/bin/rm -r /dev/log
cd /dev
/bin/ln -s /var/tmp/log log
/bin/rm -f log/*
/bin/touch log/main
/bin/touch log/events
/bin/touch log/radio
cd /

/bin/chmod -R a+rw /dev/binder

  1. i forgot these :

copy all android etc file
cp /android/androidroot/etc/* /etc -R

  1. disable autostart in in /etc/init.rc for dbus-daemon, app_process and runtime.

zygote {
exec /system/bin/app_process
args {
0 -Xzygote
1 /system/bin
2 –zygote
}
autostart 0
}
runtime {
exec /system/bin/runtime
autostart 0

}

  1. chroot to androidroot

chroot ./androidroot
run init ./init

  1. see android home screen on LCD

this is tricky method as i never get android home screen. First running OS is OSELAS with 2.6.19.2 kernel version. The most important thing is about to port binder driver to the kernel so that android runs properly. While binder come with android kernel source which is 2.6.23 version, this is gonna be little bit effort to port binder to lower kernel version. I get patches from Brilliant Service who successfully port android to 2.6.18 kernel (Armadillo). You can get it here Brilliant Service

First i apply all patch and there were too much error related to binder driver and kmem_cache_create. I guess there will be no problem if i don’t apply mxcfb.c patch (some developers said that there must be double buffering) because i get it in mxcfb.c (originally shipped with it’s kernel)

/* Default Y virtual size is 2x panel size */
fbi->var.yres_virtual = fbi->var.yres * 2;
So, i only need to build binder , lowmemorykiller, and android driver. I got compiled kernel and flash uImage to the SBC. Another change in config file is only CONFIG_BINDER=y, CONFIG_ANDROID_RAM_CONSOLE=y and CONFIG_LOW_MEMORYKILLER=y. I added them after make pcm037_defconfig.

lcd.jpg

Anyway, i did not test more into network and another function. The touchscreen still not working.

15 Comments

  1. Posted April 1, 2008 at 9:58 am | Permalink

    Halah, halah.. tinggal nge-drunk kita ..
    yuuuu…

  2. Shyjumon N
    Posted April 17, 2008 at 2:18 pm | Permalink

    Hi
    I have untared the given link (http://androidzaurus.up.seesaa.net/image/android-sdboot-image.tar.gz)
    in step 1 and then i have extracted the file system to my CF card. made this CF as the rootFS and booted system. I am getting the following errors: please have a look , do u have any clues on it.
    VFS: Mounted root (jffs2 filesystem).
    Freeing init memory: 120K
    init: HOW ARE YOU GENTLEMEN
    init: reading config file
    Shyjumon N

  3. Posted April 18, 2008 at 2:18 am | Permalink

    Hi,
    make sure you have /dev/binder first. everyone faces the same at the first time.

  4. Shyjumon
    Posted April 18, 2008 at 6:38 am | Permalink

    Hi
    I don’t have /dev/binder in my RFS. But in my kernel i have build the binder statically. One more thing is the RFS has “/lib/modules/2.6.23″ and it has some modules also. But my kernel is 2.6.18, will this matters ?
    As you said people face this problem during first time, do you have any fixes for this ?
    Shyjumon N

  5. Posted April 18, 2008 at 7:43 am | Permalink

    i’m not sure you did the same steps with me. Do you build your android filesystem or using chroot ?

  6. Shyjumon N
    Posted April 18, 2008 at 10:55 am | Permalink

    Hi
    Thank you so much. I am able to run android on my Armadillo board.
    I Just used your “http://androidzaurus.up.seesaa.net/image/android-sdboot-image.tar.gz”
    and i kept untar it to my board’s hda.
    I used my normal RFS to boot the system and then mount the hda partition in /mnt
    [armadillo-500]# cd /mnt
    [armadillo-500/mnt]# ./android-sd.sh
    The android started on screen.
    I am trying to build this android RFS to mtdblock of my armadillo, I may come back with few more interesting questions. Hope you won’t be bugged by me…
    Thank you once again for extending support.
    Cheers!!! here it is friday so gonna enjoy with hell lot of beers….
    Shyjumon N

  7. Posted April 19, 2008 at 12:58 am | Permalink

    Great!!! nice to know one more android runs on the hardware. You did a great job Dude. Anytime, you’re most welcome.
    > Hope you won’t be bugged by me…
    ahahaha i was in your position too. Don’t think that way. :)

    Cheers

  8. Shyjumon N
    Posted April 21, 2008 at 11:09 am | Permalink

    Hi Ruckuus,
    I am trying to boot my system with android from CF boot. (rootfs in /dev/hda ) i am getting the following and then display just shows the android loading symbol (red ball moving horizontally) after that it keep on doing the same, but not showing android main screen even if i wait for half an hour…

    init: reading config file
    init: device init
    init: mtd partition -1,
    init: mtd partition 0, “nor.bootl
    init: mtd partition 1, “nor.kerne
    init: mtd partition 2, “nor.userl
    init: mtd partition 3, “nor.confi
    init: mtd partition 4, “nand.ipl”
    init: mtd partition 5, “nand.kern
    init: mtd partition 6, “nand.user
    init: mtd partition 7, “nand.free
    sh: can’t access tty; job control turned off
    # binder_open(c07ff438 c3e1bdc0) (pid 1603) got c36ff000
    binder_open(c07ff438 c3e1bb40) (pid 1617) got c23c5000
    binder_open(c07ff438 c3e3d940) (pid 1653) got c167a000
    binder_open(c07ff438 c3e3d6c0) (pid 1651) got c1769000
    binder_open(c07ff438 c3e3d3a0) (pid 1666) got c12c2000

    any idea or clues ??
    Shyjumo N

  9. Posted April 22, 2008 at 2:31 am | Permalink

    strace -ff -F -t -s 1000 -o /path/to/stracelog /system/bin/runtime

  10. Shyjumon N
    Posted April 23, 2008 at 5:46 am | Permalink

    Hi Ruckuus,
    Thank you once again.. I have completed booting android from HDD (my CF ). Actually i build a new RFS by merging your sd-card rfs and brillant system RFS. Now my board will boot directly to android….
    Thanks man for the helps….
    Shyjumon N

  11. Shyjumon N
    Posted June 5, 2008 at 6:18 am | Permalink

    Hi Ruckuus
    Again me… Do you have any idea on how we can extract the RFS from the emulator. Do know where the emulator code put by android team?
    I have successfully ported m5-rc15 on target…
    Shyjumon N.

  12. Posted June 5, 2008 at 11:15 am | Permalink

    make an SD image
    run the emulator and using created SD image
    -sdcard {SDimage}

    tar the RFS using busybox and save to /sdcard
    done

  13. Shyjumon N
    Posted June 5, 2008 at 1:23 pm | Permalink

    Hi Ruckkus,
    I got it… I didn’t create sdcard… but used the busybox. I was taking the data and system separately…
    Thanks for the idea to create sdcard.

  14. Shyjumon N
    Posted October 14, 2008 at 11:32 am | Permalink

    Hi Ruckkus,
    Hope your doing fine.
    I am trying to extract beta version and 1.0 version RFS.
    Have you tried to port the latest versions ?
    I am getting the following error while i boot with new RFS (beta and 1.0 version):
    “init: could not open initlogo.rle ”
    Do you have any clues ?

    Thanks and regards,
    Shyjumon N.

  15. asyen
    Posted January 6, 2009 at 9:03 am | Permalink

    Hi Ruckuus,
    I had using the method directly execute the script file but it has problems below…
    Do you have any idea? tks

    ./android-sd.sh
    EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
    [\u@\h \W]#init: HOW ARE YOU GENTLEMEN
    init: reading config file
    init: device init
    init: mtd partition -1,
    init: mtd partition 0, “Bootloade
    init: mtd partition 1, “Kernel”
    init: mtd partition 2, “Filesyste
    init: mtd partition 3, “MassStora
    init: mtd partition 4, “BBT”
    sh: can’t access tty; job control turned off
    # binder_open(c12fbdb0 c167e340) (pid 1747) got c3b92000
    binder_open(c12fbdb0 c1790c20) (pid 2473) got c22ec000
    Command time out
    cmd:0×1080; addr:0x300a800; retcode:-2; state:5
    jffs2_flush_wbuf(): Write failed with -5
    Write of 45 bytes at 0x02daaff0 failed. returned -5, retlen 0
    Not marking the space at 0x02daaff0 as dirty because the flash driver returned r
    etlen zero
    read care wait loop…
    android_power: auto off timeout set to 604800 seconds


Post a Comment

Required fields are marked *

*
*

Follow

Get every new post delivered to your Inbox.

Join 631 other followers