Crosstool has stopped working for me, as it tries to download files from an FTP server which has had a bit of a re-structuring. The app of the day for cross-compiling is now crosstool-ng.
Download the latest version from here: http://ymorin.is-a-geek.org/download/crosstool-ng/, and put it into /opt/crosstool/build. Unpack and install:
./configure --prefix=/opt/crosstool
make
make install
export PATH="${PATH}:/opt/crosstoool/bin"
cd /opt/crosstool/build
ct-ng help
ct-ng menuconfig
For me, makeinfo and libtool were missing. I had to install the texinfo package to get the makeinfo program, and the xxx package to get the libtool program.
ct-ng build
I’m just getting into cross-compiling with GCC for various other bits of hardware. In the end, it is quite simple to do.
The first thing to do is download the crosstools bundle and unpack it (making sure you are not logged in as root!).
Then you need to create /opt/crosstool directory, and make sure it is owned by the mortal user that will do the building.
Then it is a matter of:
RESULT_TOP=/opt/crosstool
export RESULT_TOP
eval `cat file.dat file.dat` sh all.sh –notest
The file.dats depend on the target hardware. The following commands on the target may provide some clues as to which file.dats to pick:
uname -m (Host hardware)dmesg | grep gcc (Compiler used to build kernel)
/lib/libc.so.6 (GLibc version, and compiler version used to build it)
Here are some example build configurations:
Reciva Internet Radio: arm9tdmi.dat gcc-3.3.4-glibc-2.3.2.dat
Dreambox: mipsel gcc-3.3.4-glibc-2.3.3.dat
Freecom Network Storage Box: (possibly) armv5b-softfloat.dat gcc-3.4.4-glibc-2.3.6.dat
Netgear ADSL Modem:
By default, the crosstools compilers install in /opt/crosstool - add the following lines to your .bashrc
COMPILERS=`echo /opt/crosstool/*/*/bin | sed -e ’s/ /:/g’`
PATH=$PATH:$COMPILERS
And then when compiling, have the following in your Makefiles
CROSS:=arm-unknown-linux-gnu-
CC:=($CROSS)gcc
LD:=($CROSS)gcc
If you want to use a different compiler, you can always use:
make CROSS=arm-9dtmi-linux-gnu-
… for example !