From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 05 May 2014 10:54:52 -0600 Subject: [U-Boot] [RFC PATCH v2 04/13] Makefile: Support include files for .dts files In-Reply-To: <1399306150-932-5-git-send-email-sjg@chromium.org> References: <1399306150-932-1-git-send-email-sjg@chromium.org> <1399306150-932-5-git-send-email-sjg@chromium.org> Message-ID: <5367C25C.5040709@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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?