Modifying and compiling the device tree in Yocto

The following steps will guide you to modify and compile the device tree:

  1. To modify the device tree in the Yocto build system, we execute the following set of commands:
$ cd /opt/yocto/fsl-community-bsp/
$ source setup-environment wandboard
$ bitbake -c devshell virtual/kernel  
  1. We then edit arch/arm/boot/dts/imx6qp-wandboard-revd1.dts and compile the changes with the following:
$ make dtbs  
  1. If we want to create a device tree with extra space, let's say 1,024 bytes (for example, to add nodes dynamically as explained in the next recipe), we need to specify it with a DTC flag as follows:
$ DTC_FLAGS="-p 1024" make dtbs 
  1. To deploy it, we exit the devshell and build the kernel from the project's ...

Get Embedded Linux Development Using Yocto Project Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.