cmd: add resize for FDT in bootelf
In some FDTs, there is not enough free memory to add nodes, so this
operation fails.
Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/cmd/elf.c b/cmd/elf.c
index 32b7462..673c6c3 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -68,6 +68,8 @@
log_debug("Setting up FDT at 0x%08lx ...\n", fdt_addr);
flush();
+ fdt_set_totalsize((void *)fdt_addr,
+ fdt_totalsize(fdt_addr) + CONFIG_SYS_FDT_PAD);
if (image_setup_libfdt(&img, (void *)fdt_addr, NULL))
return 1;
}