Quick rebuild of device tree only with Yocto/bitbake?

AFAIK there are two different ways of doing this.

  1. The kernel way: Using the scripts provided by the kernel
  • Change to your kernel source directory (<build dir>/tmp/work/<machine>/<kernel-name>/<kernel-version>/git/)
  • Execute the device-tree-compiler: ./scripts/dtc/dtc -I dts -O dtb -o ./devicetree.dtb path/to/devicetree.dts
  1. The bitbake way: Using the kernel's deploy job
  • Call $ bitbake <kernel-name> -f -c deploy
  • The generated device-tree-blob then can be found in <build dir>/tmp/work/<machine>/<kernel-name>/<kernel-version>/build/arch/arm/boot/dts/)

At least for me both versions worked in a quick test.

UPDATE: I just came over a third version of building the dtb with yocto on the net. That one uses yocto's devshell of the kernel build. For more information see the original authors page at https://splefty.blogspot.co.at/2015/09/compiling-device-tree-using-yocto.html.


For me using bitbake to regenerate the device tree worked in the following way:

Command: $ bitbake <kernel-name> -f -c compile

Example: $ bitbake linux-fslc -f -c compile

Tested using yocto sumo.