2009년 01월 12일
Android Zaurus RealPorting
상품스펙
OS:Linux(R)(Lineo ulinux)
CPU:Intel(R)XScale TM(PXA270 416MHz)
표시:640×480 도트, 3.7 형 65,536 색 투과형 시스템 액정 (백라이트)
기억용량 :Flash 메모리 128MB, SDRAM 64MB
하드 디스크:4GB(유저 에리어 약 3.9GB, 출하시 공간 용량 약2.2GB)
카드슬롯 : SD 카드 슬롯, 컴팩트 후레쉬 카드 슬롯 (Type II )×1
전원 : 대용량 리튬이온 충전지 (EA-BL11), AC 어답터
사용시간 : 연속 표시 약 7 시간
외형크기 (mm): 폭 약 124×두께 약 87×높이 약 25
질량:약 298g (터치펜, 보호카드, 충전지 포함)
$ mkdir -p openembedded/build/conf
$ cd openembedded
$ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake
$ wget http://www.openembedded.org/snapshots/OE.mtn.bz2
$ bunzip2 OE.mtn.bz2
$ sudo apt-get install monotone
$ mtn --db=OE.mtn checkout --branch=org.openembedded.dev
$ cp org.openembedded.dev/conf/local.conf.sample build/conf/local.conf
$ vi build/conf/local.conf
$ diff org.openembedded.dev/conf/local.conf.sample build/conf/local.conf
27c27
< BBFILES := "${@bb.fatal('Edit your conf/local.conf: BBFILES')}"
---
> BBFILES = "/path/to/openembedded/org.openembedded.dev/packages/*/*.bb"
60a61
> MACHINE = "spitz"
80c81
< # DISTRO = "angstrom-2007.1"
---
> DISTRO = "angstrom-2007.1"
112c113
< IMAGE_FSTYPES = "jffs2 tar"
---
> IMAGE_FSTYPES = "jffs2 tar.gz"
140c141,142
< # PARALLEL_MAKE = "-j 4"
---
> PARALLEL_MAKE = "-j 4"
> BB_NUMBER_THREADS = "2"
150d151
< REMOVE_THIS_LINE:="${@bb.fatal('Read the comments in your conf/local.conf')}"
Nowprepare some tools required to build. I did these installations while Iwas in try and error course, some might not be required.
$ sudo apt-get install help2man diffstat texi2html cvs gawk texinfo quilt autoconf
$ sudo apt-get install gcc-3.3
If you are using Ubuntu (like me), you need to install kernel build packages, too.
$ sudo apt-get install build-essentials kernel-package libncurses5-dev
To apply benno's android.diffin bitbaking time, modify the linux-rp_2.6.23.bb file. Also,linux-2.6.23.tar.bz2 in www.kernel.org already branched to some minorversions and not there anymore. So change the source toangstrom-distribution.org.
$ cd openembedded/org.openembedded.dev/packages/linux/linux-rp-2.6.23
$ wget http://benno.id.au/android/android.diff
$ cd ..
$ cp linux-rp_2.6.23.bb linux-rp_2.6.23.bb.kernel.org
$ vi linux-rp_2.6.23.bb
$ diff linux-rp_2.6.23.bb.kernel.org linux-rp_2.6.23.bb
20c20
< SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
---
> SRC_URI = "http://www.angstrom-distribution.org/unstable/sources/linux-2.6.23.tar.bz2 \
69a70
> file://android.diff;patch=1 \
$ cd openembedded/org.openembedded.dev/conf
$ cp checksums.ini checksums.ini.org
$ vi checksums.ini
$ diff checksums.ini.org checksums.ini
12888a12889,12891
> [http://www.angstrom-distribution.org/unstable/sources/linux-2.6.23.tar.bz2]
> md5=2cc2fd4d521dc5d7cfce0d8a9d1b3472
> sha256=d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb
Icame across a few errors while applying android.diff pacth, so Imodified android.diff a little. Here's my version of android.diff. androidzaurus.tar.gz
Start building toolchain. It takes very long. Telling you, veeerrrry looooong. With my Athlon 3500, I takes well half a day.
$ export PATH=~/openembedded/bitbake/bin:$PATH
$ export BBPATH=~/openembedded/build:~/openembedded/org.openembedded.dev
$ bitbake task-sdk
If fails, try some googles and bitbake task-sdk again.
To check the toolchain, try to build a minimal-image.
$ bitbake minimal-image
$ ls tmp/deploy/glibc/images/spitz/
NowI got kernel source tree. Try to retreive .config as defconfig-spitz.Also, turn Android specific configurations on. Here's my currentdefconfig-spitz. androidzaurus.tar.gz
$ cd openembedded/org.openembedded.dev/packages/linux/linux-rp-2.6.23
$ cp defconfig-spitz defconfig-spitz.org
$ cd tmp/work/spitz-angstrom-linux-gnueabi/linux-rp-2.6.23-r10/linux-2.6.23
$ make oldconfig
$ make menuconfig
$ cp .config /path/to/openembedded/org.openembedded.dev/packages/linux/linux-rp-2.6.23/defconfig-spitz
$ diff ../defconfig-spitz .config
1384a1392,1400
> # Android
> #
> # CONFIG_ANDROID_GADGET is not set
> # CONFIG_ANDROID_RAM_CONSOLE is not set
> CONFIG_ANDROID_POWER=y
> CONFIG_ANDROID_POWER_STAT=y
> CONFIG_ANDROID_LOGGER=y
>
> #
Let's build an Android-configured-Angstrom-kernel and console image.
$ bitbake linux-rp -c rebuild
$ bitbake console-image
Nowready to make Zaurus to Angstrom Zaurus. If you are new to altanativeROM (like me), first backup everything from your Zaurus. It is possibleto make your Zaurus to a dead brick.
Copy the fresh baked image to Zaurus. Note that commands with $ prompt are on the host PC. Lines with # prompt are on Zaurus.
$ cd tmp/deploy/glibc/images/spitz/
$ scp Angstrom-console-image-glibc-ipk-2007.11RC1-spitz-installkit.tgz root@zaurus:/home/root
$ ssh root@zaurus
# gunzip Angstrom-console-image-glibc-ipk-2007.11RC1-spitz-installkit.tgz
# tar xvf Angstrom-console-image-glibc-ipk-2007.11RC1-spitz-installkit
# mv Angstrom-console-image-glibc-ipk-2007.11RC1-spitz-installkit /your/sdcard/root
# poweroff
I forgot to take a memo of the default mount point. Please check with mount command.
Time to burn the Angstrom image. Angstrom installation on Spitz | The Angstrom Distribution shows how to flash very well.
1) Shutdown Zaurus with poweroff command.
2) Flip Zaurus and unlock the battery switch. Open the battery cover.
3) Push the reset switch. It's a small rectangle black one.
4) Put the battery cover back and the lock switch on.
5) While pressing OK key in the center of cursor key, press On/Off switch.
6) Select "Update" and press OK key.
7) Select "SD Card" and press OK key.
8) Say Yes to the warning.
9) Cross your fingers and hold your breath.
Playwith new Angstrom Zaurus and make sure you have ssh access to it. Itwould be better to modify /etc/network/interfaces to get rid of usb0 asdefault route. Just delete the gateway lines in usb sections.
$ ssh root@zaurus
# route del default
# vi /etc/network/interfaces
Now Android stuff. It's well explained in Google Android runs on Sharp Zaurus SL-C760. You also need Android SDK and unzip it.
$ cp /path/to/android-sdk/tools/lib/images/ramdisk.img ramdisk.img.gz
$ wget http://benno.id.au/android/system.tar.gz
$ wget http://benno.id.au/android/data.tar.gz
$ scp ramdisk.img.gz system.tar.gz data.tar.gz root@zaurus:/home/root
$ ssh root@zaurus
# gunzip ramdisk.img.gz
# gunzip system.tar.gz
# gunzip data.tar.gz
# mkdir android-root
# cd android-root
# cpio -iv < ../rammdisk.img
# tar xvf ../system.tar
# tar xvf ../data.tar
# vi a.sh
# cat a.sh
#!/system/bin/sh
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
mount -t proc proc /proc
mount -t sysfs sysfs /sys
/system/bin/app_process -Xzygote /system/bin --zygote &
/system/bin/dbus-daemon --system &
runtime
a.sh should be same as Google Android runs on Sharp Zaurus SL-C760.
Copyall of the device files to android-root. Then chmod the binder to 666.If you don't change the binder access mode, you will end up looking atred cylon forever.
# cd /dev
# tar cvf /home/root/dev.tar .
# cd /home/root/android-root/dev
# tar xvf /home/root/dev.tar
# chmod 666 binder
Final moment. Start Android.
# rm -f android-root/tmp/*
# umask 000
# chroot /home/root/android-root /a.sh
This could be a shell script as in Google Android runs on Sharp Zaurus SL-C760.
Have fun.
Todo is;
o Bring network up for Android applet.
o Keycode in android-root/etc/init.rc.
o Hack touch pannel driver to generate Android event.
o Vertical/Horizontal view style.
o Localization. I want my Japanese font and IM :-)
# by | 2009/01/12 16:42 | Linux | 트랙백 | 덧글(0)


