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)

freetype2 소스설치

혹시나해서

wget http://ftp.superuser.co.kr/pub/etc/freetype-2.2.1.tar.bz2
  tar xvfj freetype-2.2.1.tar.bz2
  cd freetype-2.2.1
   ./configure && make && make install
  cd ..
  rm -rf freetype-2.2.1*

by 쥘씨 | 2008/12/04 08:23 | Linux | 트랙백 | 덧글(0)

[Fedora10] root로그인하기

9 까지는 부팅시 root접속이 가능하였지만

이번 10에서는 root로 로그인이 허용이 되지 않습니다.

이유야 모르겠지만 일단 해보도록 합시다.

터미널을 실행하고 /etc/pam.d/gdm 을 수정하도록 합니다.

vi로 보게되면 아래와 같이 나옵니다.
============================================================

#%PAM-1.0
auth     [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth       required    pam_succeed_if.so user != root quiet
auth       required    pam_env.so
auth       substack    system-auth
auth       optional    pam_gnome_keyring.so
account    required    pam_nologin.so
account    include     system-auth
password   include     system-auth
session    required    pam_selinux.so close
session    required    pam_loginuid.so
session    optional    pam_console.so
session    required    pam_selinux.so open
session    optional    pam_keyinit.so force revoke
session    required    pam_namespace.so
session    optional    pam_gnome_keyring.so auto_start
session    include     system-auth

============================================================

 붉은 글씨로 써져있는 라인을

auth       required    pam_succeed_if.so user = quiet

이렇게 수정해줍시다.



by 쥘씨 | 2008/12/04 07:16 | Linux | 트랙백 | 덧글(0)

[Fedora 10] SELinux끄기

매번 할때마다 파일한개한개씩 검사하고

상단부분에 자꾸 거슬리게 말풍선띄웁니다.

보안이 엄격하여 안전하다고 생각이 들지만 서버도아닌데다 개발환경이므로 그냥 꺼버리도록 합니다.

일단 /etc/selinux/config를 수정하는데

///////////////////////config내용입니다.////////////////////////////////
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#       targeted - Targeted processes are protected,
#       mls - Multi Level Security protection.
SELINUXTYPE=targeted
///////////////////////////////////////////////////////////////////////

윗부분의 붉은색 부분을 disabled 로 수정해줍니다.

by 쥘씨 | 2008/12/04 07:03 | Linux | 트랙백 | 덧글(0)

[Fedora10] 플래시 플러그인 설치

파이어폭스로 플러그인 설치가 안됩니다 ..

결국 수동 설치로 설치합니다.

adobe 홈페이지의 수동 설치중 yum 버전을 받아 설치합시다.

그후

터미널에

yum install flash-plugin

을 입력하시고

X윈도우를 재부팅 시켜봅시다.

단축키는 Ctrl + Alt + Backspace


by 쥘씨 | 2008/11/30 00:13 | Linux | 트랙백 | 덧글(0)

◀ 이전 페이지          다음 페이지 ▶