Some questions about device tree update using OTA feature

Hi all,

Our team and I have been doing some tests to customize kernel and device tree through OTA update. We’ve managed to rebuild customized debian packages for both the nvidia-l4t-kernel (to update kernel image) and nvidia-l4t-kernel-dtbs (for kernel DTB’s). Using our rebuilt debian package nvidia-l4t-kernel I was able to update the kernel. However it seems that just upgrading the nvidia-l4t-kernel-dtbs package is not enough to change the device tree for a customized one.

I have the following questions:

  • Is it possible to update the device tree using debian packages? If so, how does the device tree is updated through the OTA feature using the default packages? Is it possible to use that same mechanism with a customized nvidia-l4t-kernel-dtbs package?
  • In this post here: Update kernel-dtb partition with OTA, it is said that and I quote “The nvidia-l4t-bootloader will update DTB partition. However we would suggest upgrading all L4T packages at once instead of partial upgrade.” Nonetheless I’m not sure if that means that I need to customize that package aswell, I tried reinstalling the default nvidia-l4t-bootloader package but it doesn’t seem to work either. Which step I’m missing here that an upgrade with default packages is doing?

Thanks in advance for any insight you may have.

Hi jchaves,

It depends on whether uboot is reading the the dtb from /boot or from partition.

If you indicates FDT field in extlinux.conf, then any deb package that overrides the dtb file path could take effect.

However, if you don’t write it in extlinux.conf as default setting, then it will read the kernel-dtb partition.
nvidia-l4t-bootloader is using bl_update_payload and nv_update_engine to update the partition.

If you want to update the content in kernel-dtb, then you have to create new bl_update_payload.

Hi WayneWWW,

Thanks for this very useful information. I can confirm that adding FDT field in extlinux.conf allows to update the device tree blob. I edited extlinux.conf file and then rebooted the TX2. I leave below the extlinux.conf that I used for any future readers:

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      FDT /boot/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb  #This is the file updated by the debian package
      APPEND ${cbootargs} quiet root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2

Just some additional notes. This was my workflow all around:

2 Likes

A detailed explanation of the steps I followed can be found here: Customize JetPack Installation with OTA Update

1 Like

Since I also ran into the problem with a customized device-tree not being reused after a bootloader ota upgrade especially since we are not deploying it via deb packages, later on, but not now, here some remarks:

  • I guess you can recycle the bootloader package to manually or automatically flash your updated device trees.
  • I recommend to give your device tree packages (or any custom packages) a different name and conflict the official ones but provide those (or at least put the pacakges on hold until you really want to update them).
  • If you lack an auto-upgrade device-tree feature, like myself, and have not looked in the ota scripts you may override the device tree using the flash script: Note that the ota now toggles between some partitions. For example there is a kernel-dtb and a kernel-dtb_b partition. So after an upgrade you might need to flash both or the other partition. In case you wonder why your device-tree might not get loaded, it might be the wrong partition after the upgrade.

BR, Markus