syntax error when compiling dts

I’m trying to generate a device tree blob (dtb) from a source file but get the following error:

$ dtc -O dtb -o CIU-CR-PIN_CONFIG.dts -o CIU-CR-PIN_CONFIG.dtb
Error: CIU-CR-PIN_CONFIG.dts:15.1-9 syntax error
FATAL ERROR: Unable to parse input tree

line 15 includes another dtsi that actually is located in the same directory, it looks like:

#include “imx6ul.dtsi”

I’m working out of ~/workspace/ccimx6ulstarter/tmp/work-shared/ccimx6ulstarter/kernel-source/arch/arm/boot/dts/ where I have copied CIU-CR-PIN_CONFIG.dts to.
The intention is to follow: to load the new dtb.

1 Like

I have since figured out, that the dts needs to be preprocessed with gcc like: cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp CIU-CR-PIN_CONFIG.dts > CIU-CR-PIN_CONFIG.dts.preprocessed and if I then run $ dtc -I dts -O dtb CIU-CR-PIN_CONFIG.dts.preprocessed, I get:
Error: imx6ul.dtsi:79.20-21 syntax error
FATAL ERROR: Unable to parse input tree
which is confusing as imx6ul.dtsi wasn’t touched at all.

From the error messages, it looks like you’re using BeagleBone image and DTC v4.19 but the latest release of Device Tree source files on our git are for kernel v4.14 (picture attached). The syntax errors you’re seeing are probably because of the version mismatch.

Please try load the new dtb!

1 Like