]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: beagleboneai64: Define capsule update firmware info
authorJonathan Humphreys <j-humphreys@ti.com>
Fri, 14 Jun 2024 16:35:46 +0000 (11:35 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jun 2024 16:43:29 +0000 (10:43 -0600)
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>
board/beagle/beagleboneai64/Kconfig
board/beagle/beagleboneai64/beagleboneai64.c
include/configs/beagleboneai64.h [new file with mode: 0644]

index 7cfccf9baf0108e53a0d8da8b424e0ecac678619..0f21582614d59182c97bc4b4c0ca5829ab38a7db 100644 (file)
@@ -37,7 +37,7 @@ config SYS_VENDOR
        default "beagle"
 
 config SYS_CONFIG_NAME
-       default "j721e_evm"
+       default "beagleboneai64"
 
 source "board/ti/common/Kconfig"
 
@@ -52,7 +52,7 @@ config SYS_VENDOR
        default "beagle"
 
 config SYS_CONFIG_NAME
-       default "j721e_evm"
+       default "beagleboneai64"
 
 source "board/ti/common/Kconfig"
 
index c5b4ff7df47aeccf35d73ff49c5efe1d5e7cd290..1e43d1c1bd23b5ca4634c481d52de98ce113bf61 100644 (file)
@@ -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>
 
 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;
diff --git a/include/configs/beagleboneai64.h b/include/configs/beagleboneai64.h
new file mode 100644 (file)
index 0000000..85d5724
--- /dev/null
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Configuration header file for BeagleBoneAI64
+ *
+ * https://beagleboard.org/ai-64
+ *
+ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef __CONFIG_BEAGLEBONEAI64_H
+#define __CONFIG_BEAGLEBONEAI64_H
+
+/* FLASH Configuration */
+#define CFG_SYS_FLASH_BASE             0x000000000
+
+/* SPL Loader Configuration */
+#define CFG_SYS_UBOOT_BASE             0x50080000
+
+/**
+ * define BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID - firmware GUID for BeagleBoneAI64
+ *                                            tiboot3.bin
+ * define BEAGLEBONEAI64_SPL_IMAGE_GUID     - firmware GUID for BeagleBoneAI64
+ *                                            SPL
+ * define BEAGLEBONEAI64_UBOOT_IMAGE_GUID   - firmware GUID for BeagleBoneAI64
+ *                                            UBOOT
+ * define BEAGLEBONEAI64_SYSFW_IMAGE_GUID   - firmware GUID for BeagleBoneAI64
+ *                                            SYSFW
+ *
+ * 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 BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID \
+       EFI_GUID(0x772a4810, 0x2194, 0x4923, 0x87, 0x54, \
+               0x01, 0x15, 0x87, 0x0e, 0xf3, 0x67)
+
+#define BEAGLEBONEAI64_SPL_IMAGE_GUID \
+       EFI_GUID(0x83447222, 0x1e26, 0x40cd, 0xa3, 0x95, \
+               0xb7, 0xde, 0x09, 0x57, 0xe8, 0x75)
+
+#define BEAGLEBONEAI64_UBOOT_IMAGE_GUID \
+       EFI_GUID(0x4249ff77, 0xc17d, 0x4eb7, 0xa1, 0xdb, \
+               0x45, 0xaa, 0x98, 0x87, 0xd4, 0x9e)
+
+#define BEAGLEBONEAI64_SYSFW_IMAGE_GUID \
+       EFI_GUID(0xdfc9c683, 0x49b7, 0x46bd, 0xb3, 0xc1, \
+               0x3a, 0x3b, 0x2f, 0xdb, 0x13, 0x5b)
+
+/* Now for the remaining common defines */
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_BEAGLEBONEAI64_H */