Difference between revisions of "Jetson/Device Tree"

From eLinux.org
Jump to: navigation, search
Line 43: Line 43:
  
 
== Decompiling and compiling the device tree ==
 
== Decompiling and compiling the device tree ==
TODO
+
To be able to modify and edit the device tree, the DTB need to be decompiled into a source file. For that, you can use the Device Tree Compiler issuing the following command.
 +
 
 +
    $ dtc -I dtb -O dts -o output.dts tegra194-p3668-all-p3509-0000.dtb (as an example for the Jetson Xavier NX Devkit)
  
 
== Flashing the DTB to its partition ==
 
== Flashing the DTB to its partition ==

Revision as of 04:39, 9 April 2021

Testing

Downloading the Device Tree Compiler (DTC)

Considering that you are working on a Ubuntu machine, issue the following commands to set up DTC on the host machine.

    $ sudo apt update
    $ sudo apt install device-tree-compiler

Kernel Device Tree in L4T

You can download the L4T Driver Package (BSP) as well as the Sample Root Filesystem from the L4T Archive. Please select the BSP that matches your device.

More instructions on how to set up L4T can be found in the Quick Start Guide.

The Device Tree Binaries (DTBs) that are presented here are the ones meant for the respective Jetson Developer Kits. For customized carrier boards, these might offer a great starting point and reference.

The referred DTBs can be found under the following path (after uncompressing

    <path_to_L4T>/kernel/dtb

Kernel DTB for Jetson Nano Devkit

[TODO]

Kernel DTB for Jetson Xavier NX Devkit

    tegra194-p3668-all-p3509-0000.dtb

Kernel DTB for Jetson TX2 Devkit

    tegra186-quill-p3310-1000-a00-00-base.dtb

Kernel DTB for Jetson Xavier AGX Devkit

    tegra194-p2888-0001-p2822-0000.dtb

Kernel DTB in the Filesystem

Alternatively, the DTBs can be found under the following paths in the Jetson Filesystem after flashing the device.

    /boot
    /boot/dtb

Jetson bootloader resorts the the extlinux.conf file to determine where to load the DTB from. The file can be found under the following path.

    /boot/extlinux/extlinux.conf

The bootload first looks into the extlinux.conf file for the FDT property. This property determines the location of the DTB in the file system, for example:

    FDT /boot/dtb/tegra194-p3668-all-p3509-0000.dtb

By placing the device tree under the path assigned to the FDT property, the bootloader prioritize the DTB located in the filesystem.

Otherwise, in case the FDT property is not defined in the extlinux.conf file, the bootloader loads the DTB directly from the dedicated partition. For more information, please check the Partition Configuration.

Decompiling and compiling the device tree

To be able to modify and edit the device tree, the DTB need to be decompiled into a source file. For that, you can use the Device Tree Compiler issuing the following command.

    $ dtc -I dtb -O dts -o output.dts tegra194-p3668-all-p3509-0000.dtb (as an example for the Jetson Xavier NX Devkit)

Flashing the DTB to its partition

TODO

Flashing the DTB with DD utility

TODO