# What does fdtoverlay do?



## Phishfry (Dec 1, 2022)

I just ran into a FreeBSD application and I had no idea it existed and it has no FreeBSD manpage.
`fdtoverlay`
From the output I see:

```
# fdtoverlay
Usage: apply a number of overlays to a base blob
    fdtoverlay <options> [<overlay.dtbo> [<overlay.dtbo>]]

<type>    s=string, i=int, u=unsigned, x=hex
    Optional modifier prefix:
        hh or b=byte, h=2 byte, l=4 byte (default)

Options: -[i:o:vhV]
  -i, --input <arg>  Input base DT blob
  -o, --output <arg> Output DT blob
  -v, --verbose      Verbose messages
  -h, --help         Print this help and exit
  -V, --version      Print version and exit

Error: missing input file
```


```
fdtoverlay -V
Version: DTC 1.6.0
```
So it looks like part of the DeviceTreeCompiler and libfdt.

Is this a way to dynamically load overlays? Does anybody use this?


----------



## Phishfry (Dec 10, 2022)

I had wrongly assumed this was part of base FreeBSD but it came with the ports version of sysutils/dtc
I have not ran it successfully yet.


----------



## Andriy (Dec 11, 2022)

I'd guess that the tool is used to modify a dtb file ("base blob") with dbto overlays.
In other words, instead of having run-time overlays in loader.conf it's possible to "patch up" a dtb file for a platform.


----------

