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 Fedora 27 Linux host.
Step through the following procedure:
- Prepare the build host, see Linux PC requirements https://wiki.st.com/stm32mpu/wiki/PC_prerequisites#Linux_PC.
- Setup OpenSTLinux release 2.1.0 sources:
[[email protected] openstlinux]$ curl https://storage.googleapis.com/git-repo-
downloads/repo > repo
[[email protected] openstlinux]$ chmod 755 repo
[[email protected] openstlinux]$ sudo mv repo /usr/bin
[[email protected] openstlinux]$ repo init -u https://github.com/STMicroelectronics
/oe-manifest.git -b refs/tags/openstlinux-5.4-dunfell-mp1-20-11-12
...
[[email protected] openstlinux]$ repo sync
...
[[email protected] openstlinux]$ ls -l
total 4
drwxrwxr-x 7 psl psl 4096 Apr 18 18:37 layers
[[email protected] 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
[[email protected] openstlinux]$
- Clone Emcraft meta layer:
[[email protected] openstlinux]$ git clone -b linux-stm32mp1-3.0.0
https://gitlab.com/emcraft/stm32mp15x/meta-emcraft.git layers/meta-st
/meta-emcraft
...
- Configure build:
[[email protected] openstlinux]$ DISTRO=openstlinux-weston
MACHINE=stm32mp1-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.
- Run the build:
[[email protected] build-openstlinuxweston-stm32mp1-som]$ bitbake emcraft-rootfs
NOTE: Started PRServer with DBfile: /mnt/build/STMP1/openstlinux/build-
openstlinuxweston-stm32mp1-som/cache/prserv.sqlite3, IP: 127.0.0.1,
PORT: 46597, PID: 29713
Loading cache: 100% |####################################| Time: 0:00:01
Loaded 3740 entries from dependency cache.
Parsing recipes: 100% |###################################| Time: 0:00:03
Parsing of 2546 .bb files complete (2542 cached, 4 parsed). 3744 targets,
104 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-ostl-linux-gnueabi"
MACHINE = "stm32mp1-som"
DISTRO = "openstlinux-weston"
DISTRO_VERSION = "3.1-snapshot-20210418"
TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb
callconvention-hard"
TARGET_FPU = "hard"
DISTRO_CODENAME = "dunfell"
ACCEPT_EULA_stm32mp1-som = "1"
GCCVERSION = "9.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-emcraft = "stm32mp1-5.4.56-dunfell-2.1.0:d82d0ac205b8d9e
7686de2af4aa3639b13a02c2d"
meta-python
meta-oe
meta-gnome
meta-initramfs
meta-multimedia
meta-networking
meta-webserver
meta-filesystems
meta-perl = "HEAD:144077083457ccb75700777d5e6b1da9aaff01aa"
meta-st-stm32mp = "HEAD:955b1d9a5f706013d718687b1afa6e3022c68fac"
meta-qt5 = "HEAD:fdd19517e17240b0b61765bd02fc483a1bde986f"
meta-st-openstlinux = "HEAD:9160c08dfcd0b7ec0eb8f1fd96672695b09680d5"
meta = "HEAD:b39bda4cc62db12c0edfbe489d5a7f5988ede6a9"
...
- The build-openstlinux-stm32mp1-som/tmp-glibc/deploy/images/stm32mp1-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:
[[email protected] build-openstlinuxweston-stm32mp1-som]$ bitbake emcraft-rootfs
-c populate_sdk
|