devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>,
	Device Tree Mailing List <devicetree@vger.kernel.org>
Subject: Re: dtx_diff: "fatal error: imx6qp.dtsi: No such file or directory"
Date: Mon, 19 Nov 2018 14:17:38 -0800	[thread overview]
Message-ID: <bf3bbdd3-0d81-f525-71c5-6177eb865f7c@gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.21.1710290430280.4745@localhost.localdomain>

Hi Robert,

On 10/29/17 1:52 AM, Robert P. J. Day wrote:
> 
>   not sure why i can't dtx_diff two .dts files if they're located
> outside of a kernel source tree -- the dtx_diff script certainly seems
> to suggest that's possible.
> 
>   with my kernel source tree at ~/k/git, i set things up with:
> 
>   $ PATH=$PATH:~/k/git/scripts/dtc
>   $ export ARCH=arm
> 
>   first test, which works just fine (comparing imx6q-sabresd.dts and
> imx6qp-sabresd.dts), first "cd"ing to the top of my kernel source
> git repo:
> 
>   $ cd ~/k/git
>   $ dtx_diff arch/arm/boot/dts/imx6q{,p}-sabresd.dts
> 
> appears to work fine, no need to use either of -s or -S to identify
> the source tree since, by default, the script assumes that's where
> you're located.
> 
>   next, "cd" down to that dts directory and try the same command
> again:
> 
>   $ cd arch/arm/boot/dts
>   $ dtx_diff imx6q{,p}-sabresd.dts
> 
> not surprisingly, it fails:
> 
> In file included from imx6qp.dtsi:43:0,
>                  from imx6qp-sabresd.dts:45:
> imx6q.dtsi:11:50: error: no include path in which to search for dt-bindings/interrupt-controller/irq.h
>  #include <dt-bindings/interrupt-controller/irq.h>
> 
>   but either of the following two variations works just fine, since
> you're identifying the location of the source tree git repo (that you
> just happen to be inside of):
> 
>   $ dtx_diff -S imx6q{,p}-sabresd.dts
>   $ dtx_diff -s ~/k/git imx6q{,p}-sabresd.dts
> 
> however, if i copy those two files to /tmp and try the comparison
> there, even if i identify the same kernel source directory:
> 
>   $ cp imx6q{,p}-sabresd.dts /tmp
>   $ cd /tmp
>   $ dtx_diff -s ~/k/git imx6q{,p}-sabresd.dts
> 
> ruh roh ...
> 
> imx6qp-sabresd.dts:45:10: fatal error: imx6qp.dtsi: No such file or
> directory
>  #include "imx6qp.dtsi"
>           ^~~~~~~~~~~~~

Since the include file is specified in quotes ("...") instead of
brackets (<...>) cpp is looking in the same directory as the .dts
file to find the .dtsi file.

If you copy all such files to /tmp/ then the dtx_diff will work.

For linux 4.20-rc3, the list of other files needed in tmp/ is:

$ ls -1
imx6q-pinfunc.h
imx6q-sabresd.dts
imx6q.dtsi
imx6qdl.dtsi
imx6qp-sabresd.dts
imx6qp.dtsi

-Frank


> compilation terminated.
> imx6q-sabresd.dts:15:10: fatal error: imx6q.dtsi: No such file or
> directory
>  #include "imx6q.dtsi"
>           ^~~~~~~~~~~~
> compilation terminated.
> 
>   obviously(?), the cpp include path is not being set correctly, but
> why not? i'm checking the dtx_diff script right now to see what's
> going into cpp_flags, but should this not work? should i not be
> allowed to compare two .dts files outside the boundaries of a kernel
> source tree as long as i provide a perfectly kernel source tree for it
> to use? or does one need to manually configure the header file search
> path for this?
> 
> rday
> 

      reply	other threads:[~2018-11-20  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29  8:52 dtx_diff: "fatal error: imx6qp.dtsi: No such file or directory" Robert P. J. Day
2018-11-19 22:17 ` Frank Rowand [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=bf3bbdd3-0d81-f525-71c5-6177eb865f7c@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /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;
as well as URLs for NNTP newsgroup(s).