First of all, I read an article by a Japanese blogger, Weboo, who successfully Android up on C-860. I appreciate Weboo for sharing his idea.
o Android run on Zaurus | Weboo! Returns. - All written in Japanese
What he has done is make a Android rootfs as a file on SD card and loopback mounted it, then chroot there. He clevery gets workaround mmap issue of jffs2.
After I posted Android Zaurus without chroot, I find tmpfs is very suitable. So, I gathered everything together and packaged it.
My Zaurus's /home directory is almost full, so I used /media/hdd, which is vfat and original Qtopia application data sits on.
$ ssh root@zaurusLooking good. Then, I went back to my PC and copied Android files.
# dd if=/dev/zero of=/media/hdd/android.img bs=512 count=131072
# mkfs.ext2 /media/hdd/android.img
# mkdir android-sd
# sudo mount -o loop /media/hdd/android.img android-sd/
# cd android-sd/
# ls
lost+found
$ scp /tmp/system.tar root@zaurus:/media/hddNow unpack them into the loopback mounted image file.
$ scp /tmp/data.tar root@zaurus:/media/hdd
$ scp /tmp/ramdisk.img root@zaurus:/media/hdd
$ ssh root@zaurusAlso, I copied binderdev.ko, start-up script and some useful files saved in my work directory.
# cd android-sd/
# tar xvf /media/hdd/sytem.tar
# tar xvf /media/hdd/data.tar
# cpio -iv < /media/hdd/ramdisk.img
# cp ~/work/a.sh a.shThis DNS points to OpenDNS.
# cp ~/work/qwerty.kl system/usr/keylayout
# mkdir -p lib/modules/2.6.23/kernel/drivers/binder
# cp ~/work/binderdev.ko lib/modules/2.6.23/kernel/drivers/binder
# cp ~/work/RotateView.apk data/app
# vi etc/default.prop
# cat etc/default.prop | grep net.eth0.dns1
net.eth0.dns1 = 208.67.222.222
One very important thing. I modified a.sh to mount tmpfs to /tmp. Add a line to a.sh
mount -t tmpfs tmpfs /tmpNow /tmp goes out to RAM. This is the reason why tmpfs required to boot this image up.
Once the image file has everything in it, copy it to SD card.
# umount android-sdOK. A new start-android.sh will be android-sd.sh
# cp /media/hdd/android.img /media/card
# cat -android-sd.shAs seen, the script insmod binderdev.ko if /dev/binder is not found. Then copy /dev files to Android's rootfs and change permission of binder device file.#!/bin/sh# ./android-sd.sh
mount -o loop android.img rfs
if [ ! -e /dev/binder ]; then
echo "No /dev/binder. Try to insmod it."
insmod rfs/lib/modules/2.6.23/kernel/drivers/binder/binderdev.ko
if [ ! -e /dev/binder ]; then
echo "failed."
exit 0
fi
fi
if [ ! -e rfs/dev/binder ]; then
cp -a /dev rfs
chmod 666 rfs/dev/binder
fi
umask 000
chroot ./rfs /a.sh
Have fun.
http://d.hatena.ne.jp/androidzaurus/