Thanks. I think I now have a pretty good idea on what happens when a device tree .dts file with .dtsi includes is compiled. I am posting a summary here so others (if any) searching on this error message may find it.
The Makefile is basically running three commands - not one. To compile the dts file src/arm/am335x-boneblack.dts the following commands are generated: cpp -Wp,-MD,src/arm/.am335x-boneblack.dtb.d.pre.tmp -nostdinc -Iinclude - Isrc/arm -Itestcase-data -undef -D__DTS__ -x assembler-with-cpp -o src/arm/. am335x-boneblack.dtb.dts.tmp src/arm/am335x-boneblack.dts ; dtc -O dtb -o src/arm/am335x-boneblack.dtb -b 0 -i src/arm -d src/arm/. am335x-boneblack.dtb.d.dtc.tmp src/arm/.am335x-boneblack.dtb.dts.tmp ; cat src/arm/.am335x-boneblack.dtb.d.pre.tmp src/arm/.am335x-boneblack.dtb.d. dtc.tmp > src/arm/.am335x-boneblack.dtb.d It seems the device tree compiler has no native ability to cope with includes and so cpp is pressed into service to resolve the chains of included .dtsi files. The upshot is that the first command (cpp...) ultimately outputs a file named src/arm/.am335x-boneblack.dtb.dts.tmp which is essentially the original src/arm/am335x-boneblack.dts with all the includes recursively resolved. It also outputs a dependency file. The second line calls dtc on the now flattened .dts source in src/arm/. am335x-boneblack.dtb.dts.tmp file and creates the src/arm/am335x-boneblack. dtb device tree binary and another dependency file. The third line concatenates the dependency files from the first two steps - why it does this I do not know. Maybe just documentation. There is also a .am335x-bone-base.dtb.cmd file output by the makefile which contains the above commands and some of the dependencies. On Tuesday, 14 October 2014 17:23:00 UTC+1, RobertCNelson wrote: > > On Tue, Oct 14, 2014 at 11:10 AM, Nic Cyn <[email protected] > <javascript:>> wrote: > > Thank you. > > > > My dtc compiler version is exactly the same - not surprising since I am > > using your version installed as described on > > > https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Upgradedistro%22device-tree-compiler%22package > > > > > So it must be the command line. What is in the DTC script. Can you > please > > "cat DTC" for me. > > > > No doubt I am missing something simple. > > https://github.com/RobertCNelson/dtb-rebuilder/tree/3.14-ti > > https://github.com/RobertCNelson/dtb-rebuilder/blob/3.14-ti/Makefile#L120 > > Regards, > > -- > Robert Nelson > http://www.rcn-ee.com/ > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
