1. Cross-development using CHICKEN for OpenMoko

Cross-development using CHICKEN for OpenMoko

(this text describes cross development for OpenMoko, for an older version of CHICKEN)

See cross-compilation for generic information about using CHICKEN for cross-development.

http://www.openembedded.org now includes the CHICKEN recipe, so you can just do <tt>bitbake chicken</tt> and get 4 packages: chicken, chicken-dbg, chicken-dev and chicken-doc.

But in case you want to do it manually: To compile chicken for OpenMoko, first install the Toolchain. Then

 . /usr/local/openmoko/arm/setup-env
 make PLATFORM=linux HOST=arm-angstrom-linux-gnueabi \
   C_COMPILER=arm-angstrom-linux-gnueabi-gcc LIBRARIAN=arm-angstrom-linux-gnueabi-ar \
   PREFIX=/usr ARCH= DESTDIR=$HOME/tmp/arm-chicken install
 cd $HOME/tmp/arm-chicken
 tar zcvf ../chicken-pkg.tgz .
 scp ../chicken-pkg.tgz root@moko:/tmp
 ssh root@moko
 cd /
 tar zxvf /tmp/chicken-pkg.tgz

You will have the binaries under /usr/bin, libraries under /usr/lib/chicken. csc and chicken-setup can work for compiling eggs, etc. if you have installed the native compiler, headers, and libs on the phone, but that requires a lot of space (e.g. mount a MicroSD card with ext3 filesystem at /usr, or boot from a MicroSD card; then <code>opkg install task-openmoko-native-sdk</code>).

Assuming you have installed the toolchain (see above), and also assuming you have installed arm-chicken with DESTDIR=/opt/arm-chicken rather than DESTDIR=$HOME/tmp/arm-chicken:

 . /usr/local/openmoko/arm/setup-env
 make PLATFORM=linux TARGET_PREFIX=/opt/arm-chicken \
   TARGETSYSTEM=arm-angstrom-linux-gnueabi  PREFIX=/opt/arm-cross-chicken \
 DESTDIR=/opt/arm-chicken /opt/arm-cross-chicken/bin/arm-chicken-install dbus