DTC (Device Tree Compiler) it translates device tree file to the machine-readable binary that U-Boot and Linux kernel can understand.
The straightforward way to use DTC.
$ dtc -O dtb -o arm_board.dtb -b 0 arm_board.dts
to get the device tree in text from the dtb.
dtc -I dtb -O dts arm_board.dtb
board.dts is binary created by the above command. -O
specifies the output format. -o
flag is output file. -b 0
specifies physical boot CPU.
Then do
$ make ARCH=arm arm_board.dtb
Another approach might be just use make dtbs
this will call dtc. arch/arm/boot/dts/Makefile
lists which DTBs should begenerated at build timeThis another way to compile it. make will put that in this location of kernel tree /arch/arm/boot/dts
Have a look at this Device Tree for Dummies
With yocto, you can use
bitbake <KERNEL-VERSION> -f -c compile
e.g.
bitbake linux-stable -f -c compile
You will find the results here:
build/tmp/work/<YOUR_MACHINE>-<YOUR-DISTRO>-linux-gnueabi/<KERNEL-RECIPE>/<KERNEL-VERSION>/linux-<YOUR-MACHINE>-standard-build/arch/<ARCH>/boot/dts/<YOUR-DTS-FILENAME>.dtb
You cam find there also the result of the preprocessor with name .<YOUR-DTS-FILENAME>.dtb.dts.tmp
. This file contains all includes and is useful for error analysis.