Re: [PATCH 0/4] Enable EFI Capsule on Disk on Libre Computer LePotato & LaFrite
Neil Armstrong <[email protected]> Wed, 22 Apr 2026 10:36:21 +0200
| Newsgroups | io.groups.u-boot-amlogic,de.denx.lists.u-boot |
|---|---|
| Organization | Linaro |
| Message-ID | <[email protected]> |
On 4/8/26 22:30, Ferass El Hafidi via groups.io wrote: > 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 <[email protected]> > --- > 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, Got the following failure in CI: aarch64: + sei510 + +WARNING: unmet direct dependencies detected for SYSRESET_PSCI + Depends on [n]: SYSRESET [=y] && ARM_PSCI_FW [=n] + Selected by [y]: + - MESON64_COMMON [=y] && ARM [=y] && ARCH_MESON [=y] +drivers/sysreset/sysreset_psci.c: In function 'psci_sysreset_request': +drivers/sysreset/sysreset_psci.c:21:17: error: implicit declaration of function 'psci_sys_reset' [-Werror=implicit-function-declaration] + 21 | psci_sys_reset(type); + | ^~~~~~~~~~~~~~ +drivers/sysreset/sysreset_psci.c:24:17: error: implicit declaration of function 'psci_sys_poweroff' [-Werror=implicit-function-declaration] + 24 | psci_sys_poweroff(); + | ^~~~~~~~~~~~~~~~~ +cc1: all warnings being treated as errors +make[3]: *** [scripts/Makefile.build:271: drivers/sysreset/sysreset_psci.o] Error 1 +make[2]: *** [scripts/Makefile.build:492: drivers/sysreset] Error 2 +make[1]: *** [Makefile:2205: drivers] Error 2 +make: *** [Makefile:189: __sub-make] Error 2 aarch64: + sei610 + +WARNING: unmet direct dependencies detected for SYSRESET_PSCI + Depends on [n]: SYSRESET [=y] && ARM_PSCI_FW [=n] + Selected by [y]: + - MESON64_COMMON [=y] && ARM [=y] && ARCH_MESON [=y] +drivers/sysreset/sysreset_psci.c: In function 'psci_sysreset_request': +drivers/sysreset/sysreset_psci.c:21:17: error: implicit declaration of function 'psci_sys_reset' [-Werror=implicit-function-declaration] + 21 | psci_sys_reset(type); + | ^~~~~~~~~~~~~~ +drivers/sysreset/sysreset_psci.c:24:17: error: implicit declaration of function 'psci_sys_poweroff' [-Werror=implicit-function-declaration] + 24 | psci_sys_poweroff(); + | ^~~~~~~~~~~~~~~~~ Could you fix it ? Neil