source: project/wiki/cross-compilation-on-open-moko @ 16634

Last change on this file since 16634 was 16634, checked in by svnwiki, 11 years ago

Changes applied for Anonymous coward (91.52.185.118) through svnwiki:

File size: 1.8 KB
Line 
1[[toc:]]
2[[tags: crossdev]]
3
4== Cross-development using CHICKEN for OpenMoko
5
6''(this text describes cross development for OpenMoko, for
7an older version of CHICKEN)''
8
9See [[cross-compilation]] for generic information about using
10CHICKEN for cross-development.
11
12[[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.
13
14But in case you want to do it manually:  To compile chicken for OpenMoko, first install the [[http://wiki.openmoko.org/wiki/Toolchain|Toolchain]].  Then
15  . /usr/local/openmoko/arm/setup-env
16  make PLATFORM=linux HOST=arm-angstrom-linux-gnueabi \
17    C_COMPILER=arm-angstrom-linux-gnueabi-gcc LIBRARIAN=arm-angstrom-linux-gnueabi-ar \
18    PREFIX=/usr ARCH= DESTDIR=$HOME/tmp/arm-chicken install
19  cd $HOME/tmp/arm-chicken
20  tar zcvf ../chicken-pkg.tgz .
21  scp ../chicken-pkg.tgz root@moko:/tmp
22  ssh root@moko
23  cd /
24  tar zxvf /tmp/chicken-pkg.tgz
25
26You 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>).
27
28Assuming 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:
29
30  . /usr/local/openmoko/arm/setup-env
31  make PLATFORM=linux TARGET_PREFIX=/opt/arm-chicken \
32    TARGETSYSTEM=arm-angstrom-linux-gnueabi  PREFIX=/opt/arm-cross-chicken \
33    TARGET_RUN_PREFIX=/usr PROGRAM_PREFIX=arm- install
34 
35  DESTDIR=/opt/arm-chicken /opt/arm-cross-chicken/bin/arm-chicken-install dbus
Note: See TracBrowser for help on using the repository browser.