Imx6 Compiling device tree - FATAL ERROR: cannot parse input tree

I am working on Embedded Linux for TX6U-8010 based on Freescale imx6.

I am trying to compile dtb using the device tree compiler (dtc). However, when I use the command:

dtc -O dtb -o imx6dl-tx6u-801x.dtb imx6dl-tx6u-801x.dts 

... I get the following error:

 Error: imx6dl-tx6u-801x.dts:13.1-9 syntax error FATAL ERROR: Unable to parse input tree 

Lines 12, 13, 14: -

 /dts-v1/; #include "imx6dl.dtsi" #include "imx6qdl-tx6.dtsi" 

The kernel version I'm using is linux-3.18.5, and the dtc version is DTC 1.4.0.

+7
linux embedded device-tree
source share
2 answers

You can use the Makefile supplied with the kernel source to handle all problems.

In the root directory of the kernel code, simply run:

 make ARCH=arm CROSS_COMPILE=arm-none-eabi- imx_v6_v7_defconfig make ARCH=arm CROSS_COMPILE=arm-none-eabi- dtbs 

Just replace the CROSS_COMPILE value CROSS_COMPILE the right prefix.

+10
source share

https://linux-sunxi.org/Device_Tree#Compiling_the_Device_Tree

The sources of the device tree in the kernel deviate from the usual syntax, using the cpp preprocessor to enable and replace. This happens as follows:

 IDE=<your-device-name> SRC=$IDE.dts TMP=$IDE.tmp.dts DST=$IDE.dtb cpp -nostdinc -I include -undef -x assembler-with-cpp $SRC > $TMP dtc -O dtb -b 0 -o $DST $TMP rm $TMP 
+13
source share

All Articles