LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dtc

Device Tree Compiler

TLDR

Compile DTS to DTB
$ dtc -I dts -O dtb -o [output.dtb] [input.dts]
copy
Decompile DTB to DTS
$ dtc -I dtb -O dts -o [output.dts] [input.dtb]
copy
Check DTS syntax
$ dtc -I dts -O dts [input.dts]
copy
Include search path
$ dtc -I dts -O dtb -i [include_path] -o [output.dtb] [input.dts]
copy
Generate assembly output
$ dtc -I dts -O asm -o [output.S] [input.dts]
copy

SYNOPSIS

dtc [options] inputfile_

DESCRIPTION

dtc (Device Tree Compiler) compiles Device Tree Source (DTS) files to Device Tree Blob (DTB) format and performs the reverse operation of decompiling DTB back to DTS. Device trees are data structures that describe hardware components and their relationships, allowing Linux kernels to support various hardware platforms without hardcoded board-specific code.The compiler is essential for embedded Linux development, particularly for ARM, RISC-V, and PowerPC platforms. DTS files provide a human-readable description of hardware (CPUs, memory, peripherals, interrupts, buses), while DTB is the binary format loaded by bootloaders and passed to the kernel at runtime.dtc supports device tree overlays, which allow runtime modification of the base device tree. This is particularly useful for add-on hardware like Raspberry Pi HATs or BeagleBone capes, where the overlay describes additional hardware without modifying the base system device tree.The tool includes validation and warning systems to catch common errors in device tree syntax and structure. It can also generate assembly output for inclusion in firmware builds.

PARAMETERS

-I format

Input format (dts, dtb, fs).
-O format
Output format (dts, dtb, asm).
-o file
Output file.
-i path
Include search path.
-W warning
Enable warning.
-E error
Enable error.
-@
Generate symbols for overlays.

INSTALL

sudo apt install device-tree-compiler
copy
sudo dnf install dtc
copy
sudo pacman -S dtc
copy
sudo apk add dtc
copy
sudo zypper install dtc
copy
brew install dtc
copy
nix profile install nixpkgs#dtc
copy

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid