• 0

error building dts for zybo, syntax error on #include


hi there, 


I am trying to follow along with this wonderful tutorial by @Commanderfranz (maybe you can help?), and I keep running into errors compiling the device tree blob. I've been working on it for several days, and still haven't figured out a fix.


All is fine and good building everything up until this point (.bif, .bin, uboot, etc.) but can't successfully build the darn device tree blob!


I use the following command: 

$ cd linux-digilent
$ ./scripts/dtc/dtc -I dts -O dtb -o ../devicetree.dtb   /arch/arm/boot/dts/zynq-zybo.dts

and I get 

Error: arch/arm/boot/dts/zynq-zybo.dts:15.1-9 syntax error
FATAL ERROR: Unable to parse input tree

The line that is generating a syntax error is 

15: #include "zynq-7000.dtsi"

I read that you must invoke the preprocessor in order to handle c preprocessor directives in .dts scripts, however the only proposed solution I have seen online is to invoke the makefile as seen below, which I already tried and didn't work. 

make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- dtbs

Please help! Happy to include whatever other reference info you need. 


- Brett

Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Got the solution on the Xilinx forums, see here: https://forums.xilinx.com/t5/Embedded-Linux/Device-Tree-Error-unable-to-parse-input-tree/td-p/754945

#include "..." is incorret syntax for dts files. Apparently you need to use /include/ "..."

The code in the git repository is incorrect, and should be changed. I'd file an issue and report it, but there is no option on the repository. 

Share this post

Link to post
Share on other sites
  • 0

Hey Brett,

I'm glad you were able to find a solution to the problem. Thank you for sharing that information, we will see about getting that updated as soon as possible.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now