Where To Find the Device Tree Files (DTs) for Various Boards in the Linux Kernel Source Code

Embedded linux






So when you download a particular linux kernel source version, it comes with a bunch of device tree files within the downloaded code, which you can use when working with various hardware boards.

This can include various types of beaglebone boards, other boards, etc.

When working with various boards, device tree files are one of the most used and recommended way of updating the operating system to the hardware being used for all of the various reasons laid out in this article, What is a Device Tree?

So where are these device tree files found?

Within the linux kernel source code that you download, you can find the device tree files for boards that use arm processors within the path, /linux/arch/arm/boot/dts/

If you are looking for device tree files for boards that use the powerpc architecture, you can find those devices at the path, /linux/arch/powerpc/boot/dts

If you are looking for device tree files for boards that use the xtensive architecture, you can find those devices at the path, /linux/arch/xtensa/boot/dts

You most likely understand now.

In the linux kernel source code, the device tree files are separated according to the architecture (arm, powerpc, xtensa, etc.)

Device tree files are found always in the boot directory because they are run at boot time.

So let's now go to the arm architecture directory, which has the largest amount of device tree files, and examine its contents.


Device tree files of arm architecture of linux source code


Overall, in this directory are 2,579 items.

Say, we are looking for the device tree file for the am335x-evm board (evaluation board).

The file is am335x-evm.dts, which is shown below.


am335x-evm.dts device tree file in the linux kernel source code


If you open the contents of the file, we see the following below.


am335x-evm.dts device tree file contents of the linux kernel source code


Now let's look for one more type of file, as an example.

Let's now open the file, am335x-boneblack.dts


am335x-boneblack.dts device tree file of the linux kernel source code


If you open the contents of the file, we see the following below.


am335x-boneblack.dts device tree file contents of the linux kernel source code


An interesting thing to note about this file is you can see the modular build of device tree files.

Look at all the include statements in this file.

You can see that the beaglebone black uses many of the same hardware setup as the beaglebone common board, so it includes these files in its device tree file.

The parts then that are different are included later in the file.

So this is breakdown of device tree files and where they can be found in the linux kernel source code when you need to work with them on a project.



Related Resources





HTML Comment Box is loading comments...