Hi All

I try to compile a device tree from sources that are lying in the barebox tree. 
The device tree uses #includes and #defines that should be processed by the 
CPP. When I run the dtc.targetinstall step, I get the following error:

--------------------
target: imx6-foo.dtb
--------------------

CPP ptxdist_project/platform-foo/state/imx6-foo.dts.tmp
/bar/ptxdist_project/platform-foo/build-target/barebox/arch/arm/dts/imx6-foo.dts:14:26:
 fatal error: arm/imx6q.dtsi: No such file or directory
 #include <arm/imx6q.dtsi>
                          ^
compilation terminated.

The path arm/imx6q.dtsi is under a different include directory: 
/bar/ptxdist_project/platform-foo/build-target/barebox/dts/src

I added the include path both like so:
PTXCONF_DTC_OFTREE_DTS_PATH=${BAREBOX_DIR}/arch/arm/dts:${BAREBOX_DIR}/dts/src
And so:
DTC_EXTRA_ARGS=-i ${BAREBOX_DIR}/dts/src

But the former only seems to be used to search for the .dts file and the latter 
is only passed to dtc, not the preprocessor that runs before it. I looked at 
the cpp command invocation that causes the problem:
    cpp \
        -Wp,-MD,${tmp_deps} \
        -Wp,-MT,${tmp_dts} \
        -nostdinc \
        ${no_linemarker} \
        -I$(dirname "${dts}") \
        -I${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts \
        -I${dts_kernel_dir}/arch/${dts_kernel_arch}/boot/dts/include \
        -I${dts_kernel_dir}/drivers/of/testcase-data \
        -I${dts_kernel_dir}/include \
        -undef -D__DTS__ -x assembler-with-cpp \
        -o ${tmp_dts} \
        ${dts} &&

Which only seems really work for device trees that are stored in the kernel 
source tree (or need no include directories). So is it currently not possible 
to use custom include directories for the device tree or do I go about it the 
wrong way?

I am using ptxdist-2015.02.0, but the current master looks like it works the 
same way.

Regards
Florian

--
Florian Dörfler, Development Engineer
Direct +41 (0)43 456 16 01  .  Phone +41 (0)43 456 16 00  .  www.scs.ch
Supercomputing Systems AG  .  Technoparkstrasse 1  .  CH-8005 Zürich


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to