In this post we will walk through the steps to compile port the u-boot for the Freescale's Cortex A9 based Sabre Lite board.
The Tool chain
Freescale provides its own tool chain that it calls LTIB ( Linux Target Image Builder). You can download and install the toolchain from its website. It has a good documentation as well. However, in this post we will use a generic tool chain. There are certain advantage with the generic tool chain. You get accustomed to the generic compile environment that you can apply for other boards.
If you have not already installed ARM compiler tool chain, you can do so using
#apt-get install gcc-arm-linux-gnueabi
#apt-get install g++-arm-linux-gnueabi
This applies for the Ubuntu and debian ( has been tested on debian).
Next grab a fresh copy of the u-boot from
using git command
git clone https://github.com/boundarydevices/u-boot-2009-08.git
You should see a directory called u-boot-2009-08. Change to that directory
This u-boot has several branches. There is a branch that corresponds to the Android 13.4. To check it out use
git checkout origin/boundary-imx-android-r13.4-ga -b boundary-imx-android-r13.4-ga
( You can use similar command for future version. Just replace boundary-imx-android-r13.4-ga with the branch that you want to check out).
You can compile the source code using
We found that this compile gave the error, something like
arm-linux- not found.
To fix this open lib_arm/config.mk and change
CROSS_COMPILE ?= arm-linux-
CROSS_COMPILE ?= arm-linux-gnueabi-
And try compiling again using
If everything goes well, the code should compile and you should see u-boot.bin in your current directory.
We have captured the whole sequence in youtube
If you plan to boot your board using SD card, you can use the following dd command to copy u-boot.
dd if=u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2 conv=fsync