Skip to content
Snippets Groups Projects
Commit 2059ecf3 authored by Cooper Jr., Franklin's avatar Cooper Jr., Franklin Committed by Tom Rini
Browse files

fdt: Enable selecting correct DTB from appended FIT Image


This patch gives U-boot the runtime support to have the board specific
code decide which FDT to use. This is especially useful for devices
that need this type of runtime determination and also doesn't use SPL.

Signed-off-by: default avatarFranklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 92926bc8
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
*/
#ifndef USE_HOSTCC
#include <boot_fit.h>
#include <common.h>
#include <dm.h>
#include <errno.h>
......@@ -1221,6 +1222,15 @@ int fdtdec_setup(void)
gd->fdt_blob = (ulong *)&_image_binary_end;
else
gd->fdt_blob = (ulong *)&__bss_end;
# elif defined CONFIG_FIT_EMBED
gd->fdt_blob = locate_dtb_in_fit(&_end);
if (gd->fdt_blob == NULL || gd->fdt_blob <= ((void *)&_end)) {
puts("Failed to find proper dtb in embedded FIT Image\n");
return -1;
}
# else
/* FDT is at end of image */
gd->fdt_blob = (ulong *)&_end;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment