]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: beagleplay: Define capsule update firmware info
authorJonathan Humphreys <j-humphreys@ti.com>
Fri, 14 Jun 2024 16:35:37 +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
BeaglePlay.

Note this involved creating BeaglePlay's own beagleplay.h board header file
instead of reusing am62_evm's.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
board/beagle/beagleplay/Kconfig
board/beagle/beagleplay/beagleplay.c
include/configs/beagleplay.h [new file with mode: 0644]

index 7dbd833acb4ccca8a44c0eec53090e84f39fd55a..b0e67dc8ef3d71a8aead9040e20a0df60d0a7c3a 100644 (file)
@@ -35,7 +35,7 @@ config SYS_VENDOR
        default "beagle"
 
 config SYS_CONFIG_NAME
-       default "am62x_evm"
+       default "beagleplay"
 
 source "board/ti/common/Kconfig"
 
@@ -50,7 +50,7 @@ config SYS_VENDOR
        default "beagle"
 
 config SYS_CONFIG_NAME
-       default "am62x_evm"
+       default "beagleplay"
 
 config SPL_LDSCRIPT
        default "arch/arm/mach-omap2/u-boot-spl.lds"
index af36439e2e229cd0feef843a2c1a233864db637a..a21f09e3122d5bb432e065916b92244111eeeef3 100644 (file)
@@ -6,6 +6,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 = BEAGLEPLAY_TIBOOT3_IMAGE_GUID,
+               .fw_name = u"BEAGLEPLAY_TIBOOT3",
+               .image_index = 1,
+       },
+       {
+               .image_type_id = BEAGLEPLAY_SPL_IMAGE_GUID,
+               .fw_name = u"BEAGLEPLAY_SPL",
+               .image_index = 2,
+       },
+       {
+               .image_type_id = BEAGLEPLAY_UBOOT_IMAGE_GUID,
+               .fw_name = u"BEAGLEPLAY_UBOOT",
+               .image_index = 3,
+       }
+};
+
+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",
+       .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/beagleplay.h b/include/configs/beagleplay.h
new file mode 100644 (file)
index 0000000..4baeab6
--- /dev/null
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Configuration header file for BeaglePlay
+ *
+ * https://beagleplay.org/
+ *
+ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef __CONFIG_BEAGLEPLAY_H
+#define __CONFIG_BEAGLEPLAY_H
+
+/**
+ * define BEAGLEPLAY_TIBOOT3_IMAGE_GUID - firmware GUID for BeaglePlay
+ *                                        tiboot3.bin
+ * define BEAGLEPLAY_SPL_IMAGE_GUID     - firmware GUID for BeaglePlay SPL
+ * define BEAGLEPLAY_UBOOT_IMAGE_GUID   - firmware GUID for BeaglePlay 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 BEAGLEPLAY_TIBOOT3_IMAGE_GUID \
+       EFI_GUID(0x0e225a09, 0xf720, 0x4d57, 0x91, 0x20, \
+               0xe2, 0x8f, 0x73, 0x7f, 0x5a, 0x5e)
+
+#define BEAGLEPLAY_SPL_IMAGE_GUID \
+       EFI_GUID(0xb2e7cc49, 0x1a5a, 0x4036, 0xae, 0x01, \
+               0x33, 0x87, 0xc3, 0xbe, 0xf6, 0x57)
+
+#define BEAGLEPLAY_UBOOT_IMAGE_GUID \
+       EFI_GUID(0x92c92b11, 0xa7ee, 0x486f, 0xaa, 0xa2, \
+               0x71, 0x3d, 0x84, 0x42, 0x5b, 0x0e)
+
+/* Now for the remaining common defines */
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_BEAGLEPLAY_H */