Last edited one day ago

Changes notification - v7.0.0

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP21x lines, STM32MP23x lines, STM32MP25x lines



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.

Important

In case of upgrade from OpenSTLinux ecosystem release v6.0.0, check first the previous release change notification available in this wiki, dedicated to the v6.y.z ecosystem releases (Take care : you will then jump into ecosystem-v6 wiki)

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:

Information
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*

Information
The STM32MP15x lines  STMicrolectronics board use the recommended power configuration in ecosystem release v7.0.0 , aligned with STM32MP13x 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.
This configuration is possible on customer boards only if the I2C used to control STPMIC1 is not used by other devices.

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]