Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Sunday, March 30, 2008

Android and PTT

這個標題有點奇怪, 這兩個東西怎麼會有關系,
裡面甚至沒有一個字母是一樣的, 客官請聽我慢慢說來, 這是個有趣的故事,

上個月我寫了一篇Android porting Experience的文章,
其實純粹是紀錄自己porting的過程, 方便自己也方便別人查詢, 算是個經驗交流,
沒想到過了幾天居然有人在我另一篇blog留下了下面的言論.


這位網友實在是太可愛了 XD
所以我就跟他說可以email問我問題,
我們也交換了gmail, 後來gtalk了幾次,
雖然不知道我的談話有沒有解答他的疑惑,
但是他很信守承諾的給了我1688的Ptt幣,
下面是真相, 網友帳號我mark起來幫他保密 :)


我的帳號就從經濟裝況"赤貧"變成了這個樣子


從學生時代就接過不少case, 其中交易自然都是現金為主,
也做過一些open source的東西, 那就是大家興趣交流交流, 跟錢無關,
沒想到這次居然是用Ptt幣來做交換 XD
這樣我又有P幣可以去賭博了...科科

Wednesday, February 13, 2008

Android Porting Experience



Recently, I have spent 3 working days on porting Android to our PXA270 HW platform
Brief Condition:
HW:
PXA270 with PCI and IDE support
SW:
Linux 2.6.21 source code with our own driver (for PCI & IDE)
Linux 2.6.23 source code with android patch

Method:
1. porting customized driver from 2.6.21 to 2.6.23
2. porting android patch to 2.6.21

First of all, I must to explain what Android Kernel require.
1. EABI support
config:
CONFIG_AEABI=y
2. Thumb support
config:
CONFIG_ARM_THUMB=y
3. OpenBinder (from PalmSource)
file:
drivers/binder, include/linux/binder*
config: CONFIG_BINDER
4. Android Special Device
file:
drivers/android, include/linux/android*
config:
CONFIG_ANDROID_POWER
CONFIG_ANDROID_POWER_STAT
CONFIG_ANDROID_LOGGER

It looks like porting android patch into 2.6.21 is more simple. Therefore, I decide to use the second method. After porting drivers/android/*, EABI and Thumb. I can see a red-dot on the screen. Then I start to porting the openbinder to get into the Android desktop.

There are a lot of web pages talking about porting the Android binary into ARM platform. The steps is copy system/, data/, etc/, /init. And Writing a startup script to start Android. You can find these information in http://benno.id.au/blog/, http://nemustech.blogspot.com/2007/12/android-porting-to-real-target-hw.html. After I do all of this, the android still block in

clock_gettime(CLOCK_MONOTONIC, {127, 101400000}) = 0
clock_gettime(CLOCK_MONOTONIC, {127, 103070000}) = 0
clock_gettime(CLOCK_MONOTONIC, {127, 104026000}) = 0
futex(0x134ac, FUTEX_WAIT, -1, {4, 997000000}) = 0
Finally, I found that my rootfs is jffs2, but jffs2 can't support mmap and /init will be failed. I put everything into the IDE hard disk and format as ext2 and BINGO!!!!!
Here is a very useful reference discuss.
http://groups.google.com/group/android-internals/browse_thread/thread/93570c41bce07f16