From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] dts target: How do I pass a device tree include directory?
Date: Wed, 8 Mar 2017 10:38:37 +0100 [thread overview]
Message-ID: <20170308093837.w5uhlfnd5s3bu7cj@pengutronix.de> (raw)
In-Reply-To: <3b5a8fe1bbc047e1bb6aabc22bf6f3d4@vm-evoca.scs-ad.scs.ch>
Hi,
On Mon, Feb 27, 2017 at 01:46:09PM +0000, Dörfler Florian wrote:
> 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?
This is not supported. You could change the commandline with a custom
version of scripts/lib/ptxd_make_dts_dtc.sh in your BSP but then you may
run into dependency problems. This is only intended to work with the
kernel.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2017-03-08 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 13:46 Dörfler Florian
2017-03-08 9:38 ` Michael Olbrich [this message]
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=20170308093837.w5uhlfnd5s3bu7cj@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--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