diff options
author | Sughosh Ganu <sughosh.ganu@linaro.org> | 2022-04-15 08:59:34 +0300 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-15 11:43:18 +0300 |
commit | 741ef867288bb294039e34ab2287ffe981b05b86 (patch) | |
tree | 283cab5cd74fea8b86672de3dc3fdb674117dd17 /board/kontron/sl28/sl28.c | |
parent | 42a2d90cf51acea56bf19006ed5688c93c099ff0 (diff) | |
download | u-boot-741ef867288bb294039e34ab2287ffe981b05b86.tar.xz |
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/kontron/sl28/sl28.c')
-rw-r--r-- | board/kontron/sl28/sl28.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c index 17bb457736..32e9694b77 100644 --- a/board/kontron/sl28/sl28.c +++ b/board/kontron/sl28/sl28.c @@ -3,11 +3,14 @@ #include <common.h> #include <dm.h> #include <malloc.h> +#include <efi.h> +#include <efi_loader.h> #include <errno.h> #include <fsl_ddr.h> #include <fdt_support.h> #include <asm/global_data.h> #include <linux/libfdt.h> +#include <linux/kernel.h> #include <env_internal.h> #include <asm/arch-fsl-layerscape/soc.h> #include <asm/arch-fsl-layerscape/fsl_icid.h> @@ -23,6 +26,24 @@ DECLARE_GLOBAL_DATA_PTR; +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) +struct efi_fw_image fw_images[] = { + { + .image_type_id = KONTRON_SL28_FIT_IMAGE_GUID, + .fw_name = u"KONTRON-SL28-FIT", + .image_index = 1, + }, +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=u-boot-bin raw 0x210000 0x1d0000;" + "u-boot-env raw 0x3e0000 0x20000", + .images = fw_images, +}; + +u8 num_image_type_guids = ARRAY_SIZE(fw_images); +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ + int board_early_init_f(void) { fsl_lsch3_early_init_f(); |