5.3 Linux Support 17
Note that this will take a looong time
2
. Find something else to do while
you wait.
When complete, you should find a whole slew of programs in your
/opt/crosstool/gcc-3.4.3-glibc-2.3.5/arm-xscale-linux-gnu/bin/ di-
rectory:
-rwxr-xr-x 1 username cvsd 1900724 Jul 18 20:48 arm-linux-addr2line
-rwxr-xr-x 2 username cvsd 1960214 Jul 18 20:48 arm-linux-ar
-rwxr-xr-x 2 username cvsd 3339533 Jul 18 20:48 arm-linux-as
-rwxr-xr-x 2 username cvsd 331791 Jul 18 21:35 arm-linux-c++
-rwxr-xr-x 1 username cvsd 1855723 Jul 18 20:48 arm-linux-c++filt
-rwxr-xr-x 1 username cvsd 331290 Jul 18 21:35 arm-linux-cpp
-rwxr-xr-x 2 username cvsd 331791 Jul 18 21:35 arm-linux-g++
-rwxr-xr-x 2 username cvsd 330887 Jul 18 21:35 arm-linux-gcc
-rwxr-xr-x 2 username cvsd 330887 Jul 18 21:35 arm-linux-gcc-3.4.3
-rwxr-xr-x 1 username cvsd 16265 Jul 18 21:35 arm-linux-gccbug
-rwxr-xr-x 1 username cvsd 102084 Jul 18 21:35 arm-linux-gcov
-rwxr-xr-x 1 username cvsd 2373278 Jul 18 20:48 arm-linux-gprof
-rwxr-xr-x 2 username cvsd 2622683 Jul 18 20:48 arm-linux-ld
-rwxr-xr-x 2 username cvsd 1937609 Jul 18 20:48 arm-linux-nm
-rwxr-xr-x 1 username cvsd 2454999 Jul 18 20:48 arm-linux-objcopy
-rwxr-xr-x 1 username cvsd 2595563 Jul 18 20:48 arm-linux-objdump
-rwxr-xr-x 2 username cvsd 1960209 Jul 18 20:48 arm-linux-ranlib
-rwxr-xr-x 1 username cvsd 429743 Jul 18 20:48 arm-linux-readelf
-rwxr-xr-x 1 username cvsd 1806673 Jul 18 20:48 arm-linux-size
-rwxr-xr-x 1 username cvsd 1780595 Jul 18 20:48 arm-linux-strings
-rwxr-xr-x 2 username cvsd 2454994 Jul 18 20:48 arm-linux-strip
-rwxr-xr-x 1 username cvsd 14395 Jul 18 21:47 fix-embedded-paths
5.3.2 Crosstool Embedded ( Das U-Boot) Toolchain
The instructions above can be followed to create a toolchain suitable for
cross-compiling Arm-Linux programs on a host machine. The needs for
building the boot loader are a bit different, though. In particular, the ’glibc’
reference above refers very specifically to userspace ”C” and ”C++” libraries
that defer much of their I/O to the Linux kernel itself through the use of
system calls.
Under Das U-Boot, no such system calls exist. In order to support this,
we need to build a Cross-compiler with a different set of switches. Thank-
fully, the current crosstool distribution supports that as well through the
use of a small library known as newlib from Red Hat.
The next couple of steps will do just that.
First of all, create a file named
crosstool-0.37/contrib/newlib/arm-elf-newlib-1.12.0.dat
and paste the following content into it.
TARGET=arm-elf
TARGET_CFLAGS="-O2"
BINUTILS_DIR=binutils-2.14
BINUTILS_URL=ftp://ftp.gnu.org/pub/gnu/binutils
NEWLIB_DIR=newlib-1.12.0
NEWLIB_URL=ftp://sources.redhat.com/pub/newlib
2
1 hr, 15 minutes on a 1GHz Athlon w/512MB of RAM
December 28, 2005 Revision 2.8