Using device tree overlays
This page applies to L4T R32.6.1-based branches (master, honister, and dunfell as of 2022-02-16).
The L4T kernel includes device tree overlays (.dtbo
files) for modifying the devicetree configuration for the Jetson development kits. With the stock L4T/JetPack Ubuntu-based OS, you can use the jetson-io
scripts to apply these overlays dynamically at runtime. While runtime management of device trees isn't generally suitable for Yocto-based builds, you can have overlays applied at build time. This simplifies testing some types of new hardware (typically cameras, which require static definitions in the device tree) by using the overlays instead of manually changing the device tree source files in the kernel.
The exact list of overlays supplied by NVIDIA varies by target platform. You can find them by building the kernel recipe (virtual/kernel
or linux-tegra
) and examining its output under ${BUILDDIR}/work/tmp/${MACHINE}/linux-tegra
.
Set the KERNEL_DEVICETREE_APPLY_OVERLAYS
variable to a blank-separate list of .dtbo
file names to have those overlays applied during the kernel build. You can do this in your machine configuration file, or add it, for example, to the local.conf
file in your build workspace.
For example, to configure a Jetson Xavier NX development kit for IMX477 and IMX219 cameras, you would add the following line to your $BUILDDIR/conf/local.conf
file:
KERNEL_DEVICETREE_APPLY_OVERLAYS:jetson-xavier-nx-devkit = "tegra194-p3668-all-p3509-0000-camera-imx477-imx219.dtbo"
For U-Boot-based Jetsons, the .dtbo
files will get populated into the /boot
directory in the rootfs, and you could modify the /boot/extlinux/extlinux.conf
file to add an FDTOVERLAY
line to have one or more overlays applied at boot time. Unfortunately, OE-Core's support for generating extlinux.conf
content does not include support for FDTOVERLAY
lines, so to make such a change you would have to work out a way to rewrite that file in a bbappend.