Building U-Boot Print


This application note explains how to build the U-Boot image for booting the Emcraft i.MX 8M System-On-Module from SD card. Step through the following procedure:

  1. Download the Yocto toolchain from the Emcraft website.
  2. Install the toolchain to your development host. The toolchain can be installed to an arbitrary directory:
  3. $ sh ./

  4. Activate the cross-build environment:
  5. $ source /opt/fsl-imx-fb/4.9.51-mx8-beta/environment-setup-aarch64-poky-linux
    $ unset CCACHE_PATH

  6. Download the Emcraft i.MX 8M add-on Yocto layer from the Emcraft website and unpack it to an arbitrary directory on your development host:
  7. $ mkdir build
    $ cd build
    $ tar xfj meta-emcraft-imx8m.tar.bz2

  8. Unpack the U-Boot and imx-mkimage tarballs:
  9. $ tar xfz meta-emcraft/recipes-bsp/u-boot/files/\

    $ tar xfz meta-emcraft/recipes-bsp/imx-mkimage/files/\

  10. Clean up the build directory:
  11. $ cd u-boot/
    $ make distclean

  12. Choose a proper build configuration (available configurations differ for 1GB, 2GB, and 3GB i.MX 8M SOM variants: imx8m_lpddr4_som_config, imx8m_lpddr4_2gb_som_config, imx8m_lpddr4_3gb_som_config):
  13. $ make imx8m_lpddr4_som_config

  14. Build the i.MX 8M SOM U-Boot image:
  15. $ make
    $ cd ../imx-mkimage
    $ CFLAGS= make SOC=iMX8M clean
    $ cp ../u-boot/u-boot-nodtb.bin iMX8M/
    $ cp ../u-boot/arch/arm/dts/emcraft-imx8m-som.dtb iMX8M/fsl-imx8mq-evk.dtb
    $ cp ../u-boot/spl/u-boot-spl.bin iMX8M/
    $ cp ../u-boot/u-boot.bin iMX8M/
    $ CFLAGS= make SOC=iMX8M flash_evk

  16. The U-Boot image ready for installation to the i.MX 8M SOM is here:
  17. $ ls -l iMX8M/flash.bin