Jetson36.4.3 device treee Which one to use?

We encountered two issues with the device tree using Jetson36.4.3.
The first:
Which one is actually used, ”source/kernel/kernel-jammy-src/arch/arm64/boot/dts/nvidia“ or ”source/hardware/nvidia/t23x/nv-public” difference? We should use ”source/hardware/nvidia/t23x/nv-public“ for analysis, what are the differences and relationships between these two.
If “source/hardware/nvidia/t23x/nv-public” is used, why is Kernel Customization — NVIDIA Jetson Linux Developer Guide used “export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src”



The second:
source/hardware/nvidia/t23x/nv-public/nv-platform and source/hardware/nvidia/t23x/nv-public/ contain Same DTS file,Which one is actually used?For example, as shown in the following figure:
image

*** Please note that this reply is generated by LLM automatically ***

To address the issues encountered with the device tree using Jetson3643, it’s essential to understand the differences and relationships between the two paths mentioned: source/kernel/kernel-jammy/src/arch/arm64/boot/dts/nvidia and source/hardware/nvidia/t23x/nvpublic.

  1. Source/kernel/kernel-jammy/src/arch/arm64/boot/dts/nvidia:

    • This path refers to the kernel source directory for the NVIDIA device tree files. Specifically, it points to the location where the device tree source (DTS) files for NVIDIA hardware are stored within the kernel source tree.
    • The kernel source tree is part of the Linux kernel, and modifications here can affect how the kernel interacts with the hardware.
    • The kernel-jammy part suggests that this is related to the Linux kernel version used in the Jetson Linux distribution, which is based on Ubuntu’s Jammy Jellyfish release.
  2. Source/hardware/nvidia/t23x/nvpublic:

    • This path points to a directory containing hardware-specific files, including device tree files, provided by NVIDIA for their Tegra23x (T23x) series of SoCs, which includes the Jetson AGX Orin.
    • The nvpublic directory suggests that it contains publicly available NVIDIA hardware files, which can include device tree sources, header files, and other hardware-related configurations.
    • This directory is likely used for building and customizing the device tree for specific NVIDIA hardware platforms, including the Jetson AGX Orin.

Differences and Relationships:

  • The primary difference between these two paths is their purpose and scope. The kernel source directory (source/kernel/kernel-jammy/src/arch/arm64/boot/dts/nvidia) is focused on the kernel’s interaction with the hardware, while the NVIDIA hardware directory (source/hardware/nvidia/t23x/nvpublic) contains hardware-specific configurations and files provided by NVIDIA.
  • The relationship between them is that the device tree files in source/hardware/nvidia/t23x/nvpublic are used to generate the device tree binary (DTB) that the kernel uses to understand the hardware configuration. The kernel source directory may include these device tree files or reference them during the kernel build process.

Usage for Analysis:

  • For analysis purposes, using source/hardware/nvidia/t23x/nvpublic is recommended because it contains the official hardware-specific files provided by NVIDIA, which are designed to work with the Jetson AGX Orin and other T23x series devices.
  • This directory is likely to contain the most accurate and up-to-date device tree files and other hardware configurations for the specific NVIDIA hardware platforms.

Kernel Customization and NVIDIA Jetson Linux Developer Guide:

  • The guide’s recommendation to use export KERNEL_HEADERS=$(pwd)/kernel/kernel-jammy/src suggests that for kernel customization, one should use the kernel source directory as the reference point for kernel headers and other kernel-related customizations.
  • This does not conflict with using source/hardware/nvidia/t23x/nvpublic for device tree analysis but rather complements it by providing a clear path for kernel development and customization.

Same DTS File in Different Locations:

  • If the same DTS file exists in both source/hardware/nvidia/t23x/nvpublic/nvplatform and source/hardware/nvidia/t23x/nvpublic, the actual file used would depend on the build process and how the device tree is configured to be compiled.
  • Typically, the build process would use the file from one specific location, and any duplicates might be there for legacy, testing, or configuration purposes.
  • To determine which one is actually used, one would need to examine the build scripts, configuration files, or documentation provided with the Jetson Linux distribution or the specific hardware platform being targeted.

In summary, for device tree analysis related to the Jetson AGX Orin, using source/hardware/nvidia/t23x/nvpublic is recommended due to its focus on hardware-specific configurations provided by NVIDIA. For kernel customization, following the NVIDIA Jetson Linux Developer Guide’s recommendations regarding the kernel source directory is appropriate. The presence of the same DTS file in different locations requires further investigation into the build process and configuration to determine which file is actually used.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi 1712127445,

Above response should give you some useful information.

These are the device tree source from upstream kernel.

The device tree(which will be used/built) should be under this path.

You have to check the log to determine which DTB is flashed and you can try to trace them from device tree source. The device tree will be included by other device tree.
As my understanding, the first one(./hardware/nvidia/t23x/nv-public/nv-platform/) will be used.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.