Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kdtc: Expand the README #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion kdtc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Install the prerequisites with "sudo apt install cmake device-tree-compiler" - y
- *cmake .*
- *sudo make install*

Alternatively, to avoid fetching the entire `utils` repository and its history, you can just download it with:
```
$ wget https://raw.githubusercontent.com/raspberrypi/utils/refs/heads/master/kdtc/kdtc
$ chmod +x kdtc
```

**Usage**
```
Usage: kdtc [<opts>] [<infile> [<outfile>]]
Expand All @@ -24,6 +30,23 @@ Usage: kdtc [<opts>] [<infile> [<outfile>]]

When run with no dtc options, kdtc detects the input format and attempts
to do the right thing.
```

Assuming `kdtc` is in your PATH, compiling an overlay without `#include`s is simple:
```
$ kdtc widget-overlay.dts widget.dtbo
```
For an overlay written as if it were in the kernel tree with `#include`s, use either:
```
$ kdtc -k /path/to/kernel doofer-overlay.dts doofer.dtbo
```
Or, running from a directory within the kernel tree:
```
$ kdtc /path/to/whatsit-overlay.dts /path/to/whatsit.dtbo
```
(When run within a git kernel source tree, the `--kerndir` path is inferred.)

If run within a git kernel source tree, the kerndir path is inferred.
To decompile an overlay to `stdout`:
```
$ kdtc mystery.dtbo
```