devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Issue with dt_to_config with dts files that include headers from dt-bindings
@ 2016-11-04 19:19 Peter Robinson
  2016-11-05 20:56 ` Gaurav Minocha
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Robinson @ 2016-11-04 19:19 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA,
	gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w

Hi Gaurav, Rob and Frank,

I've just discovered the dt_to_config script (awesome thanks!) but it
errors out when a dts(i) includes a header file from dt-bindings. EG

./scripts/dtc/dt_to_config arch/arm/boot/dts/am335x-boneblack.dts
In file included from arch/arm/boot/dts/am335x-boneblack.dts:10:0:
arch/arm/boot/dts/am33xx.dtsi:11:35: error: no include path in which
to search for dt-bindings/gpio/gpio.h
 #include <dt-bindings/gpio/gpio.h>
                                   ^
arch/arm/boot/dts/am33xx.dtsi:12:40: error: no include path in which
to search for dt-bindings/pinctrl/am33xx.h
 #include <dt-bindings/pinctrl/am33xx.h>
                                        ^
arch/arm/boot/dts/am335x-boneblack.dts:12:41: error: no include path
in which to search for dt-bindings/display/tda998x.h
 #include <dt-bindings/display/tda998x.h>
                                         ^
Error: arch/arm/boot/dts/am335x-bone-common.dtsi:33.23-24 syntax error
FATAL ERROR: Unable to parse input tree


Regards,
Peter
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Issue with dt_to_config with dts files that include headers from dt-bindings
@ 2018-02-18 15:13 Chris Wyse
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wyse @ 2018-02-18 15:13 UTC (permalink / raw)
  To: devicetree

On 11/07/16 10:51, Frank Rowand wrote:
> On 11/05/16 13:56, Gaurav Minocha wrote:
>> On Nov 4, 2016 1:19 PM, "Peter Robinson" <pbrobinson@xxxxxxxxx> wrote:
>>>
>>> Hi Gaurav, Rob and Frank,
>>>
>>> I've just discovered the dt_to_config script (awesome thanks!) but it
>>> errors out when a dts(i) includes a header file from dt-bindings. EG
>>>
>>> ./scripts/dtc/dt_to_config arch/arm/boot/dts/am335x-boneblack.dts
>>> In file included from arch/arm/boot/dts/am335x-boneblack.dts:10:0:
>>> arch/arm/boot/dts/am33xx.dtsi:11:35: error: no include path in which
>>> to search for dt-bindings/gpio/gpio.h
>>>  #include <dt-bindings/gpio/gpio.h>
>>>                                    ^
>>> arch/arm/boot/dts/am33xx.dtsi:12:40: error: no include path in which
>>> to search for dt-bindings/pinctrl/am33xx.h
>>>  #include <dt-bindings/pinctrl/am33xx.h>
>>>                                         ^
>>> arch/arm/boot/dts/am335x-boneblack.dts:12:41: error: no include path
>>> in which to search for dt-bindings/display/tda998x.h
>>>  #include <dt-bindings/display/tda998x.h>
>>>                                          ^
>>> Error: arch/arm/boot/dts/am335x-bone-common.dtsi:33.23-24 syntax error
>>> FATAL ERROR: Unable to parse input tree
>>>
>> 
>> In bash do, export ARCH=arm
>> 
>> Works for me!
>> 
>>>
>>> Regards,
>>> Peter
>> 
>
>Were there any other error messages reported? There should have
>been a message suggesting that $ARCH was not set (if it wasn't)
>and that it did not have the value of "arm".
>
>If that message did not exist, I would like to understand why.
>
>If the message did exist, but was not clear, how could the
>message change to be more helpful?
>
>-Frank
>--

I just tried using this utility from inside a Yocto devshell, with a 4.1.15 kernel.  
It didn't have dtx_diff or dt_to_config, so I copied them from the master branch.
I received the same errors about the missing include path.  The ARCH environment
variable was properly defined as 'arm'.  I resolved the problem by modifying the 
dtx_diff script to use ${srctree}/include in its include path when using both dtc
and gcc.

>From dtx_diff:
    cpp_flags="\
            -nostdinc                                  \
            -I${srctree}/scripts/dtc/include-prefixes  \
            -I${srctree}/include                       \
            -undef -D__DTS__"

    DTC="\
            ${DTC}                                     \
            -i ${srctree}/scripts/dtc/include-prefixes \
            -I${srctree}/include                       \
            -O dts -qq -f ${dtc_sort} -o -"

Chris



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-18 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 19:19 Issue with dt_to_config with dts files that include headers from dt-bindings Peter Robinson
2016-11-05 20:56 ` Gaurav Minocha
     [not found]   ` <CA+rpMbK=T+Z=-pML4RHLJpLziy-UuANpUcgKNbq06tMNrdAPKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-06  1:01     ` Gaurav Minocha
2016-11-07 18:51     ` Frank Rowand
  -- strict thread matches above, loose matches on Subject: below --
2018-02-18 15:13 Chris Wyse

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).