[meta-swupdate-boards][PATCH 0/1] Add support for STM32MP257F-EV1

12 views
Skip to first unread message

Dario Binacchi

unread,
Apr 29, 2026, 10:19:22 AMApr 29
to swup...@googlegroups.com, linux-...@amarulasolutions.com, Dario Binacchi
This patch adds support for the STM32MP257F-EV1 evaluation board.

Please note that this requires the recent changes submitted to both
SWUpdate core and meta-swupdate, which provide the handler and the
libfwumdata integration.

Dario Binacchi (1):
New board: STM32MP257F-EV1

README.md | 10 ++
.../update-image/stm32mp25-eval/emmcsetup.lua | 11 ++
.../stm32mp25-eval/sw-description | 43 +++++++
.../swupdate/stm32mp25-eval/09-swupdate-args | 9 ++
.../swupdate/stm32mp25-eval/defconfig | 110 ++++++++++++++++++
.../swupdate/stm32mp25-eval/swupdate.cfg | 41 +++++++
6 files changed, 224 insertions(+)
create mode 100644 recipes-extended/images/update-image/stm32mp25-eval/emmcsetup.lua
create mode 100644 recipes-extended/images/update-image/stm32mp25-eval/sw-description
create mode 100644 recipes-support/swupdate/swupdate/stm32mp25-eval/09-swupdate-args
create mode 100644 recipes-support/swupdate/swupdate/stm32mp25-eval/defconfig
create mode 100644 recipes-support/swupdate/swupdate/stm32mp25-eval/swupdate.cfg

--
2.43.0

Dario Binacchi

unread,
Apr 29, 2026, 10:19:23 AMApr 29
to swup...@googlegroups.com, linux-...@amarulasolutions.com, Dario Binacchi
The STM32MP257F-EV1 is an evaluation board based on the STM32MP25
microprocessor. More information can be found at:
https://www.st.com/en/evaluation-tools/stm32mp257f-ev1.html

Unlike other boards that typically rely on the U-Boot environment to
select the correct boot bank after an update, this board manages the
boot selection process through the Firmware Update (FWU) metadata
stored in dedicated partitions. This is achieved via the new fwumdata
script handler (CONFIG_FWUMDATA_HANDLER). Therefore, a version of
swupdate and meta-swupdate including this feature is required.

Signed-off-by: Dario Binacchi <dario.b...@amarulasolutions.com>
---
README.md | 10 ++
.../update-image/stm32mp25-eval/emmcsetup.lua | 11 ++
.../stm32mp25-eval/sw-description | 43 +++++++
.../swupdate/stm32mp25-eval/09-swupdate-args | 9 ++
.../swupdate/stm32mp25-eval/defconfig | 110 ++++++++++++++++++
.../swupdate/stm32mp25-eval/swupdate.cfg | 41 +++++++
6 files changed, 224 insertions(+)
create mode 100644 recipes-extended/images/update-image/stm32mp25-eval/emmcsetup.lua
create mode 100644 recipes-extended/images/update-image/stm32mp25-eval/sw-description
create mode 100644 recipes-support/swupdate/swupdate/stm32mp25-eval/09-swupdate-args
create mode 100644 recipes-support/swupdate/swupdate/stm32mp25-eval/defconfig
create mode 100644 recipes-support/swupdate/swupdate/stm32mp25-eval/swupdate.cfg

diff --git a/README.md b/README.md
index 4348cf05c853..1b9930284e30 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,16 @@ Above will enable U-boot which Raspberry Pi does not default to, and
instead boots straight to Linux. U-boot is required to do the "swapping"
of partitions in the "dual-copy" layout.

+For usage with STMicroelectronics STM32MP one must add the following to
+`local.conf`:
+
+ SWUPDATE_IMAGES_NOAPPEND_MACHINE[core-image-full-cmdline]="0"
+ SWUPDATE_IMAGES_NOAPPEND_DISTRO[core-image-full-cmdline]="0"
+
+Above will ensure that meta-swupdate can correctly locate the rootfs
+artifacts, as OpenSTLinux appends both the distribution and machine
+names to the image files.
+
Maintainer
----------

diff --git a/recipes-extended/images/update-image/stm32mp25-eval/emmcsetup.lua b/recipes-extended/images/update-image/stm32mp25-eval/emmcsetup.lua
new file mode 100644
index 000000000000..a619596ee5d4
--- /dev/null
+++ b/recipes-extended/images/update-image/stm32mp25-eval/emmcsetup.lua
@@ -0,0 +1,11 @@
+function preinst()
+ local out = "Pre installed script called"
+
+ return true, out
+end
+
+function postinst()
+ local out = "Post installed script called"
+
+ return true, out
+end
diff --git a/recipes-extended/images/update-image/stm32mp25-eval/sw-description b/recipes-extended/images/update-image/stm32mp25-eval/sw-description
new file mode 100644
index 000000000000..b530cac3d087
--- /dev/null
+++ b/recipes-extended/images/update-image/stm32mp25-eval/sw-description
@@ -0,0 +1,43 @@
+software =
+{
+ version = "0.1.0";
+
+ @@MACHINE@@ = {
+ hardware-compatibility: [ "1.0" ];
+ stable: {
+ copy1: {
+ images: (
+ {
+ filename = "core-image-full-cmdline-@@DISTRO@@-@@MACHINE@@.rootfs.ext4.gz";
+ sha256 = "$swupdate_get_sha256(core-image-full-cmdline-@@DISTRO@@-@@MACHINE@@.rootfs.ext4.gz)";
+ compressed = "zlib";
+ type = "raw";
+ device = "/dev/mmcblk0p11";
+ }
+ );
+ scripts: (
+ { type = "fwumdata";
+ properties: { active = "1"; }
+ }
+ );
+
+ };
+ copy2: {
+ images: (
+ {
+ filename = "core-image-full-cmdline-@@DISTRO@@-@@MACHINE@@.rootfs.ext4.gz";
+ sha256 = "$swupdate_get_sha256(core-image-full-cmdline-@@DISTRO@@-@@MACHINE@@.rootfs.ext4.gz)";
+ compressed = "zlib";
+ type = "raw";
+ device = "/dev/mmcblk0p12";
+ }
+ );
+ scripts: (
+ { type = "fwumdata";
+ properties: { active = "2"; }
+ }
+ );
+ };
+ };
+ };
+};
diff --git a/recipes-support/swupdate/swupdate/stm32mp25-eval/09-swupdate-args b/recipes-support/swupdate/swupdate/stm32mp25-eval/09-swupdate-args
new file mode 100644
index 000000000000..307e75c971c3
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/stm32mp25-eval/09-swupdate-args
@@ -0,0 +1,9 @@
+rootfs=`swupdate -g`
+
+if [ $rootfs == '/dev/mmcblk0p11' ]; then
+ selection="-e stable,copy2"
+else
+ selection="-e stable,copy1"
+fi
+
+SWUPDATE_ARGS="-v -H @MACHINE@:1.0 ${selection} -f /etc/swupdate.cfg"
diff --git a/recipes-support/swupdate/swupdate/stm32mp25-eval/defconfig b/recipes-support/swupdate/swupdate/stm32mp25-eval/defconfig
new file mode 100644
index 000000000000..98a5a429f90e
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/stm32mp25-eval/defconfig
@@ -0,0 +1,110 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Swupdate Configuration
+#
+
+#
+# Swupdate Settings
+#
+
+#
+# General Configuration
+#
+CONFIG_SYSTEMD=y
+CONFIG_DEFAULT_CONFIG_FILE="/etc/swupdate.cfg"
+CONFIG_SCRIPTS=y
+CONFIG_HW_COMPATIBILITY=y
+CONFIG_HW_COMPATIBILITY_FILE="/etc/hwrevision"
+CONFIG_SW_VERSIONS_FILE="/etc/sw-versions"
+
+#
+# Socket Paths
+#
+CONFIG_SOCKET_CTRL_PATH=""
+CONFIG_SOCKET_PROGRESS_PATH=""
+CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY="/tmp/"
+# CONFIG_MTD is not set
+CONFIG_LUA=y
+CONFIG_LUAPKG="lua"
+# CONFIG_FEATURE_SYSLOG is not set
+
+#
+# Build Options
+#
+CONFIG_CROSS_COMPILE=""
+CONFIG_SYSROOT=""
+CONFIG_EXTRA_LDLIBS=""
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_WERROR is not set
+# CONFIG_NOCLEANUP is not set
+# CONFIG_BOOTLOADER_EBG is not set
+# CONFIG_UBOOT is not set
+# CONFIG_BOOTLOADER_GRUB is not set
+# CONFIG_BOOTLOADER_CBOOT is not set
+CONFIG_DOWNLOAD=y
+CONFIG_HASH_VERIFY=y
+# CONFIG_SIGNED_IMAGES is not set
+CONFIG_ENCRYPTED_IMAGES=y
+CONFIG_SURICATTA=y
+
+#
+# Suricatta
+#
+
+#
+# Features
+#
+CONFIG_SURICATTA_SSL=y
+
+
+#
+# Server
+#
+CONFIG_SURICATTA_HAWKBIT=y
+# CONFIG_SURICATTA_SERVER_NONE is not set
+CONFIG_WEBSERVER=y
+
+#
+# Webserver Features
+#
+CONFIG_MONGOOSE=y
+
+#
+# Mongoose Feature
+#
+CONFIG_MONGOOSELUA=y
+# CONFIG_MONGOOSEIPV6 is not set
+CONFIG_MONGOOSESSL=y
+
+#
+# Compressors (zlib always on)
+#
+CONFIG_GUNZIP=y
+# CONFIG_XZ is not set
+# CONFIG_ZSTD is not set
+
+# Parser Features
+#
+CONFIG_LIBCONFIG=y
+CONFIG_PARSERROOT=""
+CONFIG_JSON=y
+# CONFIG_LUAEXTERNAL is not set
+# CONFIG_SETSWDESCRIPTION is not set
+
+#
+# Image Handlers
+#
+CONFIG_RAW=y
+CONFIG_LUASCRIPTHANDLER=y
+CONFIG_SHELLSCRIPTHANDLER=y
+CONFIG_FWUMDATA_HANDLER=y
+# CONFIG_HANDLER_IN_LUA is not set
+CONFIG_RDIFFHANDLER=y
+CONFIG_HANDLER_IN_LUA=y
+# CONFIG_EMBEDDED_LUA_HANDLER is not set
+CONFIG_ARCHIVE=y
+# CONFIG_REMOTE_HANDLER is not set
diff --git a/recipes-support/swupdate/swupdate/stm32mp25-eval/swupdate.cfg b/recipes-support/swupdate/swupdate/stm32mp25-eval/swupdate.cfg
new file mode 100644
index 000000000000..c5a473de861a
--- /dev/null
+++ b/recipes-support/swupdate/swupdate/stm32mp25-eval/swupdate.cfg
@@ -0,0 +1,41 @@
+globals :
+{
+ verbose = true;
+ loglevel = 5;
+ syslog = true;
+ postupdatecmd = "(sleep 2 && reboot)&";
+};
+
+download :
+{
+ retries = 3;
+ timeout = 1800;
+};
+
+identify : (
+ { name = "board"; value = "stm32mp25-eval"; }
+);
+
+suricatta :
+{
+
+ tenant = "default";
+ id = "stm32mp25-eval";
+ confirm = 0;
+ url = "http://papero:8080";
+ polldelay = 360;
+ nocheckcert = true;
+ retry = 4;
+ retrywait = 200;
+ loglevel = 10;
+ userid = 0;
+ groupid = 0;
+ max_artifacts = 1;
+};
+
+webserver :
+{
+ document_root = "/www";
+ userid = 0;
+ groupid = 0;
+};
--
2.43.0

Reply all
Reply to author
Forward
0 new messages