Hello
I complete build full source.
#MACHINE='imx6dlsabreauto'
#source setup-environment build
#bitbake fsl-image-machine-test
And then I was modify '.dts' file.
How to build dts file simply ?
: imx6, sabreauto
解決済! 解決策の投稿を見る。
Hi yunbaekim
utility called device tree compiler (DTC) is used to compile the DTS file into a
DTB file. DTC is part of the Linux source directory. Examples of usage one can find
on web, like :
http://stackoverflow.com/questions/21670967/compiling-source-device-tree-file
http://xillybus.com/tutorials/device-tree-zynq-1
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
[posted in error, deleted]
Hello,
Please take a look at page 20 of the Massimo's presentation
Also, the following helps.
Basic Device Tree for the Udoo Board
Regards,
Yuri.
Hi yunbaekim
utility called device tree compiler (DTC) is used to compile the DTS file into a
DTB file. DTC is part of the Linux source directory. Examples of usage one can find
on web, like :
http://stackoverflow.com/questions/21670967/compiling-source-device-tree-file
http://xillybus.com/tutorials/device-tree-zynq-1
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hello igorpadykov
I installed dtc
#sudo apt-get install device-tree-compiler
and moved to arch/arm/boot/dts folder.
#dtc -O dtb -o imx6dl-sabreauto-gpmi-weim.dtb imx6dl-sabreauto-gpmi-weim.dts
DTC: dts->dtb on file "imx6dl-sabreauto-gpmi-weim.dts"
Error: imx6dl-sabreauto-gpmi-weim.dts:9.1-2 syntax error
FATAL ERROR: Unable to parse input tree
what is wrong?
yunbaekim,
I had the same issue. I found out that the Yocto DTS files do not strictly follow the Device-Tree syntax as they include c/c++ pre-processors. The file(s) must first be "scrubbed", then run through the dtc compiler.
I found this to be useful:
https://linux-sunxi.org/Device_Tree#Compiling_the_Device_Tree
In case the link doesn't work, here's the gist:
```
$ 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
```
This is very helpful. For my case of building the device tree, my procedure was as follows:
$ cd ...../arch/arm/boot/dts/
$ sh compileDeviceTree.sh
where I simply put those commands into a script
#!/bin/sh
echo "----compiling test device tree------"
# replace abc with your file name
IDE=abc
SRC=$IDE.dts
TMP=$IDE.tmp.dts
DST=$IDE.dtb
cpp -nostdinc -I include -undef -x assembler-with-cpp $SRC > $TMP
~/bsp-root/...../tmp/sysroots/x86_64-linux/usr/bin/dtc -O dtb -b 0 -o $DST $TMP
rm $TMP