#include <bootflow.h>
#include <ctype.h>
#include <dm/ofnode.h>
+#include <efi.h>
+#include <efi_loader.h>
#include <env.h>
#include <errno.h>
#include <init.h>
#define lmb_alloc(size, addr) \
lmb_alloc_mem(LMB_MEM_ALLOC_ANY, SZ_2M, addr, size, LMB_NONE)
+struct efi_fw_image fw_images[] = {
+ {
+ .fw_name = u"UBOOT_BOOT_PARTITION",
+ .image_index = 1,
+ },
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = NULL,
+ .images = fw_images,
+ .num_images = ARRAY_SIZE(fw_images),
+};
+
/*
* The memory mapping includes all DRAM banks, along with the
* peripheral block, and a sentinel at the end. This is filled in
struct blk_desc *blk_desc;
struct disk_partition info = {0};
unsigned long largest_part_start = 0, largest_part_size = 0;
+ static char dfu_string[32];
int i;
blk_ifname = "mmc";
if (part_get_info(blk_desc, i, &info))
continue;
+ if (!update_info.dfu_string &&
+ !strncasecmp(info.name, "boot", strlen("boot"))) {
+ snprintf(dfu_string, sizeof(dfu_string),
+ "mmc %d=u-boot.bin part %d %d", blk_dev,
+ blk_dev, i);
+ update_info.dfu_string = dfu_string;
+ }
+
if (info.start > largest_part_size) {
largest_part_start = info.start;
largest_part_size = info.size;
CONFIG_SYS_LOAD_ADDR=0x80000000
CONFIG_ARMV8_CNTFRQ_BROKEN=y
# CONFIG_PSCI_RESET is not set
+CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_ON_DISK_EARLY=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
CONFIG_BUTTON_CMD=y
CONFIG_USE_PREBOOT=y
CONFIG_SAVE_PREV_BL_FDT_ADDR=y
CONFIG_BUTTON=y
CONFIG_BUTTON_REMAP_PHONE_KEYS=y
CONFIG_CLK_EXYNOS7870=y
+CONFIG_DFU_MMC=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x200000
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0xdead0000
CONFIG_FASTBOOT_FLASH=y