[meta-swupdate][PATCH 0/2] Add support for stm32mp25 boards

8 views
Skip to first unread message

Dario Binacchi

unread,
Apr 29, 2026, 10:13:08 AMApr 29
to swup...@googlegroups.com, linux-...@amarulasolutions.com, Dario Binacchi
This series provides the changes in meta-swupdate required to support
the stm32mp257f-ev1 board in meta-swupdate-boards.

The update process for this board requires accessing the FWU metadata
instead of the standard U-Boot environment to define the boot bank
after an update. This requires the use of the libfwumdata library and
the new fwumdata handler.

Additionally, this series adds support for the DISTRO suffix in
artifact names, which is required for the OpenSTLinux BSP used by
this board.

As mentioned in the related SWUpdate core patch, the libfwumdata
recipe has already been submitted to openembedded-core.

Dario Binacchi (2):
classes: add support for DISTRO suffix in artifact names
swupdate.inc: add libfwumdata dependency for fwumdata handler

classes-recipe/swupdate-common.bbclass | 5 ++++-
classes-recipe/swupdate.bbclass | 7 ++++---
recipes-support/swupdate/swupdate.inc | 3 +++
3 files changed, 11 insertions(+), 4 deletions(-)

--
2.43.0

Dario Binacchi

unread,
Apr 29, 2026, 10:13:09 AMApr 29
to swup...@googlegroups.com, linux-...@amarulasolutions.com, Dario Binacchi
Currently, only images containing the MACHINE name are supported. With
this change, when both SWUPDATE_IMAGES_NOAPPEND_DISTRO
and SWUPDATE_IMAGES_NOAPPEND_MACHINE are set to 0, rootfs formatted as
<image-name>-<DISTRO>-<MACHINE> will be searched too.

This is particularly useful for STMicroelectronics (OpenSTLinux)
BSPs, where the generated rootfs for a selected image always
contains both the distro and the machine names.

For example:

core-image-full-cmdline-openstlinux-weston-stm32mp25-eval.rootfs.ext4.gz

Signed-off-by: Dario Binacchi <dario.b...@amarulasolutions.com>
---
classes-recipe/swupdate-common.bbclass | 5 ++++-
classes-recipe/swupdate.bbclass | 7 ++++---
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/classes-recipe/swupdate-common.bbclass b/classes-recipe/swupdate-common.bbclass
index 80a5d5b2c917..a5ad10672154 100644
--- a/classes-recipe/swupdate-common.bbclass
+++ b/classes-recipe/swupdate-common.bbclass
@@ -296,8 +296,11 @@ def swupdate_add_artifacts(d, list_for_cpio):
fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image) or "").split()
encrypted = (d.getVarFlag("SWUPDATE_IMAGES_ENCRYPTED", image) or "")
if fstypes:
+ noappend_distro = d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_DISTRO", image)
noappend_machine = d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_MACHINE", image)
- if noappend_machine == "0": # Search for a file explicitly with MACHINE
+ if noappend_distro == "0" and noappend_machine == "0": # Search for a file explicitly with DISTRO and MACHINE
+ imagebases = [ image + '-' + d.getVar('DISTRO') + '-' + d.getVar('MACHINE') ]
+ elif noappend_machine == "0": # Search for a file explicitly with MACHINE
imagebases = [ image + '-' + d.getVar('MACHINE') ]
elif noappend_machine == "1": # Search for a file explicitly without MACHINE
imagebases = [ image ]
diff --git a/classes-recipe/swupdate.bbclass b/classes-recipe/swupdate.bbclass
index 5390c9b314f1..f6e500947649 100644
--- a/classes-recipe/swupdate.bbclass
+++ b/classes-recipe/swupdate.bbclass
@@ -23,9 +23,10 @@
# SWUPDATE_IMAGES = "core-image-full-cmdline"
# SWUPDATE_IMAGES_FSTYPES[core-image-full-cmdline] = ".ext4.gz"
# For this example either a file core-image-full-cmdline-${MACHINE}.ext4.gz or a file
-# core-image-full-cmdline.ext4.gz gets added the swu archive. Optionally the variable
-# SWUPDATE_IMAGES_NOAPPEND_MACHINE allows to explicitly define if the MACHINE name
-# must be part of the image file name or not.
+# core-image-full-cmdline.ext4.gz gets added the swu archive. Optionally the variables
+# SWUPDATE_IMAGES_NOAPPEND_MACHINE and SWUPDATE_IMAGES_NOAPPEND_DISTRO allow to
+# explicitly define if the MACHINE and/or DISTRO names must be part of the image
+# file name or not.
# * image file name(s)
# Example:
# SWUPDATE_IMAGES = "core-image-full-cmdline.ext4.gz"
--
2.43.0

Dario Binacchi

unread,
Apr 29, 2026, 10:13:14 AMApr 29
to swup...@googlegroups.com, linux-...@amarulasolutions.com, Dario Binacchi
Add dependency on libfwumdata if CONFIG_FWUMDATA_HANDLER is set.

Signed-off-by: Dario Binacchi <dario.b...@amarulasolutions.com>
---
recipes-support/swupdate/swupdate.inc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index fa7a3f3716d0..4e805c8cb38d 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -210,6 +210,9 @@ python () {
if 'CONFIG_EXT_FILESYSTEM=y\n' in features:
depends += ' e2fsprogs'

+ if 'CONFIG_FWUMDATA_HANDLER=y\n' in features:
+ depends += ' libfwumdata'
+
if mlprefix:
deps = ' '
rdeps = ' '
--
2.43.0

Reply all
Reply to author
Forward
0 new messages