[U-Boot] [RFC PATCH v2 04/13] Makefile: Support include files for .dts files

Masahiro Yamada yamada.m at jp.panasonic.com
Wed May 7 04:15:25 CEST 2014


Hi Simon, Stephen,

On Mon, 05 May 2014 10:54:52 -0600
Stephen Warren <swarren at wwwdotorg.org> wrote:

> On 05/05/2014 10:09 AM, Simon Glass wrote:
> > Linux supports this, and if we are to have compatible device tree files,
> > U-Boot should also.
> 
> > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> 
> >  # Modified for U-Boot
> >  dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
> >  		 -I$(srctree)/arch/$(ARCH)/dts                           \
> > +		 -I$(srctree)/include                                    \
> >  		 -undef -D__DTS__
> 
> I don't think we should add the top-level include/ directory to the DT
> include path. That is something I very specifically avoided in the
> kernel Makefiles. If we did allow this, then DTs could start including
> arbitrary U-Boot header files, rather than just header files intended to
> be used in DT bindings, and that would then make the DT files used in
> U-Boot not portable to the Linux kernel, or any standalone DT file
> repository which may appear.
> 
> Instead, let's create a standalone root directory for the DT include
> files, and add that to the DT header path. We can add this DT-specific
> include path to the include patch for U-Boot C code if needed.
> 
> Perhaps we can create a top-level dt/include/ or device-tree/include
> directory for this?

I agree with Stephen.
I hesitate to add the top-level include/ to the path.

If we try to follow the Linux style,
we can add the include path "-I$(srctree)/arch/$(ARCH)/dts/include
and create symbolic links to include/dt-bindings.

Best Regards
Masahiro Yamada



More information about the U-Boot mailing list