Building Bootable Linux Images

This application note explains how to build the bootable Linux images for the Emcraft STM32MP1 System-On-Module from the Yocto distribution. The following procedure was explicitly validated on a Ubuntu 20.04 Linux host.

Step through the following procedure:

  1. Prepare the build host, see Linux PC requirements https://wiki.st.com/stm32mpu/wiki/PC_prerequisites#Linux_PC .

  2. Setup OpenSTLinux release 5.0.0 sources:

    [psl@sergmir openstlinux]$ curl https://storage.googleapis.com/git-repo-downloads/repo > repo [psl@sergmir openstlinux]$ chmod 755 repo [psl@sergmir openstlinux]$ sudo mv repo /usr/bin [psl@sergmir openstlinux]$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 ... [psl@sergmir openstlinux]$ repo sync ... [psl@sergmir openstlinux]$ ls -l total 4 drwxrwxr-x 7 psl psl 4096 Apr 18 18:37 layers [psl@sergmir openstlinux]$ ls -l layers/ total 20 drwxrwxr-x 14 psl psl 4096 Apr 18 18:37 meta-openembedded drwxrwxr-x 12 psl psl 4096 Apr 18 18:37 meta-qt5 drwxrwxr-x 6 psl psl 4096 Apr 18 18:37 meta-st drwxrwxr-x 6 psl psl 4096 Apr 18 18:37 meta-timesys drwxrwxr-x 9 psl psl 4096 Apr 18 18:37 openembedded-core [psl@sergmir openstlinux]$
  3. Clone Emcraft meta layer:

    [psl@sergmir openstlinux]$ git clone -b linux-stm32mp1-4.1.0 https://gitlab.com/emcraft/stm32mp15x/meta-emcraft.git layers/meta-st/meta-emcraft ...
  4. Configure build:

    [psl@sergmir openstlinux]$ TEMPLATECONF=layers/meta-st/meta-emcraft/conf/templates/default DISTRO=openstlinux-weston MACHINE=stm32mp15-som source layers/meta-st/scripts/envsetup.sh ...

The BSP for STM32MP1 depends on packages and firmware which are covered by a software license agreement (SLA). You will be asked to read and to accept this EULA.

  1. Run the build:

  2. The build-openstlinux-stm32mp15-som/tmp-glibc/deploy/images/stm32mp15-som directory contains complete file system images ready for flashing. If you are planning development outside of the Yocto build tree (e.g. compiling some application), build the SDK toolchain: