mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Dörfler Florian" <Florian.Doerfler@scs.ch>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] dts target: How do I pass a device tree include directory?
Date: Mon, 27 Feb 2017 13:46:09 +0000	[thread overview]
Message-ID: <3b5a8fe1bbc047e1bb6aabc22bf6f3d4@vm-evoca.scs-ad.scs.ch> (raw)

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	other threads:[~2017-02-27 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 13:46 Dörfler Florian [this message]
2017-03-08  9:38 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b5a8fe1bbc047e1bb6aabc22bf6f3d4@vm-evoca.scs-ad.scs.ch \
    --to=florian.doerfler@scs.ch \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox