How To Build U-Boot

U-boot is extremely easy to build. It only takes a cross-toolchain and a source tree to build a statically-linked binary. The following document provides the instructions needed to build U-Boot for a generic board.

Important Note: U-Boot is not necessarily built by Timesys for every board. There are some ports of U-Boot that can only be built using very specific toolchains. If you have difficulty building U-Boot for your platform, please consult LinuxLink Support to see if the given port is tested and supported.

Prerequisites

  • U-Boot sources — available in the Timesys Repository, through the Factory, or from Denx U-Boot FTP.
  • Cross Toolchain — available from Timesys through the Factory or Timesys Repository.

Procedure

  1. Download the sources and decompress the archive into a working directory.
  2. Enter the U-Boot directory.
  3. Configure U-Boot with the following command:
    make <board name>_config
  4. U-Boot uses a basic make command, with CROSS_COMPILE variable.
    make CROSS_COMPILE=<toolchain prefix>

    will compile U-Boot. The resulting file will be in the U-Boot root directory as u-boot.bin.

Example

The following commands will produce the file u-boot.bin, configured for the AT91SAM9260-EK:

$ tar xjf u-boot-2009.01.tar.bz2
$ cd u-boot-2009.01/
$ make at91sam9260ek_config
... with environment variable in SPI DATAFLASH CS1
Configuring for at91sam9260ek board...
$ make CROSS_COMPILE=armv5l-timesys-linux-gnueabi-

Known Issues

strip img2srec fails during build

This is typically caused by including the Timesys toolchain in your path. Rather than using your host strip utility, U-Boot ends up using the cross version instead. You can test this by running the command: which strip. If it shows anything other than /usr/bin/strip or /bin/strip, then there is a problem with your path.

Solution: Put the Timesys toolchain at the end of your PATH variable instead of at the beginning.

U-Boot target names

The following values can be used in U-Boot to build for the specified target. Use these in place of *<board name> in the configure step above.

When in doubt, you can check the Makefile in the root of the U-Boot source tree to see supported configuration targets.

Development Board U-Boot Board Name Applicable versions Comments
AMCC 440EPx sequoia v1.1.5 and newer U-Boot loaded from NOR flash
sequoia_nand v1.1.5 and newer U-Boot loaded from NAND flash
Atmel AT91SAM9260-EK at91sam9260ek All Store environment in Dataflash on CS1 (on-board chip).
at91sam9260ek_dataflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9260ek_dataflash_cs1 v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9260ek_dataflash_cs0 2009.01 and newer Store environment in Dataflash on CS0 (card).
at91sam9260ek_nandflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer Store environment in Nand.
Atmel AT91SAM9261-EK at91sam9261ek All Store environment in Dataflash on CS0 (on-board chip or card).
at91sam9261ek_dataflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9260ek_nandflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer Store environment in Nand.
Atmel AT91SAM9263-EK at91sam9263ek All Store environment in Dataflash on CS0 (card).
at91sam9263ek_dataflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9260ek_nandflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer Store environment in Nand.
Atmel AT91SAM9G20-EK at91sam9g20ek All Store environment in Dataflash on CS1 (on-board chip).
at91sam9g20ek_dataflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9g20ek_dataflash_cs1 v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9g20ek_dataflash_cs0 2009.01 and newer Store environment in Dataflash on CS0 (card).
at91sam9g20ek_nandflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer Store environment in Nand.
Atmel AT91SAM9RL-EK at91sam9rlek All Store environment in Dataflash on CS0 (on-board chip).
at91sam9rlek_dataflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer
at91sam9260ek_nandflash v1.1.5-at91.4, v1.3.0-at91, 2009.01 and newer Store environment in Nand.
Atmel AT91CAP9A-DK at91cap9adk All Store environment in Dataflash on CS0 (card).
Freescale MPC885 ADS MPC885ADS All Standard U-Boot build for MPC885ADS board
Freescale MPC8572DS MPC8572DS All Standard U-Boot build for MPC8572DS board
MPC8572DS_36BIT All Build with 36-bit addressing support
Freescale P2020-RDB P2020RDB v2009.03 NOR Boot build for P2020-RDB board
P2020RDB_SDCARD v2009.03 SD Card Boot build for P2020-RDB board
P2020RDB_RAMBOOT v2009.03 RAM Boot build for P2020-RDB board
P2020RDB_NAND v2009.03 NAND Boot build for P2020-RDB board
TI AM3517 EVM omap3517_evm v2009.03 Default
TI OMAPL137 EVM da830_omapl137 v1.3.3 Default
TI OMAPL138 eXperimenter/EVM da850_omapl138 v2009.01 Default