[OE-core,v2] libfwumdata: add new recipe

Message ID 20260430175308.868993-1-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [OE-core,v2] libfwumdata: add new recipe
Related show

Commit Message

Dario Binacchi April 30, 2026, 5:53 p.m. UTC
libfwumdata is a lightweight C library for parsing, validating (CRC32),
and manipulating Firmware Update (FWU) metadata, allowing tools such as
RAUC or SWUpdate, and in general any application, to modify the boot
bank selection.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes v1 -> v2:
- Drop S = "${WORKDIR}/git"

 meta/recipes-bsp/u-boot/libfwumdata_0.1.0.bb | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 meta/recipes-bsp/u-boot/libfwumdata_0.1.0.bb

Comments

Alexander Kanavin May 1, 2026, 1:16 p.m. UTC | #1
On Fri, 1 May 2026 at 00:18, Dario Binacchi via lists.openembedded.org
<dario.binacchi=amarulasolutions.com@lists.openembedded.org> wrote:
> libfwumdata is a lightweight C library for parsing, validating (CRC32),
> and manipulating Firmware Update (FWU) metadata, allowing tools such as
> RAUC or SWUpdate, and in general any application, to modify the boot
> bank selection.

A library recipe without any consumers doesn't make sense. The patch
should include enabling support for it in other recipes. There should
also be an explanation of why this functionality is common and
important enough that the recipe should be in oe-core; until now no
one has asked for it.

> Changes v1 -> v2:
> - Drop S = "${WORKDIR}/git"

This begs the question: how was the recipe tested before submission?
The above line would result in an immediate error on master and some
earlier releases.

Alex

To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
Dario Binacchi May 5, 2026, 8:08 a.m. UTC | #2
Hi Alexander,

On Fri, May 1, 2026 at 3:16 PM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> On Fri, 1 May 2026 at 00:18, Dario Binacchi via lists.openembedded.org
> <dario.binacchi=amarulasolutions.com@lists.openembedded.org> wrote:
> > libfwumdata is a lightweight C library for parsing, validating (CRC32),
> > and manipulating Firmware Update (FWU) metadata, allowing tools such as
> > RAUC or SWUpdate, and in general any application, to modify the boot
> > bank selection.
>
> A library recipe without any consumers doesn't make sense.


I have already submitted a patch [1] to the SWUpdate mailing list that
integrates libfwumdata as a handler, which is its first primary use-case.
I am also currently using it in a custom SWUpdate implementation for a
client project.


> The patch
> should include enabling support for it in other recipes. There should
> also be an explanation of why this functionality is common and
> important enough that the recipe should be in oe-core; until now no
> one has asked for it.
>
>
The FWU (Firmware Update) metadata is not a custom vendor format, but
a standardized binary structure [2] defined by the Arm specification (part
of Arm SystemReady / PSA). It is already implemented and supported in
U-Boot.
As the adoption of this standard grows for managing A/B partition switching,
providing a standalone, lightweight user-space library in oe-core is the
cleanest approach.


> > Changes v1 -> v2:
> > - Drop S = "${WORKDIR}/git"
>
> This begs the question: how was the recipe tested before submission?
>

The development and testing of this recipe were done against the scarthgap
release. On that specific branch, the S = "${WORKDIR}/git" assignment did
not trigger the immediate build error that is enforced on master.

[1] https://groups.google.com/g/swupdate/c/kYr2Hy-f3us
[2] https://developer.arm.com/documentation/den0118/latest

Thanks and regards,

Dario


> The above line would result in an immediate error on master and some
> earlier releases.
>
> Alex
>
Alexander Kanavin May 5, 2026, 8:18 a.m. UTC | #3
On Tue, 5 May 2026 at 10:08, Dario Binacchi
<dario.binacchi@amarulasolutions.com> wrote:
> I have already submitted a patch [1] to the SWUpdate mailing list that
> integrates libfwumdata as a handler, which is its first primary use-case.
> I am also currently using it in a custom SWUpdate implementation for a
> client project.

If there's a swupdate patch that hasn't been accepted yet then the
swupdate support should be reviewed, accepted, merged, and released
first, and such a release should be integrated into the yocto layer
that provides it, and the libfwumdata support should be enabled there.
Until all of it happens, adding the library to oe-core is premature.

> The FWU (Firmware Update) metadata is not a custom vendor format, but
> a standardized binary structure [2] defined by the Arm specification (part
> of Arm SystemReady / PSA). It is already implemented and supported in U-Boot.

How? Does u-boot support it without needing an external library? If
not, then should u-boot support be enabled together with adding this
recipe?

If swupdate is the only expected consumer, then the recipe should go
to meta-swupdate, not to oe-core.

> The development and testing of this recipe were done against the scarthgap
> release. On that specific branch, the S = "${WORKDIR}/git" assignment did
> not trigger the immediate build error that is enforced on master.

If you submit patches for the master branch, the expectation is that
you test them on master before submission, and include the test
protocol in the commit message.

Thanks,
Alex

To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.

Patch

diff --git a/meta/recipes-bsp/u-boot/libfwumdata_0.1.0.bb b/meta/recipes-bsp/u-boot/libfwumdata_0.1.0.bb
new file mode 100644
index 000000000000..aa8184845c00
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/libfwumdata_0.1.0.bb
@@ -0,0 +1,20 @@ 
+SUMMARY = "Library to access Firmware Update (FWU) metadata"
+
+DESCRIPTION = "This package contains a library to read and modify FWU \
+metadata. It provides a minimal API to allow userspace applications, such as \
+SWUpdate, RAUC or any other OTA update manager, to modify the boot bank \
+selection."
+
+HOMEPAGE = "https://github.com/passgat/libfwumdata"
+LICENSE = "LGPL-2.1-or-later"
+LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c"
+SECTION = "libs"
+
+SRC_URI = "git://github.com/passgat/libfwumdata;protocol=https;branch=master"
+SRCREV = "c6e235d3cf0467211ca6946bd10a2c8bdc0d5053"
+
+inherit cmake lib_package
+
+DEPENDS = "zlib"
+
+BBCLASSEXTEND = "native"