Skip to contentSkip to conversation

arm-bsp/u-boot: corstone1000: on-disk capsule update

PATCH Applied [email protected] 2 participants 4 messages Oct 26, 2023 – Oct 27, 2023

lore
Share & tools
lore
#0 lore raw

cover arm-bsp/u-boot: corstone1000: on-disk capsule update

From: Emekcan Aras <[email protected]>

This patchset enables on-disk capsule update and fixes few missing flag checks for capsule-update.

Emekcan Aras (2):
arm-bsp/u-boot: corstone1000: enable on-disk capsule update arm-bsp/u-boot: corstone1000: fix runtime capsule update flag checks

 .../u-boot/u-boot-corstone1000.inc            |  2 +
 ...nables-ondisk-capsule-update-feature.patch | 33 +++++++++++
 ...-runtime-capsule-update-flags-checks.patch | 56 +++++++++++++++++++
 3 files changed, 91 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0039-enables-ondisk-capsule-update-feature.patch
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0040-fix-runtime-capsule-update-flags-checks.patch
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 arm-bsp/u-boot: corstone1000: enable on-disk capsule update

From: Emekcan Aras <[email protected]>

Enables on-disk capsule update feature for corstone1000.

---
 .../u-boot/u-boot-corstone1000.inc            |  1 +
 ...nables-ondisk-capsule-update-feature.patch | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0039-enables-ondisk-capsule-update-feature.patch
meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc +1 -0
index e978e06a..6c56c2fe 100644
@@ -46,6 +46,7 @@ SRC_URI:append = " \
     file://0036-corstone1000-add-signature-device-tree-overlay.patch \
     file://0037-corstone1000-enable-authenticated-capsule-config.patch \
     file://0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch \
+    file://0039-enables-ondisk-capsule-update-feature.patch		  \
     "
 
 do_configure:append(){
meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0039-enables-ondisk-capsule-update-feature.patch new file +33 -0
new file mode 100644
index 00000000..cd002aca
@@ -0,0 +1,33 @@
+From e5057a10641a7c84186bcbbcd12ee904300ebc53 Mon Sep 17 00:00:00 2001
+From: Emekcan Aras <[email protected]>
+Date: Fri, 13 Oct 2023 15:19:32 +0100
+Subject: [PATCH] Enables on-disk capsule update feature
+
+Enables on-disk capsule update feature for corstone1000.
+
+Signed-off-by: Emekcan Aras <[email protected]>
+Upstream-Status: Inappropriate [Redesign of Capsule update interface is required]
+---
+ lib/efi_loader/efi_capsule.c | 5 ++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
+index e1c78d8c1c..63e4c06e58 100644
+--- a/lib/efi_loader/efi_capsule.c
++++ b/lib/efi_loader/efi_capsule.c
+@@ -1499,7 +1499,12 @@ efi_status_t efi_launch_capsules(void)
+			index = 0;
+		ret = efi_capsule_read_file(files[i], &capsule);
+		if (ret == EFI_SUCCESS) {
++			#if IS_ENABLED(CONFIG_TARGET_CORSTONE1000)
++			/* capsule update only supports 1 image and no scatter gather list for corstone1000 */
++			efi_update_capsule(&capsule, 1, 0);
++			#elif
+			ret = efi_capsule_update_firmware(capsule);
++			#endif
+			if (ret != EFI_SUCCESS) {
+				log_err("Applying capsule %ls failed.\n",
+					files[i]);
+--
+2.25.1
+
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 arm-bsp/u-boot: corstone1000: fix runtime capsule update flag checks

In reply to [email protected]

From: Emekcan Aras <[email protected]>

Platform-specific capsule-update feature in u-boot does not check the capsule-update flags properly (as stated in UEFI specs). This patch fixes the capsule flags checks in u-boot for corstone1000.

---
 .../u-boot/u-boot-corstone1000.inc            |  1 +
 ...-runtime-capsule-update-flags-checks.patch | 56 +++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0040-fix-runtime-capsule-update-flags-checks.patch
meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc +1 -0
index 6c56c2fe..7a7b155c 100644
@@ -47,6 +47,7 @@ SRC_URI:append = " \
     file://0037-corstone1000-enable-authenticated-capsule-config.patch \
     file://0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch \
     file://0039-enables-ondisk-capsule-update-feature.patch		  \
+    file://0040-fix-runtime-capsule-update-flags-checks.patch		  \
     "
 
 do_configure:append(){
meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0040-fix-runtime-capsule-update-flags-checks.patch new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
2.25.1
Applied
#3 lore raw
In reply to [email protected]
Quoted 10 lines · On Thu, 26 Oct 2023 13:43:01 +0100, [email protected] wrote:

From: Emekcan Aras <[email protected]>

This patchset enables on-disk capsule update and fixes few missing flag checks for capsule-update.

Emekcan Aras (2):
arm-bsp/u-boot: corstone1000: enable on-disk capsule update arm-bsp/u-boot: corstone1000: fix runtime capsule update flag checks

[...]

Applied, thanks!

[1/2] arm-bsp/u-boot: corstone1000: enable on-disk capsule update

      commit: b3f58a0d09b01c813e3988e7ec8736642d77e954
[2/2] arm-bsp/u-boot: corstone1000: fix runtime capsule update flag checks
      commit: f37dc57c5482cfc6ccdd4e26a261bf1bbe96a8df

Best regards,

Signature · 1 line
Jon Mason <[email protected]>