diff options
Diffstat (limited to 'board/sandbox/sandbox.c')
-rw-r--r-- | board/sandbox/sandbox.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 5d9a945d64..28ad6efd13 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -7,6 +7,8 @@ #include <cpu_func.h> #include <cros_ec.h> #include <dm.h> +#include <efi.h> +#include <efi_loader.h> #include <env_internal.h> #include <init.h> #include <led.h> @@ -14,6 +16,7 @@ #include <asm/global_data.h> #include <asm/test.h> #include <asm/u-boot-sandbox.h> +#include <linux/kernel.h> #include <malloc.h> #include <extension_board.h> @@ -25,6 +28,37 @@ */ gd_t *gd; +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) +struct efi_fw_image fw_images[] = { +#if defined(CONFIG_EFI_CAPSULE_FIRMWARE_RAW) + { + .image_type_id = SANDBOX_UBOOT_IMAGE_GUID, + .fw_name = u"SANDBOX-UBOOT", + .image_index = 1, + }, + { + .image_type_id = SANDBOX_UBOOT_ENV_IMAGE_GUID, + .fw_name = u"SANDBOX-UBOOT-ENV", + .image_index = 2, + }, +#elif defined(CONFIG_EFI_CAPSULE_FIRMWARE_FIT) + { + .image_type_id = SANDBOX_FIT_IMAGE_GUID, + .fw_name = u"SANDBOX-FIT", + .image_index = 1, + }, +#endif +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=u-boot-bin raw 0x100000 0x50000;" + "u-boot-env raw 0x150000 0x200000", + .images = fw_images, +}; + +u8 num_image_type_guids = ARRAY_SIZE(fw_images); +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ + #if !CONFIG_IS_ENABLED(OF_PLATDATA) /* * Add a simple GPIO device (don't use with of-platdata as it interferes with |