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.
| Value | Meaning |
|---|---|
- | No option; the partition or device is not modified |
P | Program the partition or device |
D | Delete the partition or device |
E | Empty the partition or device |
PE | Do not update |
PD | Delete and update |
PDE | Delete and keep empty |
Id
0x01to0xF0.0x01and0x03are 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
| Value | Meaning |
|---|---|
none | Only used to load the programming service into RAM |
mmc0 | SD card (SDMMC — Secure Digital and MultiMediaCard) |
Other values name the flash controller for eMMC, NAND and NOR targets.
Offset
| Value | Meaning |
|---|---|
0x0 | boot1, boot2 |
0x12345678 | Offset 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.