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

Stephen Warren swarren at wwwdotorg.org
Mon May 5 18:54:52 CEST 2014


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?


More information about the U-Boot mailing list