[PATCH 02/16] board: am64x: Define capsule update firmware info

Jonathan Humphreys j-humphreys at ti.com
Mon Apr 8 23:22:41 CEST 2024


Define the firmwares updatable via EFI capsule update.

Signed-off-by: Jonathan Humphreys <j-humphreys at ti.com>
---
 board/ti/am64x/evm.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
index b8de69da06c..a151023bb7e 100644
--- a/board/ti/am64x/evm.c
+++ b/board/ti/am64x/evm.c
@@ -7,6 +7,7 @@
  *
  */
 
+#include <efi_loader.h>
 #include <asm/io.h>
 #include <dm/uclass.h>
 #include <k3-ddrss.h>
@@ -27,6 +28,38 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
+struct efi_fw_image fw_images[] = {
+	{
+		.image_type_id = K3_TIBOOT3_IMAGE_GUID,
+		.fw_name = u"K3_TIBOOT3",
+		.image_index = 1,
+	},
+	{
+		.image_type_id = K3_SPL_IMAGE_GUID,
+		.fw_name = u"K3_SPL",
+		.image_index = 2,
+	},
+	{
+		.image_type_id = K3_UBOOT_IMAGE_GUID,
+		.fw_name = u"K3_UBOOT",
+		.image_index = 3,
+	},
+};
+
+struct efi_capsule_update_info update_info = {
+	.dfu_string = "sf 0:0=tiboot3.bin raw 0 100000;tispl.bin raw 100000 200000;u-boot.img raw 300000 400000",
+	.num_images = ARRAY_SIZE(fw_images),
+	.images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+	env_set("dfu_alt_info", update_info.dfu_string);
+}
+
+#endif /* EFI_HAVE_CAPSULE_SUPPORT */
+
 int board_init(void)
 {
 	return 0;
-- 
2.34.1



More information about the U-Boot mailing list