1. Article purpose[edit | edit source]
The article aims to help rebase an STM32 MPU project on a new ecosystem release by focusing on the impacts of the main changes.
2. Scope of this article[edit | edit source]
This article provides some details for the main changes between ecosystem release v6.2.1 and new ecosystem release v7.0.0
. The aim is to help you to migrate your project.
All Information about the features delivered in the new release is available in the OpenSTLinux release note.
3. Impacted domains[edit | edit source]
3.1. Yocto build environment for Distribution Package[edit | edit source]
SDCard useful size is now limited by adding a new shrink partition at the end: goal is to limit the time of resize2fs with too big last userfs partitions (see more information in Bootdevice labels)
3.1.1. ST SPLIT Partitions detailed information[edit | edit source]
New stsplitpartitions class allows to split an unique image requested on several partitions/pieces like WIC does (for e.MMC storage).
Main advantage of creating a unique image is to ensure that all package dependencies are properly managed, and then you do not need to think about the destination of each files for a package which required to be split in different partitions.
In this OpenSTLinux release, the unique built image is rootfs.
The class support only few output format:
- extx (ext2 ext2.gz ext2.bz2 ext3 ext3.gz ext3.bz2 ext4 ext4.gz ext4.bz2)
- jffs2
- tar (tar tar.bz2 tar.xz)
- vfat
- squashfs (squashfs squashfs-xz squashfs-zst)
- multiubi for nand storage
To enable this ST image split mechanism, the variable PARTITIONS_IMAGES must be populated with parameters:
- List of partitions to create and their definition
- ex. PARTITIONS_IMAGES = "bootfs vendorfs rootfs userfs"
- Definition of each partition:
- Image name, ex: ${IMAGE_BASENAME}
- Label of the partition, ex.: bootfs
- Mount point of the partition, ex: /boot
- Size of partition (on KB), ex: 65535 (64MB)
- Type of the partition for flasher
- ESP for efi boot partition
- System for boot partition (bootfs partition)
- FileSystem for other linux partitions (vendorfs, userfs, rootfs,....)
- Number of copy (used for tsv creation)
- List of file systems not supported by this partition (ex. if you would like the partition not to be available on vfat while you would like to have for bootfs partition only).
Here is an example to illustrate:
PARTITIONS_IMAGES = "bootfs vendorfs rootfs userfs
PARTITIONS_IMAGES[bootfs] ?= "${IMAGE_BASENAME},bootfs,/boot,65536,System,0"
PARTITIONS_IMAGES[userfs] ?= "${IMAGE_BASENAME},userfsfs,/usr/local,131072,FileSystem,0"
The definition of bootfs, rootfs, vendorfs, userfs is defined in conf/machine/include/st-machine-image-partition-stm32mp.inc#L303 :
# <image_name>,<partition_label>,<mountpoint>,<size>,<type>,<copy>,fs not supported
PARTITIONS_IMAGES[bootfs] ?= ...
PARTITIONS_IMAGES[vendorfs] ?= ...
PARTITIONS_IMAGES[rootfs] ?= ...
PARTITIONS_IMAGES[userfs] ?= ...
Support of annex image
We propose also the possibility to generate a custom annex image, not part of the main unique image and to put on a specific partitions.
On meta-st-stm32mp/recipes-st/images/ , we provide some example of custom annex image that can replace a split image on specific partition.
To enable the build of this custom annex image, STM32MP_IMAGE_DEPENDS variable must be defined:
- ex.: STM32MP_IMAGE_DEPENDS = "st-image-bootfs"
Then, to use the custom annex image on the TSV , for flashloading the target, we need to force the partition image name:
STM32MP_BOOTFS_IMAGE = "st-image-bootfs-${DISTRO}-${MACHINE}.bootfs.vfat"
#STM32MP_USERFS_IMAGE = "my-image-userfs-${DISTRO}-${MACHINE}.userfs"
#STM32MP_VENDORFS_IMAGE = "my-image-vendorfs-${DISTRO}-${MACHINE}.vendorfs"
Note: lines in comment are other example for some custom annex images.
3.2. Hardware configuration[edit | edit source]
Check the device tree files for the STMP32 MPU board. For that, you compare both versions of the following components:
| This is possible with git diff command to get delta between two branches in the same repository. Example with STLINUX GitHub repository and for all STM32MP1 device tree files: git diff v6.18-stm32mp-r1 v6.6-stm32mp-r3.1 -- arch/arm/boot/dts/st/stm32mp1* |
- Linux® kernel: between Linux kernel v6.18-stm32mp-r1 (LTS v6.18.37) and previous Linux kernel v6.6-stm32mp-r3.1 (LTS v6.6.129)
- Pinctrl IO synchronization parameters backported from upstream
- U-Boot: between U-Boot v2026.04-stm32mp-r1 and previous U-Boot v2023.10-stm32mp-r3.1
- Alignment with Linux® kernel device tree
- OP-TEE: between OP-TEE 4.8.0-stm32mp-r1 and previous OP-TEE 4.0.0-stm32mp-r3.1
- Alignment with Linux® kernel device tree
- PMIC software switch off support with generic binding (system_off_soc_mode replaced by system-power-controller)
- TF-A: between TF-A v2.14-stm32mp-r1 (LTS v2.14.8) and previous TF-A v2.10-stm32mp-r3.1 (LTS v2.10.24)
- Alignment with Linux® kernel device tree
- PMIC software switch off support with generic binding (system_off_soc_mode replaced by system-power-controller)
- External DT: between External DT v7-stm32mp-r1 and previous External DT v6-stm32mp-r3.1
- Alignment with Linux® kernel device tree
- Update directory tree by supporting STM32MP1 series by moving a7/m4-examples dt from kernel repo to external dt + others new DTs
| The STM32MP15x lines OP-TEE control the STPMIC1 resources with a secure I²C protected by ETPZC and the associated regulators are exported to Linux kernel with SCMI. The device tree of OP-TEE and of Linux® kernel are impacted. |
3.3. System configuration[edit | edit source]
- Directory tree changed in External DT component
- The configuration of OP-TEE profile is now centralized via the usage of boot scheme:
- BOOTSCHEME_LABELS += "opteemin" for system_services
- BOOTSCHEME_LABELS += "optee" for secure_and_system_services
3.4. Boot stages[edit | edit source]
TF-A: New DDR firmware OID (See commit feat(stm32mp2): add DDR firmware OID).
- No impact for STM32MP1 series.
- No impact if you do not enable trusted boot in TF-A (with TRUSTED_BOARD_BOOT=1).
- If you start a project with ecosystem release v7.0.0
, this will have no impact. All the tools and TF-A binaries will use the new OID.
If you update from an older release for STM32MP2 series, and cannot change TF-A BL2 and the DDR firmware certificate on your product, then you should enable the STM32MP_LEGACY_DDR_FW_OID flag. See feat(st): propose a legacy version of DDR_FW_HASH_OID patch for more information.
3.5. Security[edit | edit source]
- None
3.6. User space and applications[edit | edit source]
- To improve security, PIE (Position-Independent Executable) is enabled by default GLibC building in Yocto Wrynose. This prevents debugging applications. See Compiler-Options-Hardening-Guide-for-C-and-C++.
- A new build distro openstlinux-weston-nopie is proposed as example to deactivate GCC building flag GCCPIE.
4. References[edit | edit source]