This application note explains how to build the U-Boot image for booting the Emcraft STM32MP1 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 ./meta-toolchain-qt5-openstlinux-weston-stm32mp1-som-x86_64-toolchain-2.4-snapshot.sh
- Activate the cross-build environment:
$ source /opt/st/stm32mp1-som/2.4-snapshot/environment-setup-cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi $ unset CCACHE_PATH
- Download the Emcraft STM32MP1 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-stm32mp1.tar.bz2
- Unpack the U-Boot and imx-mkimage tarballs:
$ tar xfz meta-emcraft/recipes-bsp/u-boot/u-boot-stm32mp/\ u-boot-emcraft-2018.09-stm32mp1.tar.gz $ tar xfz meta-emcraft/recipes-bsp/trusted-firmware-a/tf-a-stm32mp/\ tfa-emcraft-2.0-stm32mp1.tar.gz
- Clean up the build directory:
$ cd u-boot/ $ make distclean
- Configure the build:
$ make stm32mp1_som_defconfig
- Build the STM32MP1 SOM U-Boot image:
$ make
- The U-Boot image is here:
$ ls -l u-boot.stm32
- Build the ARM Trusted Firmware image:
$ cd ../arm-trusted-firmware $ make -C tools/stm32image $ make LDFLAGS= CFLAGS= PLAT=stm32mp1 ARCH=aarch32 ARM_ARCH_MAJOR=7 DEBUG=1 \ LOG_LEVEL=40 STM32MP1_REV_A_REV_B=1 DTB_FILE_NAME=stm32mp1-som.dtb AARCH32_SP=sp_min
- The ARM Trusted Firmware image is here:
$ ls -l build/stm32mp1/debug/tf-a-stm32mp1-som.stm32
|