Friday, February 29, 2008

國防役倒數計時器

===這篇是消毒文===
我在右上角新增了一個國防役倒數計時器,並非我在服役的公司受到了甚麼不公平的對待,或是畢業後就立刻要離職,而是將國防役結束當作人生一個階段的結束,期許自己在這之前能夠有些成績,現在還有600天,看來我要多加努力了。

Thursday, February 28, 2008

Reading XComposite Tutorial - GtkThumbnail


After reading the XComposite tutorial, I start to write a small widget to make thumbnail of a window. The original tutorial use QImage to show the thumbnail. My widget inherits GtkImage. Here is the code.

Tuesday, February 26, 2008

Nanaco流星拳


招式: Nanaco流星拳
發動方式: 鬥貓棒引誘
攻擊對象: 鬥貓棒
傷害點數: 10
耗費力氣: 50 (主人耗費100)
招式分解: http://picasaweb.google.com.tw/momodalo/Nanaco

冬天的享受


物品名稱: 不明功能木頭一塊
長度: 剛剛好橫跨浴缸
質料: 木頭
用途: 泡澡時放notebook, NDS, 湯麵, 便當, 九把刀的小說, 零食, 水果
備註: 建議連續使用時間不要超過一個小時,不然身體某些部位會變皺皺的

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