[U-Boot-Users] LIBFDT: bogus definition of fdt in libfdt_env.h

Jerry Van Baren gerald.vanbaren at smiths-aerospace.com
Wed Apr 25 14:08:18 CEST 2007

Wolfgang Grandegger wrote:
> Hi Jerry,
> in libfdt_env.h there is fdt defined as:
> struct fdt_header *fdt;	/* Pointer to the working fdt */
> I think it should be declared "extern", because the file is included by 
> more than one file. Or the declaration should be moved to cmd_fdt.c, 
> because it's the only file actually using it.
> Wolfgang.

Hi Wolfgang G,

Yes, that is not declared properly.  IIRC, I split the fdt_support.c out 
of cmd_fdt.c and moved the declaration into the .h file because I 
thought I would need it in more places (cmd_bootm.c, IIRC).  The move 
was done poorly.

I'll add figuring out the proper location and declaration to the cleanup 
list.  It probably should move (as a static) back into cmd_fdt.c until 
it is actually needed elsewhere.


More information about the U-Boot mailing list