Hi Kory, +CC Jose who maintains the spec from Arm
On Thu, 18 Dec 2025 at 15:49, Kory Maincent <[email protected]> wrote: > > Hello Ilias, > > On Thu, 18 Dec 2025 14:04:12 +0200 > Ilias Apalodimas <[email protected]> wrote: > > > Hi Kory, > > > > I haven't lost track of this, I'll try to have a look as soon as I can. > > For the record, I still don't think this is a great idea. I'd rather > > have people follow the design docs. > > I don't get it. What are your arguments against this tool? It is a simple way > to change the content of the FWU metadata from Linux. DEN0118 doesn't explicitly require UEFI. However, the Arm architecture is officially supporting the EFI spec. Even from a Linux kernel perspective, booting with EFI is encouraged. There is certain functionality you don't get without EFI. On top, there are manufacturers that keep the metadata in the secure world. I understand that the tool is a handy way to change that from Linux. > > > I understand the acceptance capsule feels 'weird', but there was a > > good reason for it. There's a PR with an update to the spec, which > > makes the acceptance substantially easier now that all the ecosystem > > parts are in place [0[ > > > > [0] https://github.com/ARM-software/edge-iot-arch-guide/pull/21 > > This design guideline is for one use case of FWU Metadata. It needs UEFI and > capsule update. > > FWU Metadata is an update standard for ARM architecture, it is not dependent > on > the implementation. UEFI with capsule update is one implementation, but we > could > have others. > https://documentation-service.arm.com/static/660be6391bc22b03bca92702 I've been involved in the document design since the beginning and the primary goal was to consume this via EFI & capsules. That's why that second document(MBFW) I pointed to exists. > > On my case (ST board) there is no UEFI, I have TF-A (FSBL) that reads the FWU > metadata to know the location of the FIP Image (SSBL which contain U-boot and > OPTEE). > During the OTA process, Linux is updating the FWU metadata to change the > active > bank and the bank state with this new fwumdata tool. > > Note that the previous development of FWU support in U-boot as not been > developed in a generic way but bound to the UEFI capsule framework which is > not > ideal. Yes, that was on purpose, I reviewed and helped in most of that. > On my case if I want to read FWU metadata in U-boot I have to enable the > UEFI capsule config for nothing. That's ok. That's an ST call, but I am merely trying to explain the reasoning behind the two specs Regards /Ilias > > Regards, > > > > > Cheers > > /Ilias > > > > On Fri, 12 Dec 2025 at 18:23, Kory Maincent <[email protected]> > > wrote: > > > > > > Add a new fwumdata tool to allows users to read, display, and modify FWU > > > (Firmware Update) metadata from Linux userspace. It provides functionality > > > similar to fw_printenv/fw_setenv but for FWU metadata. Users can view > > > metadata, change active/previous bank indices, modify bank states, and set > > > image acceptance flags. Configuration is done via fwumdata.config file. > > > > > > Made a few change to mkfwumdata tool along the way. > > > > > > Here is an output example > > > > > > $ ./fwumdata -l > > > FWU Metadata: > > > Version: 2 > > > Active Index: 0 > > > Previous Index: 1 > > > CRC32: 0x1f21ff7b > > > Metadata Size: 120 bytes > > > Descriptor Offset: 32 > > > Bank States: > > > Bank 0: accepted (0xfc) > > > Bank 1: accepted (0xfc) > > > > > > Firmware Store Descriptor: > > > Number of Banks: 2 > > > Number of Images: 1 > > > Image Entry Size: 80 > > > Bank Info Entry Size: 24 > > > > > > Images: > > > Image 0: > > > Image Type GUID: > > > 65ae85ad-1fb3-0b46-8c5d-285543aa6eab Location GUID: > > > 51513491-da07-2a4f-9bea-375ea53b1b5c Banks: > > > Bank 0: > > > Image GUID: > > > cb2df442-f929-6a44-a374-672d92eb2aa7 Accepted: yes (1) > > > Bank 1: > > > Image GUID: > > > a839a18f-395c-484f-83b8-0354077c8f9f Accepted: yes (1) > > > > > > Changes in v2: > > > - Fix a small offset mistake in last patch > > > > > > Signed-off-by: Kory Maincent <[email protected]> > > > --- > > > Kory Maincent (6): > > > tools: gitignore: Add mkfwumdata to the git ignore file > > > tools: Reorganize mkfwumdata tool into fwumdata_src directory > > > tools: mkfwumdata: Improve error message specificity > > > tools: mkfwumdata: Add bank count validation for FWU metadata v2 > > > tools: Add support for fwumdata tool > > > tools: mkfwumdata: Remove dependency on fwu_mdata.h header > > > > > > MAINTAINERS | 7 +- > > > doc/develop/uefi/fwu_updates.rst | 4 +- > > > doc/fwumdata.1 | 222 +++++++++ > > > tools/.gitignore | 2 + > > > tools/Kconfig | 9 +- > > > tools/Makefile | 4 +- > > > tools/fwumdata_src/Kconfig | 19 + > > > tools/fwumdata_src/fwumdata.c | 854 > > > ++++++++++++++++++++++++++++++++++ tools/fwumdata_src/fwumdata.config | > > > 33 ++ tools/fwumdata_src/fwumdata.h | 138 ++++++ > > > tools/fwumdata_src/fwumdata.mk | 10 + > > > tools/{ => fwumdata_src}/mkfwumdata.c | 106 ++--- > > > 12 files changed, 1315 insertions(+), 93 deletions(-) > > > --- > > > base-commit: 31bf4a1c308773895a8e7ea047b3cea037e4c922 > > > change-id: 20251107-feature_fwumdata-58508d61e1d3 > > > > > > Best regards, > > > -- > > > Köry Maincent, Bootlin > > > Embedded Linux and kernel engineering > > > https://bootlin.com > > > > > > > -- > Köry Maincent, Bootlin > Embedded Linux and kernel engineering > https://bootlin.com

