1 Article purpose[edit source]
This article aims at proposing a way to organize, on the host PC, the software packages of the different Packages (Starter, Developer and Distribution) for a given release of the STM32MPU Embedded Software distribution.
The main objective of the proposed organization is to keep together the software packages corresponding to a given release because there are links between them. For example:
- Flashing the image from the Starter Package on the board is mandatory before modifying the source code from the Developer Package. Both the image and the source code must belong to the same software release.
- The SDK (Developer Package) and the image (Starter Package) have both been generated from the Distribution Package. A software release thus guarantees that there is no misalignment between the different software packages.
The directories are shown in green, while the files are in black.
2 Creating the structure[edit source]
- Create your <working directory> and assign a unique name to it (for example by including the release name):
mkdir STM32MPU-Ecosystem-v5.0.0 cd STM32MPU-Ecosystem-v5.0.0
- Create the first-level directories that will host the software packages delivered through the STM32MPU Embedded Software distribution release note:
mkdir Starter-Package mkdir Developer-Package mkdir Distribution-Package
- The resulting directory structure looks as follows:
STM32MPU-Ecosystem-v5.0.0 STM32MPU Embedded Software release โโโ Developer-Package Developer Package installation directory โโโ Distribution-Package Distribution Package installation directory โโโ Starter-Package Starter Package installation directory
Once all software packages have been installed according to the instructions given in the STM32MPU Embedded Software distribution release note, the resulting directory structure looks as follows:
STM32MPU-Ecosystem-v5.0.0 STM32MPU Embedded Software release โโโ Developer-Package Developer Package installation directory โ โโโ SDK SDK for OpenSTLinux distribution โ โโโ STM32Cube_FW_MP1_V1.6.0 STM32CubeMP1 Package โ โโโ stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 Linux kernel, U-Boot, TF-A and OP-TEE OS source code (OpenSTLinux distribution) โโโ Distribution-Package Distribution Package installation directory โ โโโ stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 OpenSTLinux distribution (full source code and OpenEmbedded-based build framework) โโโ Starter-Package Starter Package installation directory โโโ stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 Software image (binaries)
3 Focus on the Starter Package directory[edit source]
The Starter-Package directory contains the software image for the STM32MPU Embedded Software distribution.
The optee boot chain is the default solution delivered by STMicroelectronics. It includes the superset of features (for example, all Flash memory devices are supported). Refer to the Boot chain overview article for details.
Flash memory partitions (e.g. rootfs, bootfs...) are explained in the STM32 MPU Flash mapping article.
Starter-Package โโโ stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 โโโ images โโโ stm32mp1 โโโ flashlayout_st-image-weston Flash layout files (description of the partitions) for the supported Flash devices and boards โ โโโ deleteall โ โ โโโ [...] โ โโโ extensible โ โ โโโ FlashLayout_sdcard_stm32mp157f-dk2-extensible.tsv Flash layout file for microSD card with no userfs partition but a rootfs partition extended to sdcard size (recommended setup for package repository service) โ STM32MP157F-DK2 โ โ โโโ FlashLayout_sdcard_stm32mp135f-dk-extensible.tsv Flash layout file for microSD card with no userfs partition but a rootfs partition extended to sdcard size (recommended setup for package repository service) โ STM32MP135F-DK โ โ โโโ [...] โ โโโ optee โ โ โโโ FlashLayout_emmc_stm32mp157f-ev1-optee.tsv Flash layout file for eMMC and op-tee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv Flash layout file for microSD card and op-tee boot chain, with OP-TEE OS โ STM32MP157F-DK2 โ โ โโโ [...] โโโ fip โย ย โโโ fip-<board>-<boot-type>.bin Image to flash โโโ arm-trusted-firmware โย ย โโโ tf-a-<board>-<boot-type>.stm32 Intermediate tf-a binary used to build fip image โโโ u-boot โย ย โโโ u-boot-nodtb-soc.bin Intermediate tf-a binary used to build fip image โย ย โโโ u-boot-<board>-<boot-type>.dtb Intermediate tf-a dtb used to build fip image โโโ optee โย ย โโโ tee-header_v2-<board>.bin โโย ย โโโ tee-pageable_v2--<board>.bin โ โย ย โโโ tee-pager_v2--<board>.bin โโโ kernel โย ย โโโ vmlinux vmlinux copied in bootfs partition โโโ scripts โ โโโ create_sdcard_from_flashlayout.sh โโโ st-image-bootfs-openstlinux-weston-stm32mp1.ext4 Binary for bootfs partition โโโ st-image-bootfs-openstlinux-weston-stm32mp1.manifest โโโ st-image-userfs-openstlinux-weston-stm32mp1.ext4 Binary for userfs partition โโโ st-image-userfs-openstlinux-weston-stm32mp1.manifest โโโ st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 Binary for vendorfs partition โโโ st-image-weston-openstlinux-weston-stm32mp1.ext4 Binary for rootfs partition โโโ st-image-weston-openstlinux-weston-stm32mp1.license โโโ st-image-weston-openstlinux-weston-stm32mp1-license_content.html โโโ st-image-weston-openstlinux-weston-stm32mp1.manifest โโโ [...]
4 Focus on the Developer Package directory[edit source]
The Developer-Package directory contains:
- The source code for the following OpenSTLinux software packages (development for Armยฎ Cortexยฎ-A processor):
- Linuxยฎ kernel
- GCnano driver
- U-Boot
- TF-A
- OP-TEE OS
- The debug symbol files for Linux kernel, U-Boot, TF-A and OP-TEE OS
- The SDK (for cross-development on an host PC)
- The STM32Cube MPU Package (developed for Armยฎ Cortexยฎ-M processor)
Developer-Package โโโ SDK SDK for OpenSTLinux distribution: details in Standard SDK directory structure article โ โโโ environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi Environment setup script for Developer Package โ โโโ site-config-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi โ โโโ sysroots โ โ โโโ cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi Target sysroot (libraries, headers, and symbols) โ โ โ โโโ [...] โ โ โโโ x86_64-ostl_sdk-linux Native sysroot (libraries, headers, and symbols) โ โ โโโ [...] โ โโโ version-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
โโโ STM32Cube_FW_MP1_V1.6.0 STM32CubeMP1 Package: details in STM32CubeMP1 Package content article โ โโโ Drivers โ โ โโโ BSP BSP drivers for the supported STM32MPU boards โ โ โ โโโ [...] โ โ โโโ CMSIS โ โ โ โโโ [...] โ โ โโโ STM32MP1xx_HAL_Driver HAL drivers for the supported STM32MPU devices โ โ โโโ [...] โ โโโ _htmresc โ โ โโโ [...] โ โโโ License.md License types for the components โ โโโ Middlewares Middlewares used by the examples and applications โ โ โโโ [...] โ โโโ package.xml โ โโโ Projects โ โ โโโ STM32CubeProjectsList.html List of examples and applications for STM32CubeMP1 Package โ โ โโโ STM32MP157F-DK2 Set of examples and applications โ STM32MP157F-DK2 โ โ โ โโโ [...] โ โ โโโ STM32MP157F-EV1 Set of examples and applications โ STM32MP157F-EV1 โ โ โโโ [...] โ โโโ Readme.md โ โโโ Release_Notes.html Release note for STM32CubeMP1 Package โ โโโ Utilities โ โโโ [...]
โโโ stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 Source code for OpenSTLinux distribution โโโ images โ โโโ stm32mp1 Debug symbol files installation directory โ โโโ tf-a-bl2-optee.elf Debug symbol file for TF-A, with OP-TEE OS โ boot firmware stage โ โโโ u-boot-stm32mp157a-dk1-optee.elf Debug symbol file for U-Boot, with OP-TEE OS โ STM32MP157A-DK1 โ โโโ u-boot-stm32mp157f-dk2-optee.elf Debug symbol file for U-Boot, with OP-TEE OS โ STM32MP157F-DK2 โ โโโ u-boot-stm32mp157f-ev1-optee.elf Debug symbol file for U-Boot, with OP-TEE OS โ STM32MP157F-EV1 โ โโโ vmlinux Debug symbol file for Linux kernel โ โโโ [...]
โโโ sources โโโ arm-ostl-linux-gnueabi โโโ FIP_artifacts โโโ fip/ fip images of Stater Package โโโ arm-trusted-firmware/ intermediate tf-a binaries from Stater Package (needed to build any fip image โโโ optee/ intermediate optee binaries from Stater Package (needed to build any fip image โโโ u-boot/ intermediate u-boot binaries from Stater Package (needed to build any fip image
โโโ linux-6.1.28 โ โโโ [*].patch ST patches for Linux kernel โ โโโ fragment-[*].config ST configuration fragments for Linux kernel โ โโโ linux-6.1.28 Linux kernel source code directory โ โโโ linux-6.1.28.tar.xz โ โโโ README.HOW_TO.txt Helper file for Linux kernel management: reference for Linux kernel build โ โโโ series
โโโ gcnano-driver-6.4.13 โ โโโ gcnano-driver-6.4.13 GCnano kernel module source code directory โ โโโ gcnano-driver-stm32mp-6.4.13-stm32mp-r1-r0.tar.xz โ โโโ README.HOW_TO.txt Helper file for GCnano kernel module management: reference for GCnano kernel module build
โโโ optee-os-stm32mp-3.19.0-stm32mp-r1 OP-TEE OS installation directory โ โโโ [*].patch ST patches for OP-TEE OS โ โโโ optee-os-stm32mp-3.19.0-stm32mp-r1-r0.tar.xz โ โโโ Makefile.sdk Makefile for the OP-TEE OS compilation โ โโโ optee-os-stm32mp-3.19.0-stm32mp-r1 OP-TEE OS source code directory โ โโโ README.HOW_TO.txt Helper file for OP-TEE OS management: reference for OP-TEE OS build โ โโโ series
โโโ tf-a-stm32mp-v2.8.6-stm32mp-r1 TF-A installation directory โ โโโ [*].patch ST patches for TF-A โ โโโ tf-a-stm32mp-v2.8.6-stm32mp-r1 TF-A source code directory โ โโโ Makefile.sdk Makefile for the TF-A compilation โ โโโ README.HOW_TO.txt Helper file for TF-A management: reference for TF-A build โ โโโ series โ โโโ tf-a-stm32mp-v2.8.6-stm32mp-r1-r0.tar.xz
โโโ u-boot-stm32mp-v2022.10-stm32mp-r1 U-Boot installation directory โโโ [*].patch ST patches for U-Boot โโโ Makefile.sdk Makefile for the U-Boot compilation โโโ README.HOW_TO.txt Helper file for U-Boot management: reference for U-Boot build โโโ series โโโ u-boot-stm32mp-v2022.10-stm32mp-r1 U-Boot source code directory โโโ u-boot-stm32mp-v2022.10-stm32mp-r1-r0.tar.xz
Appendix A shows the structure of the Linux kernel, U-Boot, TF-A and OP-TEE OS installation directories after these software packages have been built.
5 Focus on the Distribution Package directory[edit source]
The Distribution-Package directory contains all the OpenEmbedded layers required to get the source code of any STM32MPU Embedded Software component, as well as a build framework based on OpenEmbedded.
STM32MPU-Ecosystem-v5.0.0 โโโ Distribution-Package OpenSTLinux distribution โโโ layers โโโ meta-openembedded Collection of layers for the OpenEmbedded-Core universe (OpenEmbedded standard) โ โโโ [...] โโโ meta-qt5 QT5 layer for OpenEmbedded (standard) โ โโโ [...]
โโโ meta-st โ โโโ meta-st-openstlinux STMicroelectronics layer that contains the settings of the frameworks and images for the OpenSTLinux distribution โ โ โโโ recipes-st โ โ โ โโโ images โ โ โ โ โโโ st-image-core.bb Core image for OpenSTLinux distribution โ โ โ โ โโโ st-image-weston.bb Weston image with basic Wayland support for OpenSTLinux distribution: recommended setup โ โ โ โโโ packagegroups โ โ โ โโโ [...] โ โ โโโ [...]
โ โโโ meta-st-stm32mp STMicroelectronics layer that contains the description of the BSP for the STM32 MPU devices โ โ โโโ recipes-bsp โ โ โ โโโ alsa Recipes for ALSA control configuration โ โ โ โ โโโ [...] โ โ โ โโโ drivers Recipes for Vivante GCNANO GPU kernel drivers โ โ โ โ โโโ [...] โ โ โ โโโ trusted-firmware-a Recipes for TF-A โ โ โ โ โโโ [...] โ โ โ โโโ u-boot Recipes for U-Boot โ โ โ โโโ [...] โ โ โโโ recipes-extended โ โ โ โโโ m4projects Recipes for STM32Cube MPU Package within the OpenSTLinux distribution โ โ โ โ โโโ [...] โ โ โ โโโ [...] โ โ โโโ recipes-graphics โ โ โ โโโ gcnano-userland Recipes for Vivante libraries OpenGL ES, OpenVG and EGL (multi backend) โ โ โ โ โโโ [...] โ โ โ โโโ [...] โ โ โโโ recipes-kernel โ โ โ โโโ linux Recipes for Linux kernel โ โ โ โโโ [...] โ โ โ โโโ linux-firmware Recipes for Linux firmwares (example, Bluetooth firmware) โ โ โ โโโ [...] โ โ โโโ recipes-st โ โ โ โโโ images โ โ โ โโโ st-image-bootfs.bb Recipes for the bootfs partition binary โ โ โ โโโ st-image-userfs.bb Recipes for the userfs partition binary โ โ โ โโโ st-image-vendorfs.bb Recipes for the vendorfs partition binary โ โ โโโ [...]
โ โโโ meta-st-stm32mp-addons STMicroelectronics layer that helps managing the STM32CubeMX integration โ โโโ [...] โ โโโ scripts โ โโโ envsetup.sh Environment setup script for Distribution Package โ โโโ [...]
โโโ meta-timesys Timesys layer for OpenEmbedded (standard) โ โโโ [...] โโโ openembedded-core Core metadata for current versions of OpenEmbedded (standard) โโโ [...]
Appendix B shows the structure of the build directory.
6 Appendix A: directory structure after build (Developer Package)[edit source]
Provided you have followed the recommendations of the README.HOW_TO.txt helper files to build the Linux kernel, the U-Boot and the TF-A, then the following new directories and files contain the build outputs.
Developer-Package โโโ stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21 Source code for OpenSTLinux distribution โ โโโ sources โ โโโ arm-ostl-linux-gnueabi โ โโโ FIP_artifacts FIP images to flash โ โ โโโ fip/ FIP images to flash, need to edit tsv file to point on that fip images โ โ โโโ arm-trusted-firmware/ Intermediate binaries of tf-a required to build fip images โ โ โโโ u-boot/ Intermediate binaries of u-boot required to build fip images โ โ โโโ optee/ Intermediate binaries of optee required to build fip images
โ โโโ linux-6.1.28 โ โ โโโ build Linux kernel build directory โ โ โ โโโ install_artifact โ โ โ โ โโโ lib โ โ โ โ โ โโโ modules โ โ โ โ โ โโโ X.Y.Z โ โ โ โ โ โโโ [...] Kernel modules hierarchy (*.ko files) โ โ โ โ โโโ boot โ โ โ โ โโโ stm32mp157a-dk1[*].dtb Linux kernel device tree blob files for bootfs partition โ STM32MP157A-DK1 โ โ โ โ โโโ stm32mp157f-dk2[*].dtb Linux kernel device tree blob files for bootfs partition โ STM32MP157F-DK2 โ โ โ โ โโโ stm32mp157f-ev1[*].dtb Linux kernel device tree blob files for bootfs partition โ STM32MP157F-EV1 โ โ โ โ โโโ uImage Linux kernel binary image file (with U-Boot wrapper) for bootfs partition โ โ โ โ โโโ [...] โ โ โ โโโ vmlinux Debug symbol file for Linux kernel โ โ โ โโโ [...] โ โ โโโ [...]
โ โโโ optee-os-stm32mp-3.19.0-stm32mp-r1 OP-TEE OS installation directory โ โ โโโ build OP-TEE OS build directory โ โ โ โโโ tee-[header/pageable/pager]_v2-stm32mp157a-dk1-optee.stm32 Binaries for OP-TEE OS runtime services โ STM32MP157A-DK1 โ โ โ โโโ tee-[header/pageable/pager]_v2-stm32mp157f-dk2-optee.stm32 Binaries for OP-TEE OS runtime services โ STM32MP157F-DK2 โ โ โ โโโ tee-[header/pageable/pager]_v2-stm32mp157f-ev1-optee.stm32 Binaries for OP-TEE OS runtime services โ STM32MP157F-EV1 โ โ โ โโโ [...] โ โ โโโ [...]
โ โโโtf-a-stm32mp-v2.8.6-stm32mp-r1 TF-A installation directory โ โ โโโ build TF-A build directory โ โ โ โโโ optee TF-A, with OP-TEE OS โ โ โ โ โโโ tf-a-bl2-optee.elf Debug symbol file for TF-A, with OP-TEE OS โ boot firmware stage โ โ โ โ โโโ tf-a-stm32mp157a-dk1-optee.stm32 TF-A binary for FSBL partition, with OP-TEE OS โ STM32MP157A-DK1 โ โ โ โ โโโ tf-a-stm32mp157f-dk2-optee.stm32 TF-A binary for FSBL partition, with OP-TEE OS โ STM32MP157F-DK2 โ โ โ โ โโโ tf-a-stm32mp157f-ev1-optee.stm32 TF-A binary for FSBL partition, with OP-TEE OS โ STM32MP157F-EV1 โ โ โ โ โโโ [...] โ โ โโโ [...]
โ โโโ u-boot-stm32mp-v2022.10-stm32mp-r1 U-Boot installation directory โ โโโ build-basic U-Boot build directory for basic boot chain โ โ โโโ u-boot-spl.stm32-stm32mp157a-dk1-basic U-Boot binary for FSBL partition (basic boot chain) โ STM32MP157A-DK1 โ โ โโโ u-boot-spl.stm32-stm32mp157f-dk2-basic U-Boot binary for FSBL partition (basic boot chain) โ STM32MP157F-DK2 โ โ โโโ u-boot-spl.stm32-stm32mp157f-ev1-basic U-Boot binary for FSBL partition (basic boot chain) โ STM32MP157F-EV1 โ โ โโโ u-boot-stm32mp157a-dk1-basic.img U-Boot binary for SSBL partition (basic boot chain) โ STM32MP157A-DK1 โ โ โโโ u-boot-stm32mp157f-dk2-basic.img U-Boot binary for SSBL partition (basic boot chain) โ STM32MP157F-DK2 โ โ โโโ u-boot-stm32mp157f-ev1-basic.img U-Boot binary for SSBL partition (basic boot chain) โ STM32MP157F-EV1 โ โโโ build-optee U-Boot build directory for boot chain, with OP-TEE OS โ โ โโโ u-boot-stm32mp157a-dk1-optee.elf Debug symbol file for U-Boot, with OP-TEE OS โ STM32MP157A-DK1 โ โ โโโ u-boot-stm32mp157a-dk1-optee.stm32 U-Boot binary for SSBL partition, with OP-TEE OS โ STM32MP157A-DK1 โ โ โโโ u-boot-stm32mp157f-dk2-optee.elf Debug symbol file for U-Boot, with OP-TEE OS โ STM32MP157F-DK2 โ โ โโโ u-boot-stm32mp157f-dk2-optee.stm32 U-Boot binary for SSBL partition, with OP-TEE OS โ STM32MP157F-DK2 โ โ โโโ u-boot-stm32mp157f-ev1-optee.elf Debug symbol file for U-Boot, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ u-boot-stm32mp157f-ev1-optee.stm32 U-Boot binary for SSBL partition, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ [...] โ โโโ [...]
7 Appendix B: directory structure after build (Distribution Package)[edit source]
Provided you have followed the build method explained in OpenSTLinux distribution, then the following new directories contain the build outputs.
As long as you did not modify the source code:
- the files in STPurple are the same as the ones available in the Starter Package: flash layout, binaries for bootfs, rootfs, userfs and vendorfs partitions
- the files in grey are the same as the ones available in the Starter and Developer Packages: binaries for FSBL and SSBL partitions, and for OP-TEE OS runtime services
- the files in orange are the same as the ones available in the Developer Package: Linux kernel image and device tree blobs, and debug symbol files
/[...]/build-openstlinuxweston-stm32mp1/tmp-glibc/deploy Yocto BUILDDIR โโโ images โ โโโ stm32mp1 โ โโโ flashlayout_st-image-weston/optee Flash layout files (description of the partitions) for the supported flash devices โ โ โโโ FlashLayout_sdcard_stm32mp135f-dk-optee.tsv Flash layout file for SDcard and optee boot chain, with OP-TEE OS โ STM32MP135f-DK โ โ โโโ ... โ โ โโโ FlashLayout_emmc_stm32mp157f-ev1-optee.tsv Flash layout file for eMMC and optee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ FlashLayout_nand-4-256_stm32mp157f-ev1-optee.tsv Flash layout file for NAND Flash and optee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ FlashLayout_nor-emmc_stm32mp157f-ev1-optee.tsv Flash layout file for NOR Flash (and eMMC) and optee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ FlashLayout_nor-nand-4-256_stm32mp157f-ev1-optee.tsv Flash layout file for NOR Flash (and NAND Flash) and optee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ FlashLayout_nor-sdcard_stm32mp157f-ev1-optee.tsv Flash layout file for NOR Flash (and microSD card) and optee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ FlashLayout_sdcard_stm32mp157a-dk1-basic.tsv Flash layout file for microSD card and basic boot chain โ STM32MP157A-DK1 โ โ โโโ FlashLayout_sdcard_stm32mp157a-dk1-optee.tsv Flash layout file for microSD card and optee boot chain, with OP-TEE OS โ STM32MP157A-DK1 โ โ โโโ FlashLayout_sdcard_stm32mp157f-dk2-basic.tsv Flash layout file for microSD card and basic boot chain โ STM32MP157F-DK2 โ โ โโโ FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv Flash layout file for microSD card and optee boot chain, with OP-TEE OS โ STM32MP157F-DK2 โ โ โโโ FlashLayout_sdcard_stm32mp157f-ev1-basic.tsv Flash layout file for microSD card and basic boot chain โ STM32MP157F-EV1 โ โ โโโ FlashLayout_sdcard_stm32mp157f-ev1-optee.tsv Flash layout file for microSD card and optee boot chain, with OP-TEE OS โ STM32MP157F-EV1 โ โ โโโ [...] โ โโโ scripts โ โ โโโ create_sdcard_from_flashlayout.sh
โ โโโ st-image-bootfs-openstlinux-weston-stm32mp1.ext4 Binary for bootfs partition โ โโโ st-image-userfs-openstlinux-weston-stm32mp1.ext4 Binary for userfs partition โ โโโ st-image-vendorfs-openstlinux-weston-stm32mp1.ext4 Binary for vendorfs partition โ โโโ st-image-weston-openstlinux-weston-stm32mp1.ext4 Binary for rootfs partition โ โโโ fip/ FIP images flashed according flashlayout selected โ โโโ uImage Linux kernel binary image file (with U-Boot wrapper) for bootfs partition โ โโโ vmlinux Debug symbol file for Linux kernel โ โโโ [...] โโโ [...]