-
Notifications
You must be signed in to change notification settings - Fork 58
Open Zaurus Build Instructions
Paul Guyot edited this page Dec 7, 2014
·
1 revision
To build OpenZaurus binaries, you need a cross compiler. The current binaries have been built with cross-gcc created with crosstools, and the Jamfile is configured for those compilers.
- Get crosstool 0.43
- Install MacPorts
- Inside crosstool directory, execute the following script, as root:
# allow to fetch files from the online-repositories
[ -r /opt/local/bin/wget ] || /opt/local/bin/port install wget || exit 1
# install GNU tools and override through $PATH
mkdir -p gnutools
[ -r gnutools/awk ] || ( /opt/local/bin/port install gawk && ln -s /opt/local/bin/gawk gnutools/awk )
[ -r gnutools/sed ] || ( /opt/local/bin/port install gsed && ln -s /opt/local/bin/gnused gnutools/sed )
[ -r gnutools/make ] || ( /opt/local/bin/port install gmake && ln -s /opt/local/bin/gmake gnutools/make ) # /usr/bin/make has builtin-rule for .m.c: which conflicts with the sources of gprof
[ -r /opt/local/bin/msgfmt ] || /opt/local/bin/port install gettext
echo awk is: $(which awk)
echo sed is: $(which sed)
echo make is: $(which make)
- Put the following script into the crosstool directory (call it start-crosstool.sh).
#!/bin/sh
export SHELL=bash
export PATH=`pwd`/gnutools/:${PATH}
screen -S crosstool bash -i
- Run the above script.
Linux kernel earlier than 2.6.11.3 does not compile with gcc 4, while Intel Macs only come with gcc4. For that reason, we need to compile with linux headers 2.6.11.3, with gcc3 or patch the linux headers. I suggest compiling with linux headers 2.6.11.3 as follows:
- Create a zaurus.dat file based on gcc-3.4.1-glibc-2.3.3.dat:
BINUTILS_DIR=binutils-2.15
GCC_DIR=gcc-3.4.1
GLIBC_DIR=glibc-2.3.3
LINUX_DIR=linux-2.6.11.3
GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.3
- Create a zaurus.sh script as follows:
#!/bin/sh
# This script has one line for each known working toolchain
# for this architecture. Uncomment the one you want.
# Generated by generate-demo.pl from buildlogs/all.dats.txt
set -ex
TARBALLS_DIR=$HOME/downloads
RESULT_TOP=/opt/crosstool
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP
#eval `cat arm-softfloat.dat gcc-3.4.1-glibc-2.3.3.dat` sh all.sh --notest
eval `cat arm-softfloat.dat zaurus.dat` sh all.sh --notest
echo Done.
- Run the above script (inside the crosstool environment).
- Using these cross compilers and Jam, build K and Einstein for OpenZaurus with
jam -starget=arm-linux -sjittarget=GENERIC
- Cf the BuildInstructions.
The default JIT Target (ARMLE) doesn't work yet. This is why you need to specify the jittarget on the command line.