FATAL ERROR: Unable to parse input tree,does anyone know how to fix it ?

4,335 views
Skip to first unread message

bianchi

unread,
May 2, 2017, 7:39:06 PM5/2/17
to BeagleBoard
Hello everyone,

I have question regarding compiling overlay for cape,

I got the example from :
https://github.com/beagleboard/bb.org-overlays/tree/master/src/arm

Some information that I can collect,
I tried to compile with on these lines  :
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>



debian@beaglebone:~/test$ dtc --version
Version: DTC 1.4.4
debian@beaglebone
:~/test$ uname  -a
Linux beaglebone 4.4.54-ti-r93 #1 SMP Fri Mar 17 13:08:22 UTC 2017 armv7l GNU/Linux




the error :
 dtc EBB-GPIO-Example.dts -O dtb -o EBB-GPIO-Example-00A0.dtbo
Error: EBB-GPIO-Example.dts:17.1-9 syntax error
FATAL ERROR
: Unable to parse input tree



Does anyone know how to fix it ? or experience the same thing ?
Thanks

William Hermans

unread,
May 2, 2017, 8:01:01 PM5/2/17
to beagl...@googlegroups.com
Without the source, no one will be able to give you a correct answer. That is, the source file EXACTLY how it is when you got that error.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/768e5011-4f45-423d-887b-95793fadb391%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Hermans

unread,
May 2, 2017, 8:06:59 PM5/2/17
to beagl...@googlegroups.com
Additionally. This is an error that one typically gets, when trying to compile one of those overlays without compiling it from the bb-overlay git project. e.g. downloading one file, and trying ot compile it manually through dtc. Instead of putting your source file into the src/arm directory, and moving into the git root directory and issuing "make". Two ways to go about that, but we can get to that later.

So, knowing what command you used EXACTLY what command when you attempted to build  your file would be necessary.

Riko Ho

unread,
May 2, 2017, 10:10:59 PM5/2/17
to beagl...@googlegroups.com

Yes I only use the "include" for a test on GPIO, 

how can I use one of the overlay and modify it ? thanks

The complete code :


/* 
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Purpose License Version 2 as
* published by the Free Software Foundation
*
* Original from: github.com/jadonk/validation-scripts/blob/master/test-capemgr/
*
*
*/

/dts-v1/;
/plugin/;



#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>

/{
       compatible = "ti,beaglebone", "ti,beaglebone-black";
       part-number = "EBB-GPIO-Example";
       version = "00A0";

       fragment@0 {
             target = <&am33xx_pinmux>;
           
             __overlay__ {
                  ebb_example: EBB_GPIO_Example {
            pinctrl-single,pins = <
                                0x070 0x07  // P9_11 PINS$28 GPIO0_30 = 30 Output Mode7 pulldown
                                0x074 0x37  // P9_13 PINS$29 GPIO0_31 = 31 Input Mode7 pullup
 
                               /* OUTPUT  GPIO(mode7) 0x07 pulldown, 0x17 pullup, 0x?f no pullup/down */
                   /* INPUT   GPIO(mode7) 0x27 pulldown, 0x37 pullup, 0x?f no pullup/down */
            >;
          };
             };
       };

       fragment@1 {
        target = <&ocp>;
        __overlay__ {
            gpio_helper {
                compatible = "gpio-of-helper";
                status = "okay";
                pinctrl-names = "default";
                pinctrl-0 = <&ebb_example>;
            };
        };
    };
};

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/EdjUWbhg0w8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORpu2%3DUmhBgCOQznXbV83mHanzb117jyQOSoc_Ly_Ybz0g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--

/*******/
Sent by Ubuntu LTS 16.04,
谢谢,
Regards,
Riko Ho
/*******/

William Hermans

unread,
May 2, 2017, 10:20:15 PM5/2/17
to beagl...@googlegroups.com
On Tue, May 2, 2017 at 7:10 PM, Riko Ho <antoni...@gmail.com> wrote:

Yes I only use the "include" for a test on GPIO, 

how can I use one of the overlay and modify it ? thanks

You want a definitive answer ? Learn how device tree overlays work. Modify an overlay that is closest to fitting your needs. Then compile it.

Which is to say the question you pose it something like "My car won;t start, how do I fix it ?" . . .

Robert Nelson

unread,
May 2, 2017, 10:38:00 PM5/2/17
to Beagle Board, antoni...@gmail.com
Dont call "dtc" directly.. you have "#include"'s dtc doesn't know how
to deal with that..

run:

make arm/EBB-GPIO-Example.dtbo

so the gcc preprocessor which is defined in the makefile runs..

Regards,

--
Robert Nelson
https://rcn-ee.com/

Riko Ho

unread,
May 2, 2017, 11:02:03 PM5/2/17
to beagl...@googlegroups.com
@William Hermans
not a problem, learning is my part, ask to someone who knows better than me, making it easier.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/EdjUWbhg0w8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Robert Nelson

unread,
May 2, 2017, 11:04:41 PM5/2/17
to Beagle Board, antoni...@gmail.com
> #include <dt-bindings/board/am335x-bbw-bbb-base.h>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/pinctrl/am33xx.h>
>
> /{
> compatible = "ti,beaglebone", "ti,beaglebone-black";
> part-number = "EBB-GPIO-Example";
> version = "00A0";
>
> fragment@0 {
> target = <&am33xx_pinmux>;
>
> __overlay__ {
> ebb_example: EBB_GPIO_Example {
> pinctrl-single,pins = <
> 0x070 0x07 // P9_11 PINS$28 GPIO0_30 = 30
> Output Mode7 pulldown
> 0x074 0x37 // P9_13 PINS$29 GPIO0_31 = 31
> Input Mode7 pullup

no reason for the 3 includes if your just going to hard code ^...

Robert Nelson

unread,
May 2, 2017, 11:24:27 PM5/2/17
to Riko Ho, Beagle Board
On Tue, May 2, 2017 at 10:16 PM, Riko Ho <antoni...@gmail.com> wrote:
> Then may I know, how you compile *.dts with #include ?

easy like i sad..(adjusted for the ./src/ path)

make src/arm/EBB-GPIO-Example.dtbo

Here's the full step by step:

voodoo@hestia:/opt/git_repo$ git clone
https://github.com/beagleboard/bb.org-overlays
voodoo@hestia:/opt/git_repo$ cd ./bb.org-overlays/

voodoo@hestia:/opt/git_repo/bb.org-overlays$ gedit src/arm/EBB-GPIO-Example.dts

<copy your code block in>

voodoo@hestia:/opt/git_repo/bb.org-overlays$ make src/arm/EBB-GPIO-Example.dtbo
DTC src/arm/EBB-GPIO-Example.dtbo

voodoo@hestia:/opt/git_repo/bb.org-overlays$ ls -lh src/arm/EBB-GPIO-Example.dt*
-rw-r--r-- 1 voodoo voodoo 881 May 2 22:22 src/arm/EBB-GPIO-Example.dtbo
-rw-r--r-- 1 voodoo voodoo 1.6K May 2 22:21 src/arm/EBB-GPIO-Example.dts

Riko Ho

unread,
May 2, 2017, 11:25:59 PM5/2/17
to Robert Nelson, Beagle Board

Wow, thank you very much for that, I'll try and return to you later on.

--

Robert Nelson

unread,
May 2, 2017, 11:29:23 PM5/2/17
to Riko Ho, Beagle Board
On Tue, May 2, 2017 at 10:25 PM, Riko Ho <antoni...@gmail.com> wrote:
> Wow, thank you very much for that, I'll try and return to you later on.

Just remember to use the repo

https://github.com/beagleboard/bb.org-overlays

The "examples" aren't just there to look pretty..

The repo is used in production, and everything is abstracted out to
the makefile to make developers lives easier.

William Hermans

unread,
May 2, 2017, 11:30:45 PM5/2/17
to beagl...@googlegroups.com

On Tue, May 2, 2017 at 8:28 PM, Robert Nelson <robert...@gmail.com> wrote:
On Tue, May 2, 2017 at 10:25 PM, Riko Ho <antoni...@gmail.com> wrote:
> Wow, thank you very much for that, I'll try and return to you later on.

Just remember to use the repo

https://github.com/beagleboard/bb.org-overlays

Yeah, didn't I already say that ? Like twice . . .

William Hermans

unread,
May 2, 2017, 11:33:21 PM5/2/17
to beagl...@googlegroups.com

On Tue, May 2, 2017 at 8:01 PM, Riko Ho <antoni...@gmail.com> wrote:
@William Hermans
not a problem, learning is my part, ask to someone who knows better than me, making it easier.

No, you're right, it's not a problem. But it helps if you ask a question. But your part includes asking a question that has a definitive answer. You can't just give people your kernel version, and dtc version then ask a question that could be answered by a whole book. Then expect to get any answer at all . . .

William Hermans

unread,
May 2, 2017, 11:45:59 PM5/2/17
to beagl...@googlegroups.com
I messed that answer all up., Anyhow the point is you need to ask specific questions. Robert pretty much came back with things I already mentioned in my post, then you thank him and fsck all to me I guess. But, thats not the point I don't care about who you thank. The point is, you need to learn how to ask a question. Otherwise, I'll just come back with "the sky is blue, and fsck you. . . ." 

Riko Ho

unread,
May 3, 2017, 12:48:02 AM5/3/17
to beagl...@googlegroups.com

hehehe, fsck yourself if you don't know how to answer...yes it is the sky is blue..and don't worry to answer if you don't know..as simple as that.

Done mate

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/EdjUWbhg0w8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Riko Ho

unread,
May 3, 2017, 1:42:03 AM5/3/17
to Robert Nelson, Beagle Board

Almost get there but there is error?

root@beaglebone:/home/debian/test/bb.org-overlays-master# make src/arm/EBB-GPIO-Example.dtbo
  DTC     src/arm/EBB-GPIO-Example.dtbo
/bin/sh: 1: scripts/basic/fixdep: Permission denied
Makefile:136: recipe for target 'src/arm/EBB-GPIO-Example.dtbo' failed
make[1]: *** [src/arm/EBB-GPIO-Example.dtbo] Error 126
Makefile:100: recipe for target 'src/arm/EBB-GPIO-Example.dtbo' failed
make: *** [src/arm/EBB-GPIO-Example.dtbo] Error 2
root@beaglebone:/home/debian/test/bb.org-overlays-master#


On 03/05/17 11:28, Robert Nelson wrote:

Wow, thank you very much for that, I'll try and return to you later on.
Just remember to use the repo

https://github.com/beagleboard/bb.org-overlays

The "examples" aren't just there to look pretty..

The repo is used in production, and everything is abstracted out to
the makefile to make developers lives easier.

Regards,


--

Riko Ho

unread,
May 3, 2017, 1:47:05 AM5/3/17
to Robert Nelson, Beagle Board

Fix it, thanks a lot for the clues

root@beaglebone:/home/debian/test/bb.org-overlays-master/scripts/basic# ls -alh
total 12K
drwxr-xr-x 2 debian debian 4.0K May  2 11:02 .
drwxr-xr-x 3 debian debian 4.0K May  2 11:02 ..
-rw-r--r-- 1 debian debian  656 May  1 17:23 fixdep
root@beaglebone:/home/debian/test/bb.org-overlays-master/scripts/basic# chmod +x fixdep
root@beaglebone:/home/debian/test/bb.org-overlays-master/scripts/basic# cd ..
root@beaglebone:/home/debian/test/bb.org-overlays-master/scripts# cd ..


root@beaglebone:/home/debian/test/bb.org-overlays-master# make src/arm/EBB-GPIO-Example.dtbo
  DTC     src/arm/EBB-GPIO-Example.dtbo


On 03/05/17 11:28, Robert Nelson wrote:
--

William Hermans

unread,
May 3, 2017, 2:08:13 AM5/3/17
to beagl...@googlegroups.com
On Tue, May 2, 2017 at 9:47 PM, Riko Ho <antoni...@gmail.com> wrote:

hehehe, fsck yourself if you don't know how to answer...yes it is the sky is blue..and don't worry to answer if you don't know..as simple as that.

Done mate'


Except, I had a really good idea what your problem was, just that you were being obtuse with your answers. All I needed was one question answered form you, and the problem would have been solved. But hey, got a problem with me helping you ? fine. I will remember.
Reply all
Reply to author
Forward
0 new messages