[PATCH 0/4] Enable EFI Capsule on Disk on Libre Computer LePotato & LaFrite

Ferass El Hafidi funderscore at postmarketos.org
Wed Apr 8 22:30:11 CEST 2026


Mostly everything is already in place to enable EFI capsules and in particular
EFI capsule on disk.

First, switch all Amlogic boards to use SYSRESET. EFI Capsule on Disk
functionality expects sysreset to be present. As the current reset_cpu()
function in board-common.c is basically only doing PSCI reset on U-Boot
proper, we can replace it with sysreset's PSCI support, which works just
fine for that purpose provided BL31 is running (SPL stays on an
SoC-specific reset_cpu() which does for(;;);, as the overhead for
sysreset is too high and we don't have PSCI yet at that point).

Then we can enable capsule on disk. LaFrite has Capsule updates enabled
already, so it is simply a matter of enabling CoD. LePotato does not
have Capsule updates enabled by default, however it can be easily enabled
and setup to update u-boot on eMMC/SD.

With Capsule on Disk setup, it becomes possible to update U-Boot directly
from Linux, without having to worry about manually using `flashprog`
(for SPI flash) or `dd` (for eMMC/SD). Instead, thanks to CoD, updates
can be handled by `fwupd` and applied upon next EFI boot.

To test:

 * build U-Boot as usual

 * in that running U-Boot, run: `efidebug capsule esrt` to get the GUID
   -OR-
   run the following in your tree:
	tools/mkeficapsule guidgen path_to_devicetree_here U_BOOT_MESON_MMC
	                                   (or U_BOOT_MESON_SPI on LaFrite)

 * proceed with the following guide to create a capsule file:
   https://docs.u-boot.org/en/latest/develop/uefi/uefi.html#enabling-uefi-capsule-update-feature

 * generate a .cab file suitable for fwupd using `mkcab`:
   https://gitlab.postmarketos.org/tauchgang/tauchgang-ci/-/tree/main/mkcab
	mkcab u-boot-libretech-cc.capsule GUID-GOES-HERE libretech-cc "LePotato" 2026.04
   (as of writing, the README.md suggests this is for Qualcomm only. It
    actually does nothing that is Qualcomm-specific, and works on any
    board that supports Capsule on Disk and fwupd)

 * on the board itself, boot to Linux via EFI, install fwupd, copy the resulting
   .cab file, and run as root:
	fwupdtool --force install u-boot-libretech-cc.cab

 * reboot, make sure you boot over EFI, else the capsule update will not
   start

Signed-off-by: Ferass El Hafidi <funderscore at postmarketos.org>
---
Ferass El Hafidi (4):
      arm: mach-meson: move reset_cpu to spl only
      arm: meson: enable SYSRESET_PSCI
      configs: libretech-ac_defconfig: enable EFI Capsule on Disk
      configs: libretech-cc_defconfig: enable EFI Capsule on Disk

 arch/arm/mach-meson/Kconfig        |  2 ++
 arch/arm/mach-meson/board-common.c | 14 --------------
 arch/arm/mach-meson/spl.c          | 10 ++++++++++
 configs/libretech-ac_defconfig     |  1 +
 configs/libretech-cc_defconfig     |  4 ++++
 5 files changed, 17 insertions(+), 14 deletions(-)
---
base-commit: 4dc4080805fac1b1ed7606ce3bc8fb44a6d59d5e
change-id: 20260408-b4-amlogic-sysreset-capsules-8f5962defafb

Best regards,
-- 
Ferass El Hafidi <funderscore at postmarketos.org>



More information about the U-Boot mailing list