Jump to content
  • 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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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. 

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...