[U-Boot-Users] Testing todays u-boot-fdt

Jerry Van Baren gerald.vanbaren at smiths-aerospace.com
Fri Apr 20 19:11:13 CEST 2007


Wolfgang Grandegger wrote:
> Hi Jerry,
> 
> Jerry Van Baren wrote:
> [...]
>> Hi wd,

[snip]

> 
> In U-Boot, it's common practice to use "ugly" ifdef's in the source 
> files mainly to reduce compile time as shown in the attached patch.
> 
> Wolfgang.
> 
> ------------------------------------------------------------------------
> 
> diff --git a/libfdt/fdt.c b/libfdt/fdt.c
> index 212b838..1ee67ad 100644
> --- a/libfdt/fdt.c
> +++ b/libfdt/fdt.c
> @@ -16,6 +16,9 @@
>   * License along with this library; if not, write to the Free Software
>   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
>   */
> +#include "config.h"
> +#if CONFIG_OF_LIBFDT
> +
>  #include "libfdt_env.h"
>  
>  #include <fdt.h>
> @@ -83,3 +86,5 @@ int fdt_move(const void *fdt, void *buf, int bufsize)
>  	memmove(buf, fdt, fdt_totalsize(fdt));
>  	return 0;
>  }
> +
> +#endif /* CONFIG_OF_LIBFDT */

[snip more of the same]

Hi Wolfgang,

At this point I'm reluctant to do this.  We've basically forked libfdt 
in that I've added and changed the source and David Gibson isn't in a 
position to accept the changes back into the original, but it is all 
generically useful libfdt code.

Adding the above to all of the files makes it that much more u-boot 
specific which will make it that much more difficult to unfork.  On the 
other hand, it is "only" three lines per file.

Anyone care to weigh in on the issue?  wd?

Best regards,
gvb




More information about the U-Boot mailing list