This time, device driver. Say, some gadget you have but Angstrom doesn't support it, and you find a source code somewhere else. Will that really happen?
Anyway, same as previous article, downlaod the toolchain tar ball. Make sure choice is ARM
Download the ARM 2007q3 Release
Correction on Jan 18, 2008: A choice should be a pair of ARM GNU/Linux and IA32 GNU/Linux. We need -arm-none-linux-gnueabi-, not -arm-none-eabi-. Sorry for any inconvenience.
Then unpack it somewhere convenient for you.
$ cd /optThen download kernel source code from Google's Android distribution. You may also want .config file. I uploaded Angstrom's defconfig files as a sample.
$ sudo tar jxvf arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ sudo ln -s arm-2007q3 arm-cc
$ export PATH=/opt/arm-cc/bin:$PATH
$ export CC=arm-none-linux-gnueabi-gcc
Download, configure and build the kernel.
$ wget http://android.googlecode.com/files/linux-2.6.23-android-m3-rc20.tar.gzmake may ask you bunch of questions but simply [Enter] to choose default. Because the kernel itself will be useless anyway unless patch it properly. What we want here is a module driver. If you need to build the kernel, you better try OpenEmbedded bitbake for sure.
$ tar zxvf linux-2.6.23-android-m3-rc20.tar.gz
$ mv kernel linux-2.6.23-android-m3-rc20
$ cd linux-2.6.23-android-m3-rc20
$ wget https://androidzaurus.up.seesaa.net/image/defconfig-angstrom.tar.gz
$ tar zxvf defconfig-angstrom.tar.gz
$ cp defconfig/defconfig-spitz .config
$ CROSS_COMPILE=arm-none-linux-gnueabi- make
After build finishes, go back to configuration and build a module driver. Let's say binderdev, this time.
$ CROSS_COMPILE=arm-none-linux-gnueabi- make menuconfigIt looks like OK.
Device Drivers ---> [Enter]
Character devices ---> [Enter]
OpenBinder IPC Driver [Space] and make sure <M> at the top of Open Binder.
Then [Tab] to <Exit> and [Enter]
And, [Tab] to <Exit> and [Enter]
And, [Tab] to <Exit> and [Enter]
Say <Yes> to save configuration.
$ CROSS_COMPILE=arm-none-linux-gnueabi- make modules
$ file drivers/binder/binderdev.ko
drivers/binder/binderdev.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
Very few would be interrested I guess, hope that these tips save someone's sweat.
Cheers,
というわけで、CodeSourceryツールチェーンのシリーズ、ラストです。多分。
今回はドライバモジュール。いったんカーネルをビルドしますが、カーネル自体は使えません。ザウルスでちゃんと使うには、ちゃんとパッチしないとダメです。OpenEmbeddedのbitbakeを使ってください。
あんまり、こんなノウハウが必要な人、いないとは思うけど。Angstromでipkgしてもドライバがないけど、どっかでソース拾ってきたけどビルドできるのかしらなどという方がいれば、参考にしてください。いるのか本当に?www
I'm trying to build this for myself, if you have the knowledge ... would you give me some hints?
Thanks.
Avatar Ng
Does the iPAQ H2200 have Armv5 or later CPU? If so, it might possible. Android binaries want EABI enabled kernel and older ARM lacks EABI capability.
iMX31 is one of the earliest target boards that Android run on.
Willcom shows off an Android prototype - Engadget
http://www.engadget.com/2007/12/11/willcom-shows-off-an-android-prototype/
http://www.youtube.com/watch?v=p8sQp3pZC6I
:)