2007년 12월 07일
Android porting ㅋ
뭐 내가 한건 아니고,
Android SDK 공개된 후 회사 분들 몇분들이 뚝딱뚝딱 하시더니..
며칠 전 괴성을 막~~ 지르시더니 성공 하셨단다.
오- porting 쪽으로 아무것도 모르는 나는 완전 신기신기-
나도 저렇게 함 해봐야 할텐데.. -_-;;;
나의 올해 목표가 어플 말고 더 아래로 공부해보자였구만 -_-;;
씁..
저 위에서 돌아가는 어플 만들어보려고 지금 자바 공부중인데..
흠.. 뭔가 내가 할수있는 장소?가 생겨서 인지 공부 더 열심히 해야겠다는 생각이.. ㅎㅎ;
porting 내용은 nemustech.blogspot.com에 올리고들 계신다.
이렇게 글을 쓰니 꼭 내가 만든것 같구만; ㅎㅎ;;;;
==========================================================================================
After digging Android a few days, we successfully ported Android to our evaluation board (PXA270, Intel Xscale ARM) including network and touch screen. We know some people already have done similar work with this, but we didn't find the actual working network/touch device yet.
So we want to share our experience with you guys.
Ok, here goes our working process,
We've chosen the target to Intel bulverde evaluation board. Why this one? Actually there is no technical reason. Just selected because we have this one for our Linux project, and thought Xscale would be fit for our project.
Here are the technical spec of our bd,
-------------------------------
Intel Bulverde evaluation board :
- PXA270 520MHz
- SDRAM 128MB
- NAND 32 MB
- 7inch TFT LCD : 800x480
- 2GB USB Storage
-------------------------------
Here are our porting procedure step by step.
* get Linux 2.6.23.8 from kernel.org
* Port 2.6.23.8 to target board
* CONFIG_AEABI=y
* CONFIG_BINDER=y
* CONFIG_LOW_MEMORY_KILLER=y
* CONFIG_INITRAMFS_SOURCE=""
* CONFIG_CC_OPTIMIZE_FOR_SIZE=y
--- EABI toolchain?
* Prepare Filesystems
* rootfs : jffs2 : using acumen270 rootfs as is
* extract android filesystem contents
* / : extract gzipped cpio
* /system & /data : download from benno(http://benno.id.au/blog/ )'s
* build ext2 fs images for /system & /data
* mount /system & /data
* put android files to /etc
init.rc default.prop system.conf system.d init.gprs-pppd init.ril hcid.conf
* put android init-modified in /
* if you have jffs2 for / patch /init
* modify with hexedit : "/system_property" -> "/tmp/sy_property"
* NOTE: jffs2 does not support memory mapped file
* patch /etc/init.rc
---- begin : init.rc
....
## qemu-init {
## exec /etc/qemu-init.sh
## }
network-property {
exec /etc/set_network.sh
}
....
----- end : init.rc
* put this script to /etc/
------ begin : set_networkprop.sh
export PATH=/sbin:/bin:/usr/bin:/system/bin
LOCALIP=`ifconfig|grep "inet addr" |head -1|sed -e
"s/.*addr:\([0-9\.]*\) .*/\1/g"`
DNSIP=`nslookup localhost|grep Address|head -1|sed -e "s/.* //g"`
/system/bin/setprop net.eth0.dns1 $DNSIP
/system/bin/setprop net.gprs.local-ip $LOCALIP
/system/bin/setprop ro.radio.use-ppp no
/system/bin/setprop ro.config.nocheckin yes
----- end : set_networkprop.sh
* Execute a-run.sh as root
----- begin : a-run.sh
export PATH=/system/sbin:/system/bin:/sbin:/bin:/usr/bin
export LD_LIBRARY_PATH=/system/lib
export ANDROID_BOOTLOGO=1
export ANDROID_ROOT=/system
export ANDROID_ASSETS=/system/app
export ANDROID_DATA=/data
export EXTERNAL_STORAGE=/sdcard
export DRM_CONTENT=/data/drm/content
### copy Android files to /etc if not exists there.
copy_if_not_in_etc () {
if /usr/bin/test ! -e /etc/$1; then
cp -vR /home/android/etc/$1 /etc
fi
}
copy_if_not_in_etc init.rc
copy_if_not_in_etc default.prop
copy_if_not_in_etc system.conf
copy_if_not_in_etc system.d
copy_if_not_in_etc init.gprs-pppd
copy_if_not_in_etc init.ril
copy_if_not_in_etc hcid.conf
copy_if_not_in_etc set_networkprop.sh
umask 000
/bin/chmod -R a+rw /data /tmp
/bin/chmod a+rw .
/bin/chmod -R a+rw data*
/init-modified &
------ end : a-run.sh
* have fun :)
you may see android with network enabled
-----------------------------------------------
* NOTICE
(1) you need world wide write permission on
* /data /tmp $PWD
* /dev/binder /dev/fb0
(2) never run dbus-daemon, app_process, runtime by yourself.
(android) init will do it for you
------------------------------------------------------------
Lesson Learned ;
* you don't need /data filesystem image from begining. /init will create
* you need /data /tmp write permissions for other(not root) users (app)
* w/o, app may killed with Segmentation Fault
* you need /init(of android) process for system property service
* / should be ramfs for memory mapped file /system_property created by /init
* you can edit /init with hexedit ; /system_property -> /tmp/sy_property
* you need system property service for network (net.eth0.dns1 for DNS
lookup)
* to see log (in strace detail) you need /dev/log/{main,events,radio}
* just do
# rm /dev/log (if you have)
# mkdir /dev/log;touch /dev/log/{main,events,radio}
* you can see usefull infos from strace log and /dev/log/main
* you may run /init on some directory with write permission.
* init create data/ databases on running directory which cannot found in
emulator.
------------------------------------------------
ok, done for now, we will keep posting our next improvement later.
If you have any question, leave a message to this blog.
Good Luck!
Android SDK 공개된 후 회사 분들 몇분들이 뚝딱뚝딱 하시더니..
며칠 전 괴성을 막~~ 지르시더니 성공 하셨단다.
오- porting 쪽으로 아무것도 모르는 나는 완전 신기신기-
나도 저렇게 함 해봐야 할텐데.. -_-;;;
나의 올해 목표가 어플 말고 더 아래로 공부해보자였구만 -_-;;
씁..
저 위에서 돌아가는 어플 만들어보려고 지금 자바 공부중인데..
흠.. 뭔가 내가 할수있는 장소?가 생겨서 인지 공부 더 열심히 해야겠다는 생각이.. ㅎㅎ;
porting 내용은 nemustech.blogspot.com에 올리고들 계신다.
이렇게 글을 쓰니 꼭 내가 만든것 같구만; ㅎㅎ;;;;
==========================================================================================
After digging Android a few days, we successfully ported Android to our evaluation board (PXA270, Intel Xscale ARM) including network and touch screen. We know some people already have done similar work with this, but we didn't find the actual working network/touch device yet.
So we want to share our experience with you guys.
Ok, here goes our working process,
We've chosen the target to Intel bulverde evaluation board. Why this one? Actually there is no technical reason. Just selected because we have this one for our Linux project, and thought Xscale would be fit for our project.
Here are the technical spec of our bd,
-------------------------------
Intel Bulverde evaluation board :
- PXA270 520MHz
- SDRAM 128MB
- NAND 32 MB
- 7inch TFT LCD : 800x480
- 2GB USB Storage
-------------------------------
Here are our porting procedure step by step.
* get Linux 2.6.23.8 from kernel.org
* Port 2.6.23.8 to target board
* CONFIG_AEABI=y
* CONFIG_BINDER=y
* CONFIG_LOW_MEMORY_KILLER=y
* CONFIG_INITRAMFS_SOURCE=""
* CONFIG_CC_OPTIMIZE_FOR_SIZE=y
--- EABI toolchain?
* Prepare Filesystems
* rootfs : jffs2 : using acumen270 rootfs as is
* extract android filesystem contents
* / : extract gzipped cpio
* /system & /data : download from benno(http://benno.id.au/blog/ )'s
* build ext2 fs images for /system & /data
* mount /system & /data
* put android files to /etc
init.rc default.prop system.conf system.d init.gprs-pppd init.ril hcid.conf
* put android init-modified in /
* if you have jffs2 for / patch /init
* modify with hexedit : "/system_property" -> "/tmp/sy_property"
* NOTE: jffs2 does not support memory mapped file
* patch /etc/init.rc
---- begin : init.rc
....
## qemu-init {
## exec /etc/qemu-init.sh
## }
network-property {
exec /etc/set_network.sh
}
....
----- end : init.rc
* put this script to /etc/
------ begin : set_networkprop.sh
export PATH=/sbin:/bin:/usr/bin:/system/bin
LOCALIP=`ifconfig|grep "inet addr" |head -1|sed -e
"s/.*addr:\([0-9\.]*\) .*/\1/g"`
DNSIP=`nslookup localhost|grep Address|head -1|sed -e "s/.* //g"`
/system/bin/setprop net.eth0.dns1 $DNSIP
/system/bin/setprop net.gprs.local-ip $LOCALIP
/system/bin/setprop ro.radio.use-ppp no
/system/bin/setprop ro.config.nocheckin yes
----- end : set_networkprop.sh
* Execute a-run.sh as root
----- begin : a-run.sh
export PATH=/system/sbin:/system/bin:/sbin:/bin:/usr/bin
export LD_LIBRARY_PATH=/system/lib
export ANDROID_BOOTLOGO=1
export ANDROID_ROOT=/system
export ANDROID_ASSETS=/system/app
export ANDROID_DATA=/data
export EXTERNAL_STORAGE=/sdcard
export DRM_CONTENT=/data/drm/content
### copy Android files to /etc if not exists there.
copy_if_not_in_etc () {
if /usr/bin/test ! -e /etc/$1; then
cp -vR /home/android/etc/$1 /etc
fi
}
copy_if_not_in_etc init.rc
copy_if_not_in_etc default.prop
copy_if_not_in_etc system.conf
copy_if_not_in_etc system.d
copy_if_not_in_etc init.gprs-pppd
copy_if_not_in_etc init.ril
copy_if_not_in_etc hcid.conf
copy_if_not_in_etc set_networkprop.sh
umask 000
/bin/chmod -R a+rw /data /tmp
/bin/chmod a+rw .
/bin/chmod -R a+rw data*
/init-modified &
------ end : a-run.sh
* have fun :)
you may see android with network enabled
-----------------------------------------------
* NOTICE
(1) you need world wide write permission on
* /data /tmp $PWD
* /dev/binder /dev/fb0
(2) never run dbus-daemon, app_process, runtime by yourself.
(android) init will do it for you
------------------------------------------------------------
Lesson Learned ;
* you don't need /data filesystem image from begining. /init will create
* you need /data /tmp write permissions for other(not root) users (app)
* w/o, app may killed with Segmentation Fault
* you need /init(of android) process for system property service
* / should be ramfs for memory mapped file /system_property created by /init
* you can edit /init with hexedit ; /system_property -> /tmp/sy_property
* you need system property service for network (net.eth0.dns1 for DNS
lookup)
* to see log (in strace detail) you need /dev/log/{main,events,radio}
* just do
# rm /dev/log (if you have)
# mkdir /dev/log;touch /dev/log/{main,events,radio}
* you can see usefull infos from strace log and /dev/log/main
* you may run /init on some directory with write permission.
* init create data/ databases on running directory which cannot found in
emulator.
------------------------------------------------
ok, done for now, we will keep posting our next improvement later.
If you have any question, leave a message to this blog.
Good Luck!
이 글과 관련있는 글을 자동검색한 결과입니다 [?]
- 임베디드 리눅스 세팅 및 개발환경 구축 by depiness
- xen 설치 (fedora) by eastcastle
- 임베디드 리눅스 - 환경 구축하기 by depiness
- Apache Tomcat 설치기 by Ego君
- iPod Touch Full JailBreak guide for WINDOWS by daftcoder
# by | 2007/12/07 18:14 | 공부 | 트랙백 | 덧글(0)





☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]