Commit cb5f97f70766fdabc90847bbbc25eb759b2b4797
1 parent
c4af6732c4
Exists in
v2017.01-smarct4x
and in
30 other branches
fdt: Provide debug info when a device tree cannot be found
It can be quite confusing with a new platform to figure out why the device tree cannot be located. Add some debug information for this case. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
lib/fdtdec.c
... | ... | @@ -568,6 +568,13 @@ |
568 | 568 | puts("Missing DTB\n"); |
569 | 569 | #else |
570 | 570 | puts("No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>\n"); |
571 | +# ifdef DEBUG | |
572 | + if (gd->fdt_blob) { | |
573 | + printf("fdt_blob=%p\n", gd->fdt_blob); | |
574 | + print_buffer((ulong)gd->fdt_blob, gd->fdt_blob, 4, | |
575 | + 32, 0); | |
576 | + } | |
577 | +# endif | |
571 | 578 | #endif |
572 | 579 | return -1; |
573 | 580 | } |