diff options
author | Sughosh Ganu <sughosh.ganu@linaro.org> | 2022-04-15 11:29:34 +0530 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-15 10:43:18 +0200 |
commit | 741ef867288bb294039e34ab2287ffe981b05b86 (patch) | |
tree | 283cab5cd74fea8b86672de3dc3fdb674117dd17 /board/advantech | |
parent | 42a2d90cf51acea56bf19006ed5688c93c099ff0 (diff) | |
download | u-boot-741ef867288bb294039e34ab2287ffe981b05b86.tar.gz |
capsule: board: Add information needed for capsule updates
Add a structure which defines the information that is needed for
executing capsule updates on a platform. Some information in the
structure like the dfu string is used for making the update process
more robust while some information like the per platform image GUIDs
is used for fixing issues. Initialise this structure in the board
file, and use the information for the capsule updates.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Diffstat (limited to 'board/advantech')
-rw-r--r-- | board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c index 16566092bd8..782025dc785 100644 --- a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +++ b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c @@ -6,6 +6,8 @@ #include <common.h> #include <dwc3-uboot.h> +#include <efi.h> +#include <efi_loader.h> #include <errno.h> #include <miiphy.h> #include <netdev.h> @@ -21,6 +23,7 @@ #include <asm/arch/clock.h> #include <asm/mach-imx/dma.h> #include <linux/delay.h> +#include <linux/kernel.h> #include <power/pmic.h> DECLARE_GLOBAL_DATA_PTR; @@ -44,6 +47,32 @@ static void setup_gpmi_nand(void) } #endif +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) +struct efi_fw_image fw_images[] = { +#if defined(CONFIG_TARGET_IMX8MP_RSB3720A1_4G) + { + .image_type_id = IMX8MP_RSB3720A1_4G_FIT_IMAGE_GUID, + .fw_name = u"IMX8MP-RSB3720-FIT", + .image_index = 1, + }, +#elif defined(CONFIG_TARGET_IMX8MP_RSB3720A1_6G) + { + .image_type_id = IMX8MP_RSB3720A1_6G_FIT_IMAGE_GUID, + .fw_name = u"IMX8MP-RSB3720-FIT", + .image_index = 1, + }, +#endif +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "mmc 2=flash-bin raw 0 0x1B00 mmcpart 1", + .images = fw_images, +}; + +u8 num_image_type_guids = ARRAY_SIZE(fw_images); +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ + + int board_early_init_f(void) { struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR; |