{"id":2221221,"url":"http://patchwork.ozlabs.org/api/1.0/covers/2221221/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20260408-b4-amlogic-sysreset-capsules-v1-0-6f3386eb5124@postmarketos.org>","date":"2026-04-08T20:30:11","name":"[0/4] Enable EFI Capsule on Disk on Libre Computer LePotato & LaFrite","submitter":{"id":90020,"url":"http://patchwork.ozlabs.org/api/1.0/people/90020/?format=json","name":"Ferass El Hafidi","email":"funderscore@postmarketos.org"},"series":[{"id":499209,"url":"http://patchwork.ozlabs.org/api/1.0/series/499209/?format=json","date":"2026-04-08T20:30:13","name":"Enable EFI Capsule on Disk on Libre Computer LePotato & LaFrite","version":1,"mbox":"http://patchwork.ozlabs.org/series/499209/mbox/"}],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=postmarketos.org header.i=@postmarketos.org\n header.a=rsa-sha256 header.s=key1 header.b=nED19c5K;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=postmarketos.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=postmarketos.org header.i=@postmarketos.org\n header.b=\"nED19c5K\";\n\tdkim-atps=neutral","phobos.denx.de; dmarc=pass (p=quarantine dis=none)\n header.from=postmarketos.org","phobos.denx.de;\n spf=pass smtp.mailfrom=funderscore@postmarketos.org"],"Received":["from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frZSx2MMxz1xv0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 06:30:41 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 5E72484118;\n\tWed,  8 Apr 2026 22:30:28 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 3E79B840D8; Wed,  8 Apr 2026 22:30:27 +0200 (CEST)","from out-189.mta0.migadu.com (out-189.mta0.migadu.com\n [91.218.175.189])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 1454383693\n for <u-boot@lists.denx.de>; Wed,  8 Apr 2026 22:30:22 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","X-Report-Abuse":"Please report any abuse attempt to abuse@migadu.com and\n include these headers.","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org;\n s=key1; t=1775680221;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=cvI77Jtmc07Wi/iBfIiDoIBTZ32VY0s5UDTrqS7POa0=;\n b=nED19c5KAPmsAQlZhFd3RtmLrGX98p9hVfVB+b0ZkYQouUB7Oa0FqnBIhw0p2WMQNhab0l\n KB/xpCmsA8Y9Jsv0qsp1/GyzN2lC9umWvBvTa0x9cjFZXKXpDoHiIGH2KNNI2eciTiURWs\n Y1SupSchTXMRNEcmg6GWMLIvoY2k5ud3saVvsRsh0FoEdUG27zdNm8pPyCyuWzDcX/f4aL\n GK1FE3jjpW8QwMg4OVE3UjNw3lGQwrlHlVP8hLDfebk2gzmu07p4TEAzyG9XEddHtfYJ9+\n 3dR4mxel9kx8mB9NEj5m7D8i2KPqzuXM8vcY2PxhsWK1bmOxNnAC8TpYOnyqjA==","From":"Ferass El Hafidi <funderscore@postmarketos.org>","Subject":"[PATCH 0/4] Enable EFI Capsule on Disk on Libre Computer LePotato\n & LaFrite","Date":"Wed, 08 Apr 2026 20:30:11 +0000","Message-Id":"\n <20260408-b4-amlogic-sysreset-capsules-v1-0-6f3386eb5124@postmarketos.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","X-B4-Tracking":"v=1; b=H4sIANO61mkC/x3MTQqDMBAG0KvIrB1IQyrWqxQXMX6xA/6R0VIR7\n 27o8m3eSYokUGqKkxK+orLMGY+yoPDx8wCWPpussZVxpubOsZ/GZZDAemiCYuPgV91HKNfx+ap\n sj+hjR7lYE6L8/v27va4bft6QqW4AAAA=","X-Change-ID":"20260408-b4-amlogic-sysreset-capsules-8f5962defafb","To":"u-boot-amlogic@groups.io, u-boot@lists.denx.de","Cc":"Tom Rini <trini@konsulko.com>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Evgeny Bachinin <EABachinin@salutedevices.com>,\n Marek Vasut <marek.vasut+renesas@mailbox.org>,\n Ferass El Hafidi <funderscore@postmarketos.org>","X-Developer-Signature":"v=1; a=openpgp-sha256; l=3079;\n i=funderscore@postmarketos.org; h=from:subject:message-id;\n bh=YPRvrUbBAZvg/htrnQIcPIxxCeAa4eOK5QeINVJhtLs=;\n b=owEBbQKS/ZANAwAKAYSvy9DXiZoDAcsmYgBp1rrX51OPSYcM5tICtsR6Eq2NAENdeZr7DtrZz\n joB4aQru6eJAjMEAAEKAB0WIQQDAbw3+1VcrP15i+6Er8vQ14maAwUCada61wAKCRCEr8vQ14ma\n A7k1D/9eIoeDwi4uNNT5T1/vnn80RvwEj1AGI5DWi8dwWqUP1tHLgHlfwOMCJZ68jDL4Hb5XTKq\n BAtqd1ITFs5ziuL/nF/oTLhkPTC4ksFKbQhu4MxqyN76O7pP3DlNHRmnDVxRCksw/i3+8LKrg1R\n vChLEXwrCFqYtyiteUBRYcl57sRFc8QxuxjNNPHjnyvK4OlerqnCoyI2Vn4HgeIP2QUsupA6+7P\n I3rJYz+mhb0ZP4fK9/BmHcmKwbfKz/Fo3vscJeU/C2elbRjdSPQN8CkCejZllQfKhsBSSCTBaQl\n 21UxgpKjdk1Xk/p/8mrOsidboOWD57d/V5QBDou7MQc10GjUrE1mE3aH/Z7byymG1jXn8HoOb9P\n kaOe7wfxsMT3OI2FH9eQDG0YFRu6dsM1OCf5sJDfx1+12ErdzGhFMssA9Z0LgqU+BGvAXqU6cKB\n I1p1rXVjS08RvtMRIwv9WcXxIR+hA+O5GFnvINbqxO3laOKJTKkBfJ1f1OrAZnu5lsfOOc/QQbI\n 2Mi1rrNhUT7/OmRoUGm6vsKqF8PusLphd4siS4eYL1VWxRHp4rWc3095WBbUZXRqY7Cdl7y808D\n 3CL/e7Ca9p1o0zUZLqjT7pxpWWBHcPG7Sk4CuQIQ7rQ4CwHqMD7RVCezl4EDV7/y8zyKGqvm4Wg\n /6V3L0Fz31vJJ8g==","X-Developer-Key":"i=funderscore@postmarketos.org; a=openpgp;\n fpr=0301BC37FB555CACFD798BEE84AFCBD0D7899A03","X-Migadu-Flow":"FLOW_OUT","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"Mostly everything is already in place to enable EFI capsules and in particular\nEFI capsule on disk.\n\nFirst, switch all Amlogic boards to use SYSRESET. EFI Capsule on Disk\nfunctionality expects sysreset to be present. As the current reset_cpu()\nfunction in board-common.c is basically only doing PSCI reset on U-Boot\nproper, we can replace it with sysreset's PSCI support, which works just\nfine for that purpose provided BL31 is running (SPL stays on an\nSoC-specific reset_cpu() which does for(;;);, as the overhead for\nsysreset is too high and we don't have PSCI yet at that point).\n\nThen we can enable capsule on disk. LaFrite has Capsule updates enabled\nalready, so it is simply a matter of enabling CoD. LePotato does not\nhave Capsule updates enabled by default, however it can be easily enabled\nand setup to update u-boot on eMMC/SD.\n\nWith Capsule on Disk setup, it becomes possible to update U-Boot directly\nfrom Linux, without having to worry about manually using `flashprog`\n(for SPI flash) or `dd` (for eMMC/SD). Instead, thanks to CoD, updates\ncan be handled by `fwupd` and applied upon next EFI boot.\n\nTo test:\n\n * build U-Boot as usual\n\n * in that running U-Boot, run: `efidebug capsule esrt` to get the GUID\n   -OR-\n   run the following in your tree:\n\ttools/mkeficapsule guidgen path_to_devicetree_here U_BOOT_MESON_MMC\n\t                                   (or U_BOOT_MESON_SPI on LaFrite)\n\n * proceed with the following guide to create a capsule file:\n   https://docs.u-boot.org/en/latest/develop/uefi/uefi.html#enabling-uefi-capsule-update-feature\n\n * generate a .cab file suitable for fwupd using `mkcab`:\n   https://gitlab.postmarketos.org/tauchgang/tauchgang-ci/-/tree/main/mkcab\n\tmkcab u-boot-libretech-cc.capsule GUID-GOES-HERE libretech-cc \"LePotato\" 2026.04\n   (as of writing, the README.md suggests this is for Qualcomm only. It\n    actually does nothing that is Qualcomm-specific, and works on any\n    board that supports Capsule on Disk and fwupd)\n\n * on the board itself, boot to Linux via EFI, install fwupd, copy the resulting\n   .cab file, and run as root:\n\tfwupdtool --force install u-boot-libretech-cc.cab\n\n * reboot, make sure you boot over EFI, else the capsule update will not\n   start\n\nSigned-off-by: Ferass El Hafidi <funderscore@postmarketos.org>\n---\nFerass El Hafidi (4):\n      arm: mach-meson: move reset_cpu to spl only\n      arm: meson: enable SYSRESET_PSCI\n      configs: libretech-ac_defconfig: enable EFI Capsule on Disk\n      configs: libretech-cc_defconfig: enable EFI Capsule on Disk\n\n arch/arm/mach-meson/Kconfig        |  2 ++\n arch/arm/mach-meson/board-common.c | 14 --------------\n arch/arm/mach-meson/spl.c          | 10 ++++++++++\n configs/libretech-ac_defconfig     |  1 +\n configs/libretech-cc_defconfig     |  4 ++++\n 5 files changed, 17 insertions(+), 14 deletions(-)\n---\nbase-commit: 4dc4080805fac1b1ed7606ce3bc8fb44a6d59d5e\nchange-id: 20260408-b4-amlogic-sysreset-capsules-8f5962defafb\n\nBest regards,"}