Skip to main content

Yocto classes

OpenSTLinux is built with Yocto. ST's own .bbclass files live in:

Distribution-Package/layers/meta-st/meta-st-stm32mp/classes

A .bbclass is shared logic that recipes pull in with inherit. The two below are what turn built images into something the flashing tools can consume.

st-partitions-image

  • Applied by all of ST's image recipes — bootfs, userfs, vendorfs.
  • Generates the partitions after the image itself is built.

flashlayout-stm32mp

Generates the .tsv flash layout that STM32CubeProgrammer reads, based on the partitions produced by st-partitions-image.

Output lands under the deploy directory, for example:

Distribution-Package/build-openstlinuxweston-stm32mp13-disco/tmp-glibc/deploy/images/stm32mp13-disco/flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp135f-dk-optee.tsv

The file is tab-separated, one line per partition, and is read top to bottom.

Flash layout columns

Opt

What the programmer does with this partition or device.

ValueMeaning
-No option; the partition or device is not modified
PProgram the partition or device
DDelete the partition or device
EEmpty the partition or device
PEDo not update
PDDelete and update
PDEDelete and keep empty

Id

  • 0x01 to 0xF0.
  • 0x01 and 0x03 are reserved for the binaries containing the FSBL and the SSBL respectively.

The id is how the embedded programming service requests a file, which is why it must match what the Binary column offers.

Name

The alternate-setting name of the USB DFU interface used for U-Boot enumeration. It is a string descriptor identifying the target memory segment — see Interface Descriptor in the DFU specification.

Type

Used only by U-Boot, to select which part of the flash memory to update.

IP / Device

ValueMeaning
noneOnly used to load the programming service into RAM
mmc0SD card (SDMMC — Secure Digital and MultiMediaCard)

Other values name the flash controller for eMMC, NAND and NOR targets.

Offset

ValueMeaning
0x0boot1, boot2
0x12345678Offset in bytes

Binary

Used by STM32CubeProgrammer to find the file for each id when the embedded programming service asks for it.

  • An absolute or full path plus the filename.
  • none — skipped.

Paths in a generated layout are relative to the .tsv file's own directory. Moving the file without moving the images alongside it breaks the flash with a file-not-found error rather than an obviously wrong path.