
U-Boot configured via DTB can use the same DTB for booting the kernel. When OF_CONTROL is used fdtcontroladdr is setup and can be use for boot.
Signed-off-by: Michal Simek michal.simek@xilinx.com ---
Didn't check if there is any side effect or not but it looks weird when you have DT driver u-boot that you have to load dtb again.
--- arch/arm/lib/bootm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 43cc83ec95b6..9740045b0094 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -245,6 +245,20 @@ static void boot_prep_linux(bootm_headers_t *images) } setup_board_tags(¶ms); setup_end_tag(gd->bd); + } else if (IS_ENABLED(CONFIG_OF_CONTROL)) { +#ifdef CONFIG_OF_LIBFDT + images->ft_addr = (char *)getenv_hex("fdtcontroladdr", 0); + if (!images->ft_addr) { + printf("FDT address failed! hanging..."); + hang(); + } + + debug("using: U-Boot's FDT\n"); + if (image_setup_linux(images)) { + printf("FDT creation failed! hanging..."); + hang(); + } +#endif } else { printf("FDT and ATAGS support not compiled in - hanging\n"); hang();