I have enabled the device tree overlay features in the kernel. Now I don't where i write the overlay device tree content. Can someone let me know regarding this?
-
By definition it’s the user who provides a content of the overlay. – 0andriy Jun 11 '21 at 07:20
1 Answers
You can theoretically write your .dts
file wherever you want, provided you have the proper kernel sources, cross-compilation toolchain and dtc
set up.
In practice you'd grab a copy of the kernel sources (ideally from the vendor of your SoC if that exists), then write the .dts file inside arch/arm[64]/boot/dts/[vendor]/overlay/$filename.dts
. Then add it to the Makefile
which you can find inside arch/arm[64]/boot/dts/[vendor]/overlay
.
This will allow you to compile the dts
file to a dtbo
file by running make dtbs
from the root of the kernel source.
Once you have a .dtbo
, copy it to /boot/dtbs/[kernel-version]/[vendor]/[overlay]/
, then add it to whatever configuration file gets used by your distribution to load overlays at boot-time. (For Raspberry-Pi it's /boot/config.txt
, for debos
, it's /boot/uEnv.txt
)

- 21
- 1
- 5