[U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY

Peng Fan Peng.Fan at freescale.com
Tue Nov 24 09:54:22 CET 2015


If condition of "(load == image_start || load == image_data)" is true,
should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
at the end of the switch case.

Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Max Krummenacher <max.krummenacher at toradex.com>
Cc: Marek Vasut <marex at denx.de>
Cc: Suriyan Ramasami <suriyan.r at gmail.com>
Cc: Paul Kocialkowski <contact at paulk.fr>
Cc: Tom Rini <trini at konsulko.com>
---
 common/image-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/image-fdt.c b/common/image-fdt.c
index 5180a03..5e4e5bd 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -326,7 +326,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
 
 			if (load == image_start ||
 			    load == image_data) {
-				fdt_blob = (char *)image_data;
+				fdt_addr = load;
 				break;
 			}
 
-- 
2.6.2




More information about the U-Boot mailing list