board: beagleplay: 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
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>
This commit is contained in:
Jonathan Humphreys 2024-06-14 11:35:37 -05:00 committed by Tom Rini
parent 44ba2836d4
commit 195f0e3a93
3 changed files with 77 additions and 2 deletions

View 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"

View 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>
@ -15,6 +16,39 @@
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;

View File

@ -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 */