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
1 thought on “How to Compile and Install device-tree-compiler (DTC) On Ubuntu ?”