Hi Peng, On 24 November 2015 at 01:54, Peng Fan <peng....@freescale.com> wrote: > 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....@freescale.com> > Cc: Simon Glass <s...@chromium.org> > Cc: Joe Hershberger <joe.hershber...@ni.com> > Cc: Max Krummenacher <max.krummenac...@toradex.com> > Cc: Marek Vasut <ma...@denx.de> > Cc: Suriyan Ramasami <suriya...@gmail.com> > Cc: Paul Kocialkowski <cont...@paulk.fr> > Cc: Tom Rini <tr...@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; > }
Are you sure that should not be: fdt_addr = image_data ? The idea is to pick up the FDT from inside the image, since the load address indicates that it should not be relocated. BTW one more thing I noticed: image_data = (ulong)image_get_data(fdt_hdr); The cast is confusing, and can be removed. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot