# DT Overlays on Xavier NX Devkit

**URL:** <https://forums.balena.io/t/dt-overlays-on-xavier-nx-devkit/319657>\
**Category:** Product support\
**Tags:** xavier\
**Created:** [May 21, 2021, 4:11pm UTC](https://forums.balena.io/t/dt-overlays-on-xavier-nx-devkit/319657 "2021-05-21T16:11:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaintedSnipe](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@PaintedSnipe](https://forums.balena.io/u/PaintedSnipe)\
**Post date:** [May 21, 2021, 4:11pm UTC](https://forums.balena.io/t/dt-overlays-on-xavier-nx-devkit/319657/1 "2021-05-21T16:11:04Z")

</div>

Out application uses this “[Respeaker 2-Mic HAT Board](https://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT/)” mounted on “40-Pin header” of the “Xavier NX Devkit”.

For HAT Board to work, we need to update the pinmux configuration on NX Devkit. So far we have tested our software with “Xavier NX Devkit” running Jetpack L4T Release. On this platform we used a “Device Tree overlay” to update the Pinmux configuration as desired.

Now we are moving to BalenaOS and we want to know if “Device Tree Overlay file” can be used on “Xavier NX” running balena OS.

As per [this article](https://www.balena.io/blog/sensors-and-data-logging-with-embedded-linux-the-ultimate-guide-part-1/#loadingoverlaysdynamically) posted on balena blog, this can be easily done on a Pi Board by running following steps

- Mount the SDCard on a PC and copy CUSTOM\_DT\_OVERLAY\_FILE.dtbo to /resin-boot/overlays folder.
- In Balena cloud find your device and set a device configuration variable `RESIN_HOST_CONFIG_dtoverlay` to the “CUSTOM\_DT\_OVERLAY\_FILE” (i.e. DT overlay filename without extension).

The Xavier SDCard however has no folder with name “overlays”. Is there any other location on Xavier SDcard where we could copy our custom DT overlay file and get it working?

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [May 27, 2021, 7:17am UTC](https://forums.balena.io/t/dt-overlays-on-xavier-nx-devkit/319657/4 "2021-05-27T07:17:46Z")

</div>

Hi @PaintedSnipe, the Xavier platform - both AGX and NX - doesn’t have u-boot support, therefore loading custom device trees or device tree overlays is not possible on it.

---

<div class="post-metadata">

**Author:** ![Clint](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Clint](https://forums.balena.io/u/Clint)\
**Post date:** [September 14, 2021, 7:10pm UTC](https://forums.balena.io/t/dt-overlays-on-xavier-nx-devkit/319657/6 "2021-09-14T19:10:40Z")

</div>

Is it possible to only re-flash the device tree partition with Balena Xavier NX devices, so a Yocto rebuild isn’t necessary anytime?

- Using jetson-flash?
- By mounting and replacing files on some partition in the image?

I know how to do it on native L4T installations. I can provide more information if you think it’s possible.

Kind regards,  
Clint

---

<div class="post-metadata">

**Author:** ![acostach](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@acostach](https://forums.balena.io/u/acostach)\
**Post date:** [October 22, 2021, 7:27am UTC](https://forums.balena.io/t/dt-overlays-on-xavier-nx-devkit/319657/8 "2021-10-22T07:27:29Z")

</div>

Hi Clint,

You can try write the signed dtb to kenrel-dtb and kernel-dtb\_b partitions, see these [lines](https://github.com/balena-os/balena-jetson/blob/master/layers/meta-balena-jetson/recipes-support/hostapp-update-hooks/files/99-resin-bootfiles-xavier-nx-devkit#L87). But before generating the \*sigheader.dtb.encrypt file for writing, you need to check which is the current active rootfs partition (ls -l /dev/disk/by-state) and set the root=LABEL=… appropriately in the dtb, like in this [example](https://github.com/balena-os/balena-jetson/blob/master/layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra194-nxde-flash-dry_32.5.1.bb#L211). For signing the dtb without doing any yocto build it should be possible to use the BSP script `./flash.sh` with the argument `--no-flash` (perform all steps except physically flashing the board.)
