From: Randolph Sapp <[email protected]>
Add support for EFI capsules for this device. One large caveat is that
the partition holding boot binaries cannot be the ESP partition due to
the following ROM limitations.
- The boot disk must be MBR
- The boot partition must be labeled 0x0c with a boot flag
A separate ESP partition should be provided for EFI capabilities.
Signed-off-by: Randolph Sapp <[email protected]>
---
v3:
- Remove unnecessary dfu_alt_info_ram variable
---
.../arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi | 29 +++++++++++++++++++
board/beagle/pocketbeagle2/pocketbeagle2.c | 26 +++++++++++++++++
configs/am62_pocketbeagle2_a53_defconfig | 1 +
include/configs/pocketbeagle2.h | 25 ++++++++++++++++
4 files changed, 81 insertions(+)
diff --git a/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi b/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
index 452161115318..283e26380e48 100644
--- a/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
@@ -181,6 +181,17 @@
};
};
};
+
+#include "k3-binman-capsule-r5.dtsi"
+
+// Capsule update GUIDs in string form. See pocketbeagle2.h
+#define POCKETBEAGLE2_TIBOOT3_IMAGE_GUID_STR "F0D53723-106E-5346-8A41-85EB2D07C720"
+
+&capsule_tiboot3 {
+ efi-capsule {
+ image-guid = POCKETBEAGLE2_TIBOOT3_IMAGE_GUID_STR;
+ };
+};
#endif /* CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2 */
#if IS_ENABLED(CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2)
@@ -304,4 +315,22 @@
};
};
};
+
+#include "k3-binman-capsule.dtsi"
+
+// Capsule update GUIDs in string form. See pocketbeagle2.h
+#define POCKETBEAGLE2_SPL_IMAGE_GUID_STR "C73FDEA2-3964-58C8-8A25-E55102172E1D"
+#define POCKETBEAGLE2_UBOOT_IMAGE_GUID_STR "520E1012-DE6C-5992-B43A-95D53D8332F2"
+
+&capsule_tispl {
+ efi-capsule {
+ image-guid = POCKETBEAGLE2_SPL_IMAGE_GUID_STR;
+ };
+};
+
+&capsule_uboot {
+ efi-capsule {
+ image-guid = POCKETBEAGLE2_UBOOT_IMAGE_GUID_STR;
+ };
+};
#endif /* CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2 */
diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
index 291a1c6c3db7..acc694c253ea 100644
--- a/board/beagle/pocketbeagle2/pocketbeagle2.c
+++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
@@ -7,6 +7,7 @@
* Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation
*/
+#include <efi_loader.h>
#include <env.h>
#include <fdt_support.h>
#include <spl.h>
@@ -19,6 +20,31 @@
DECLARE_GLOBAL_DATA_PTR;
+struct efi_fw_image fw_images[] = {
+ {
+ .image_type_id = POCKETBEAGLE2_TIBOOT3_IMAGE_GUID,
+ .fw_name = u"POCKETBEAGLE2_TIBOOT3",
+ .image_index = 1,
+ },
+ {
+ .image_type_id = POCKETBEAGLE2_SPL_IMAGE_GUID,
+ .fw_name = u"POCKETBEAGLE2_SPL",
+ .image_index = 2,
+ },
+ {
+ .image_type_id = POCKETBEAGLE2_UBOOT_IMAGE_GUID,
+ .fw_name = u"POCKETBEAGLE2_UBOOT",
+ .image_index = 3,
+ }
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = "mmc 1=tiboot3.bin fat 1 1;"
+ "tispl.bin fat 1 1;u-boot.img fat 1 1",
+ .num_images = ARRAY_SIZE(fw_images),
+ .images = fw_images,
+};
+
int dram_init(void)
{
return fdtdec_setup_mem_size_base();
diff --git a/configs/am62_pocketbeagle2_a53_defconfig b/configs/am62_pocketbeagle2_a53_defconfig
index 8964cb3b1955..7428926a8ba6 100644
--- a/configs/am62_pocketbeagle2_a53_defconfig
+++ b/configs/am62_pocketbeagle2_a53_defconfig
@@ -122,3 +122,4 @@ CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_LZO=y
#include <configs/am62x_a53_usbdfu.config>
+#include <configs/k3_efi_capsule.config>
diff --git a/include/configs/pocketbeagle2.h b/include/configs/pocketbeagle2.h
index dd6956aa8b90..aed60d325742 100644
--- a/include/configs/pocketbeagle2.h
+++ b/include/configs/pocketbeagle2.h
@@ -8,6 +8,31 @@
#ifndef __CONFIG_POCKETBEAGLE2_H
#define __CONFIG_POCKETBEAGLE2_H
+/**
+ * define POCKETBEAGLE2_TIBOOT3_IMAGE_GUID - firmware GUID for PocketBeagle 2
+ * tiboot3.bin
+ * define POCKETBEAGLE2_SPL_IMAGE_GUID - firmware GUID for PocketBeagle 2 SPL
+ * define POCKETBEAGLE2_UBOOT_IMAGE_GUID - firmware GUID for PocketBeagle 2 UBOOT
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define POCKETBEAGLE2_TIBOOT3_IMAGE_GUID \
+ EFI_GUID(0xF0D53723, 0x106E, 0x5346, 0x8A, 0x41, 0x85, 0xEB, 0x2D, \
+ 0x07, 0xC7, 0x20)
+
+#define POCKETBEAGLE2_SPL_IMAGE_GUID \
+ EFI_GUID(0xC73FDEA2, 0x3964, 0x58C8, 0x8A, 0x25, 0xE5, 0x51, 0x02, \
+ 0x17, 0x2E, 0x1D)
+
+#define POCKETBEAGLE2_UBOOT_IMAGE_GUID \
+ EFI_GUID(0x520E1012, 0xDE6C, 0x5992, 0xB4, 0x3A, 0x95, 0xD5, 0x3D, \
+ 0x83, 0x32, 0xF2)
+
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
--
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.