How to Compile and Install device-tree-compiler (DTC) On Ubuntu

If you want to install device-tree-compiler i.e. dtc command on ubuntu, use following command,

 $ sudo apt-get install device-tree-compiler

This command will install two command “dtc” and “dtdiff” of which dtc is a device tree compiler whereas dtdiff helps to take diff between two device tree source files.

The source code of DTC is available at https://git.kernel.org/pub/scm/utils/dtc/dtc.git . You can clone and compile as below,

$ git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git
$ cd dtc
$ make

This will compile following binaries in all along with device tree compiler.

  • convert-dtsv0
  • dtc
  • fdtdump
  • fdtget
  • fdtoverlay
  • fdtput
Follow Lynxbee

Leave a Reply / Ask Question