From: Simon Glass Date: Tue, 23 Jun 2015 21:39:09 +0000 (-0600) Subject: fdt: Provide debug info when a device tree cannot be found X-Git-Tag: KARO-TX6-2015-09-18~1293 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=70e1788a3dec43ea75a8e90671d689afa9a98789;hp=69d518560f97f237fbc0a252cf50fa863b254d85;p=karo-tx-uboot.git 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 --- diff --git a/lib/fdtdec.c b/lib/fdtdec.c index f6c2b195a3..232ca74712 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -568,6 +568,13 @@ int fdtdec_prepare_fdt(void) puts("Missing DTB\n"); #else 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 \n"); +# ifdef DEBUG + if (gd->fdt_blob) { + printf("fdt_blob=%p\n", gd->fdt_blob); + print_buffer((ulong)gd->fdt_blob, gd->fdt_blob, 4, + 32, 0); + } +# endif #endif return -1; }