2007년 12월 10일 월요일

Android Porting Notes


Here goes the porting guide of Android to real ARM device.

1) Frame Buffer
Android using "fb0" in following order.

1. /dev/graphics/fb0
2. /dev/fb0
You need to tune following factors
* frame buffer size
* use double buffer to "memory mapped files"
* you have to span virtual resolution 2x times in driver inside.
* xres_virtual = xres
* yres_virtual = yres * 2
* double buffering
* using IOCTL command, exchange coordination of yres to y 0

2) Touch Screen
* Android opens input device directly, and returns the absolute coordination of the screen.
* Porting TS-lib to driver and do normarlization of the coordination.
* Do auto calibration using "sysfs" in booting procedure

3) Network
* Android using OS (eg, Linux) network directly, but handle DNS directly.
* DNS lookup order follows
1. /system/etc/hosts lookup
2. system_property [net.eth0.dns1]
* system_property is provided android init process using unix domain socket @property_service
* You should run "init" process for network management.
* You should set up DNS 'net.eth0.dns1' using "/system/bin/setprop", "/etc/default.prop", "/data/local.prob"

4) Init process
Android init do make "device file" and...
1. /data and it's subdir.
2. execute /etc/init.rc
3. make /tmp/eventlog
4. provide system property using unix domain socket @property_service
load following order,
/etc/default.prop
/system/build.prop
/system/default.prop
/data/local.prop
* You shoud start "init" process for proper network/application setting.
* Init opens "/system_properties" and do memory mapping of it.
* JFFS2 filesystem does not support "write" operation of memory mapped I/O
* For device bootstrap, use it's own init program

댓글 7개:

xiaohua :

How to modify init file? When I use the originally init to bootup, it hang up at

init: mtd partition -1,

This message indicated that a fatal error has occurred when did mounting, how do you solve this problem? Could you please help me? I sent a mail to zaharang@gmail.com, please check it. Thank you very much!

익명 :

좋은 글 잘 보았습니다.
네이버 2008 코리아 안드로이드
http://cafe.naver.com/mobitoday.cafe
카페지기입니다.
저희 카페에 관련글을
포스트 좀 하겠습니다.

android :

hi!
I have ported android to my platform(pxa310). Touchscreen does not work,but it works in qtopia.
how to port?
could you give me detail infomation?
tkanks very much!

Ralph :

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


Ruth

http://systemmemory.info

VOIP Headphones :

This is great. I just saw a review of Professional Android 2 Application Development and thought I would get into programming again.

This is cool.

Android :

I have my Android phone connected to the adb shell and I want to be able to run a command that will allow me to open the Browser to browser wepages. I tried the settings and it worked

Android app developer :

This is one of the interesting post.I like your blog collection.supper.