android 1.5 on gumstix overo
kernel source可從 embinux.org 取得,其中也包含android 1.5的source code,並且有做一些patch
ex: battery, and keyboard layout
Download and Compile Source
$ mkdir your_android_dir$ cd your_android_dir$ repo init -u git://labs.embinux.org/repo/android/platform/beaglemanifest.git/$ repo sync$ makeps: 關於repo,參考http://source.android.com/download的Installing Repo
Compile kernel
$ cd your_android_dir/kernel$ export CC_PATH=/home/vanix/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-$ make menuconfig由於板子的關係,額外勾選gumstix overo and USB host$ vi ../vendor/embinux/support-tools/beagle_build_kernel.shcomment the codes about make config and make clean$ ../vendor/embinux/support-tools/beagle_build_kernel.sh此時只會build,不會刪除剛設定好的.config
Install Android Root Filesystem into SD Card
$ cd your_android_dir/out/target/product/generic$ cp -a root/* /media/disk/$ cp -a system/* /media/disk/system/$ cd /media/disk/$ chown -R root.root *$ chmod -R 777 data/ system/ps: 要注意init.rc的mount ro xxx此行是否有註解掉
Boot arguments
$ setenv mmcargs setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootdelay=2 omapfb.mode=dvi:800x480MR-16@60 init=/init$ setenv mmcargs setenv bootargs console=ttyS2,115200n8 androidboot.console=ttyS2 root=/dev/mmcblk0p2 rootdelay=2 omapfb.mode=dvi:800x480MR-16@60 init=/initdss參數的寫法時常有變動,可參考kernel內的Documentation/arm/OMAP/DSS
Other Setting
參考之前另一篇android on gumstix overo
Other Problems
- 800x480 on OLED panel - 1. dss參數下正確即可 2. kernel要support GPIO and 開機時立即執行gpio shell
- Battery - 開機後立即halt,android porting discussion有好幾種解法,其中之一的解法:更改的com_android_server_BatteryService.cpp
- touch功能 - 板子並無外接touch panel,導致一些apps無法正常運作,android porting 相關discussion,修改frameworks/base/libs/utils/ResourceTypes.cpp
- 取出android SDK 1.5的file system - 參考Extract google android file system image
- 用android SDK 1.5 fs裡的system/,取代我們編譯好的system/,但是會遭遇上述2跟3的問題,將自己編好的libandroid_servers.so和libutils.so取代原本的檔案即可解決
Alsa Setting
這個部份查到的資料比較繁瑣,另外獨立出來整理
Kernel的部份
$ make menuconfigDevice driver -> sound driver -> alsa -> 將相關的選項都打勾$ make$ cp arch/arm/boot/uImage /media/FAT
Android source的部份
$ cd your_android_dir/external$ git clone git://android.git.kernel.org/platform/external/alsa-lib.git$ git clone git://android.git.kernel.org/platform/external/alsa-utils.git$ cd your_android_dir/hardware$ git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git$ vi your_android_dir/build/target/board/generic/BoardConfig.mk BOARD_USES_ALSA_AUDIO := trueBUILD_WITH_ALSA_UTILS=true# BOARD_USES_GENERIC_AUDIO := true$ vi your_android_dir/system/core/init/devices.c{ "/dev/snd/", 0664, AID_SYSTEM, AID_AUDIO, 1 },(事後發現這行似乎沒有作用, 還是得自行mkdir /dev/snd, 可參考init.rc)$ cd your_android_dir$ make$ vi your_android_dir/out/target/product/generic/root/init.rc# set the alsa audio drivermkdir /dev/sndsymlink /dev/pcmC0D0c /dev/snd/pcmC0D0csymlink /dev/pcmC0D0p /dev/snd/pcmC0D0psymlink /dev/controlC0 /dev/snd/controlC0symlink /dev/timer /dev/snd/timerchmod 0777 /dev/snd/pcmC0D0cchmod 0777 /dev/snd/pcmC0D0pchmod 0777 /dev/snd/controlC0chmod 0777 /dev/snd/timerchown root audio /dev/snd/controlC0chown root audio /dev/snd/pcmC0D0cchown root audio /dev/snd/pcmC0D0pchown root audio /dev/snd/timersetprop alsa.mixer.playback.master Frontsetprop alsa.mixer.capture.master Capturesetprop alsa.mixer.playback.earpiece Mastersetprop alsa.mixer.capture.earpiece Capturesetprop alsa.mixer.playback.headset Mastersetprop alsa.mixer.playback.speaker$ vi your_android_dir/system/etc/asound.confsample: asound.conf for TWL4030 on OMAP(reference this discussion from android porting)
留言
張貼留言