...
Prepare the build host, see Linux PC requirements https://wiki.st.com/stm32mpu/wiki/PC_prerequisites#Linux_PC .
Setup OpenSTLinux release 5.0.0 sources:
Code Block [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]$
Clone Emcraft meta layer:
Code Block [psl@sergmir openstlinux]$ git clone -b linux-stm32mp1-4.1.0 https://gitlab.com/emcraft/stm32mp15x/meta-emcraft.git layers/meta-st/meta-emcraft ...
Configure build:
Code Block [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.
Note: For subsequent build configurations, use the steps as below:
Code Block |
---|
[psl@sergmir openstlinux]$ source layers/meta-st/scripts/envsetup.sh build-openstlinuxweston-stm32mp15-som |
Run the build:
Code Block [psl@sergmir build-openstlinuxweston-stm32mp15-som]$ bitbake emcraft-rootfs NOTE: Started PRServer with DBfile: /mnt/build/STMP1/openstlinux/build- openstlinuxweston-stm32mp15-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 = "2.4.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "arm-ostl-linux-gnueabi" MACHINE = "stm32mp15-som" DISTRO = "openstlinux-weston" DISTRO_VERSION = "4.2.1-snapshot-20230821" TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard" TARGET_FPU = "hard" DISTRO_CODENAME = "mickledore" ACCEPT_EULA_stm32mp1-som = "1" GCCVERSION = "12.%" PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp" meta-emcraft = "linux-stm32mp1-4.0.0:bc1f71503775a6e37dce78b13e 7107a09ebfa1a7" meta-python meta-oe meta-gnome meta-initramfs meta-multimedia meta-networking meta-webserver meta-filesystems meta-perl = "HEAD:c032fd0b1a9d444711103c2703dfa8e2964a3865" meta-st-stm32mp = "HEAD:931b3f5be2c00f55d114c8f9122082a9d229b776" meta-qt5 = "HEAD:cf6ffcbad5275a3428f6046468a0c9d572e813d1" meta-st-openstlinux = "HEAD:8c780facff81d3c3878c5fdcd18bdd24fc36478d" meta = "HEAD:20cd64812d286c920bd766145ab1cd968e72667e" ...
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:Code Block [psl@sergmir build-openstlinuxweston-stm32mp15-som]$ bitbake emcraft-rootfs -c populate_sdk