board: beagleboneai64: Define capsule update firmware info
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the
BeagleBoneAI64.
Note this involved creating BeagleBoneAI64's own beagleboneai64.h board
header file instead of reusing j721e_evm's.
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/board/beagle/beagleboneai64/Kconfig b/board/beagle/beagleboneai64/Kconfig
index 7cfccf9..0f21582 100644
--- a/board/beagle/beagleboneai64/Kconfig
+++ b/board/beagle/beagleboneai64/Kconfig
@@ -37,7 +37,7 @@
default "beagle"
config SYS_CONFIG_NAME
- default "j721e_evm"
+ default "beagleboneai64"
source "board/ti/common/Kconfig"
@@ -52,7 +52,7 @@
default "beagle"
config SYS_CONFIG_NAME
- default "j721e_evm"
+ default "beagleboneai64"
source "board/ti/common/Kconfig"
diff --git a/board/beagle/beagleboneai64/beagleboneai64.c b/board/beagle/beagleboneai64/beagleboneai64.c
index c5b4ff7..1e43d1c 100644
--- a/board/beagle/beagleboneai64/beagleboneai64.c
+++ b/board/beagle/beagleboneai64/beagleboneai64.c
@@ -7,6 +7,7 @@
* Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation
*/
+#include <efi_loader.h>
#include <cpu_func.h>
#include <env.h>
#include <fdt_support.h>
@@ -14,6 +15,44 @@
DECLARE_GLOBAL_DATA_PTR;
+struct efi_fw_image fw_images[] = {
+ {
+ .image_type_id = BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID,
+ .fw_name = u"BEAGLEBONEAI64_TIBOOT3",
+ .image_index = 1,
+ },
+ {
+ .image_type_id = BEAGLEBONEAI64_SPL_IMAGE_GUID,
+ .fw_name = u"BEAGLEBONEAI64_SPL",
+ .image_index = 2,
+ },
+ {
+ .image_type_id = BEAGLEBONEAI64_UBOOT_IMAGE_GUID,
+ .fw_name = u"BEAGLEBONEAI64_UBOOT",
+ .image_index = 3,
+ },
+ {
+ .image_type_id = BEAGLEBONEAI64_SYSFW_IMAGE_GUID,
+ .fw_name = u"BEAGLEBONEAI64_SYSFW",
+ .image_index = 4,
+ }
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;"
+ "tispl.bin fat 0 1;u-boot.img fat 0 1; sysfw.itb fat 0 1",
+ .num_images = ARRAY_SIZE(fw_images),
+ .images = fw_images,
+};
+
+#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+ if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+ env_set("dfu_alt_info", update_info.dfu_string);
+}
+#endif
+
int board_init(void)
{
return 0;