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:
- Download the Yocto toolchain from the Emcraft website.
- Install the toolchain to your development host. The toolchain can be installed to an arbitrary directory:
$ sh ./fsl-imx-fb-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.9.51-mx8-beta.sh
- Activate the cross-build environment:
$ source /opt/fsl-imx-fb/4.9.51-mx8-beta/environment-setup-aarch64-poky-linux $ unset CCACHE_PATH
- 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:
$ mkdir build $ cd build $ tar xfj meta-emcraft-imx8m.tar.bz2
- Unpack the U-Boot and imx-mkimage tarballs:
$ tar xfz meta-emcraft/recipes-bsp/u-boot/files/\ u-boot-emcraft-2017.03-mx8.tar.gz $ tar xfz meta-emcraft/recipes-bsp/imx-mkimage/files/\ imx-mkimage-emcraft.tar.gz
- Clean up the build directory:
$ cd u-boot/ $ make distclean
- 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):
$ make imx8m_lpddr4_som_config
- Build the i.MX 8M SOM U-Boot image:
$ 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
- The U-Boot image ready for installation to the i.MX 8M SOM is here:
$ ls -l iMX8M/flash.bin
|