From: Maxim Moskalets Date: Fri, 28 Jun 2024 08:34:11 +0000 (+0300) Subject: cmd: add resize for FDT in bootelf X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=8d57f46ab06d6e6178aa3ae321a5e58aa529b017;p=u-boot.git 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 Reviewed-by: Simon Glass --- diff --git a/cmd/elf.c b/cmd/elf.c index 32b7462f92..673c6c3051 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -68,6 +68,8 @@ int do_bootelf(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) 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; }