system76 / firmware-open

System76 Open Firmware
Other
963 stars 82 forks source link

Test fwupd Capsule On Disk support #225

Open jackpot51 opened 3 years ago

jackpot51 commented 3 years ago

After https://github.com/fwupd/fwupd/releases/tag/1.6.2, fwupd now supports Capsule On Disk. We should test doing firmware updates using that.

https://github.com/fwupd/fwupd/commit/3747e245e5a5402eca272b7c45088e03ba965f1e

crawfxrd commented 2 years ago

Now that we have the new coreboot and edk2 releases, what would be the next steps for this?

crawfxrd commented 1 year ago

Adding EsrtFmpDxe and adding a skeleton device FMP to edk2 causes the ESRT to be published. This shows up in sysfs under /sys/firmware/efi/esrt and will also be listed by fwupd as "UEFI ESRT device".

crawfxrd commented 1 year ago

Capsules can be generated using edk2's Python script:

GenerateCapsule -e --guid <FMP_GUID> --fw-version 0x1 --lsv 0 -o firmware.cap firmware.bin

UEFI requires the firmware version be represented as a u32.

This can then be added to a cabinet for fwupd to use:

rm -f firmware.jcat
jcat-tool self-sign --kind sha256 firmware.jcat firmware.cap
jcat-tool self-sign --kind sha256 firmware.jcat firmware.metainfo.xml
gcab -c firmware.cab firmware.cap firmware.jcat firmware.metainfo.xml
fwupdmgr get-details firmware.cab
fwupdmgr local-install firmware.cab <FMP_GUID>
crawfxrd commented 3 months ago

Dasharo is working on Capsule Update support for coreboot-based firmware: