[PATCH v2 0/4] Enable EFI Capsule on Disk on Libre Computer LePotato & LaFrite
Ferass El Hafidi
funderscore at postmarketos.org
Wed Apr 22 17:39:03 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>
---
Changes in v2:
- Keep reset_cpu in board-common.c, but guarded
- Only imply SYSRESET_PSCI, for boards to be able to disable it if
needed
- Link to v1: https://lore.kernel.org/r/20260408-b4-amlogic-sysreset-capsules-v1-0-6f3386eb5124@postmarketos.org
---
Ferass El Hafidi (4):
arm: mach-meson: provide reset_cpu only when SYSRESET is disabled
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 | 6 ++----
configs/libretech-ac_defconfig | 1 +
configs/libretech-cc_defconfig | 4 ++++
4 files changed, 9 insertions(+), 4 deletions(-)
---
base-commit: f0000b4a57e9edf8ff8454b9056d767466dff57f
change-id: 20260408-b4-amlogic-sysreset-capsules-8f5962defafb
Best regards,
--
--
Best regards,
Ferass
More information about the U-Boot
mailing list