DTOVERLAY(1)
π NAME π
okay bestie, this is DTOVERLAY(1), a General Commands Manual page, and the main character is dtoverlay β load a device-tree overlay. Thatβs the whole NAME situation, and honestly? iconic. π
β¨ SYNOPSIS β¨
dtoverlay [-d dir] [-p string] [-v] [-D] [-r] [-R] [-l] [-a] [overlay
[param=val...]]
dtoverlay -h [overlay [param]]
π¦ DESCRIPTION π¦
dtoverlay is the command-line utility for manipulating the systemβs runtime device-tree by adding or removing overlays. It can also customize the base device-tree or overlays by setting parameters within them. See [DTREE] for more information.
By default β like, without the -r or -R options β the application adds the specified overlay. Manipulation of active device-tree overlays usually requires root privileges.
β οΈ bestie, root privileges are usually required for manipulating active device-tree overlays. Thatβs not a vibe check, thatβs just the rules. π
π OPTIONS π
-aβ Lists all defined device-tree overlays, placing a"*"next to those that are currently loaded. Itβs giving overlay attendance sheet. β-d dirβ Specifies an alternate location path from which to load overlays. The utility defaults to"/boot/overlays"or"/flash/overlays". So if your overlays live somewhere else, this is your moment. π-Dβ Dry-run; prepares the specified overlay but doesnβt apply it. The resulting prepared overlay is saved as"dry-run.dtbo". Literally a practice run, no cap. π§ͺ-h[overlay][param]β If given withoutoverlayorparam, displays help on the application overall. Ifoverlayis specified, prints help on that overlay. Finally, ifparamis also specified, prints help on that parameter of the overlay. To query parameters on the base overlay, specify"dtparam"as the overlay. Help is self-care. π«Ά-lβ Lists all currently loaded device-tree overlays, in the order they were loaded. This also specifies the index of each overlay. Load-order receipts, served fresh. π§Ύ-p stringβ Overrides the platformβs"compatible"string, normally read from"/proc/device-tree/compatible". This is used with the overlay map to determine which platform-specific overlay to read (if necessary). Very βiykykβ of it. π-rβ Remove overlay. With this option, the utility will remove the specified overlay. If no overlay is given, the last overlay loaded will be removed. Overlays can be specified by name or by index. Bye-bye, bestie. π-Rβ Remove the specified overlay, and all subsequent overlays that were loaded after it. If no overlay is given, all overlays will be removed. Overlays can be specified by name or by index. This one is highkey the load-order nuke. π-vβ Verbose operation; the utility will produce more output. More yapping, but make it useful. π£οΈ
πΈ EXAMPLES πΈ
hereβs the tea, with the commands kept exactly as they are:
sudo dtoverlay w1-gpio
Load the w1-gpio overlay (to enable Dallas 1-Wire on GPIO4). Note that root privileges are usually required for manipulating the device-tree overlays (hence, sudo in the example).
dtoverlay -l
Show the loaded overlays.
sudo dtoverlay -r
Remove the last loaded overlay.
sudo dtoverlay gpio-shutdown gpio_pin=7 active_low=0 gpio_pull=down
Load the gpio-shutdown overlay specifying that it should pull GPIO7 down and monitor it for a rising edge to initiate shutdown.
dtoverlay -h gpio-shutdown
Display help for the gpio-shutdown overlay
sudo dtoverlay -r gpio-shutdown
Remove the gpio-shutdown overlay, wherever it is in the load order.
π§ HOOKS π§
dtoverlay attempts to call two executables (shell scripts by default) during its operation: dtoverlay-pre prior to making device-tree modifications, and dtoverlay-post afterwards. Each executable is optional and will be ignored if not present. So if theyβre there, they get their little moment; if not, no drama. π¦
π SEE ALSO π
dtparam(1)dtmerge(1)[DTREE]
π REFERENCES π
Thatβs the whole DTOVERLAY(1) page, bestie π«Ά β the footer is just DTOVERLAY(1), with no extra source/version/date line hiding down there, so youβre fully caught up. Periodt. π
π¦ where this page comes from
- nixos 26.05: libraspberrypi 0-unstable-2024-12-23
- nixpkgs unstable: libraspberrypi 0-unstable-2024-12-23
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms