Compiling latest U-Boot for i.MX6

Published on November 26, 2012

Archived Notice

This article has been archived and may contain broken links, photos and out-of-date information. If you have any questions, please Contact Us.

This is probably old-hat to most readers of this blog, but here are the steps to get and compile the latest U-Boot for i.MX6.

Don't let the nitrogen6q reference below fool you. This works for the 1GiB version of both SABRE Lite and Nitrogen6X, since our U-Boot code base auto-detects them.

~$ git clone git://github.com/boundarydevices/u-boot-imx6.git Cloning into 'u-boot-imx6'... remote: Counting objects: 98621 remote: Counting objects: 194430, done. remote: Compressing objects: 100% (37277/37277), done. remote: Total 194430 (delta 156593), reused 192232 (delta 154419) Receiving objects: 100% (194430/194430), 49.84 MiB | 1.87 MiB/s, done. Resolving deltas: 100% (156593/156593), done. ~$ cd u-boot-imx6 ~/u-boot-imx6$ git checkout origin/production -b production ~/u-boot-imx6$ export ARCH=arm ~/u-boot-imx6$ export CROSS_COMPILE=arm-none-linux-gnueabi- ~/u-boot-imx6$ make nitrogen6q_config Configuring for nitrogen6q - Board: nitrogen6x, Options: IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg ~/u-boot-imx6$ make all Generating include/autoconf.mk ... make -C examples/api all make[1]: Entering directory `/home/ericn/u-boot-imx6/examples/api' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/ericn/u-boot-imx6/examples/api' ~/u-boot-imx6$ ls -l u-boot.imx -rw-rw-r-- 1 user group 312572 Nov 26 11:48 u-boot.imx



In English, these steps are:

  • Clone the U-Boot sources from git://github.com/boundarydevices/u-boot-imx6.git, and
  • Check out the production branch, and
  • Set your PATH and CROSS_COMPILE environment variables to point at your cross compiler, and the ARCH variable to arm, and
  • Choose the proper configuration for your board, and
  • Compile

The output is the file u-boot.imx as discussed in this post.

If you're running on a Dual-Lite or Solo processor, or if you have a non-standard memory arrangement, you'll need to select a different configuration file as discussed in this post.

Note that the PATH and CROSS_COMPILE variables above refer to the latest LTIB package. You'll need to change them if you're using a different cross-compiler.