Toolchain

The toolchain is a set of binaries, system libraries and tools which allow you to build (in our case, cross-compile) u-boot and the kernel for a target platform. This will, to some limited extent, need to match the target rootfs. A large and incompatible change has taken place recently, through the Hard Float ABI. Now, two different debian and ubuntu ports are binary incompatible with each other.

Ubuntu 10.04
For Ubuntu 10.04 you can install a prebuilt toolchain like this very easily (newer Ubuntu version may have this pacakage by default): sudo add-apt-repository ppa:linaro-maintainers/toolchain

sudo apt-get update

sudo apt-get install gcc-arm-linux-gnueabi

Linaro toolchain
One option is to get a linaro released toolchain. Ignore most of the files there. Take the gcc-linaro-arm-linux-gnueabihf-4.7-{milestone}_linux.tar.xz file and untar it. You will find a bin directory in there. Temporarily add it to the environment you are building from:

export PATH="$PATH":/home/user/folder/gcc-linaro-arm-linux-gnueabihf-*_linux/bin/

Recent linaro toolchains are Hard Float (hf), which only runs us into one issue with u-boot. This will be used throughout the document. Wherever you see something like

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

Replace arm-linux-gnueabihf- with arm-linux-gnueabi- if your are not using a hardfloat toolchain.

'''WARNING: Do not use the 4.8 gcc versions of the linaro toolchain, those seem to have issues building the kernel. Use an earlier version instead.'''

Debian
To install Cross-development Toolchains for Debian follow the instructions on emdebian.org.

Note: Emdebian's armhf-toolchain is only available for Debian/unstable at the moment. So in order to use it, you have to use Debian/unstable as host system.

Edit your /etc/apt/sources.list as approriate and advised above: deb http://www.emdebian.org/debian/ unstable main Install Cross Compiler and build utilities: apt-get update apt-get install emdebian-archive-keyring apt-get install gcc-4.7-arm-linux-gnueabihf g++-4.7-arm-linux-gnueabihf apt-get install build-essential git debootstrap u-boot-tools Create symlinks to specific version of the cross-compiler-tools: ln -s /usr/bin/arm-linux-gnueabihf-gcc-4.7 /usr/bin/arm-linux-gnueabihf-gcc ln -s /usr/bin/arm-linux-gnueabihf-gcov-4.7 /usr/bin/arm-linux-gnueabihf-gcov ln -s /usr/bin/arm-linux-gnueabihf-g++-4.7 /usr/bin/arm-linux-gnueabihf-g++ ln -s /usr/bin/arm-linux-gnueabihf-cpp-4.7 /usr/bin/arm-linux-gnueabihf-cpp