How to list the kernel Device Tree
77,820
Solution 1
The device tree is exposed as a hierarchy of directories and files in /proc
. You can cat
the files, eg:
find /proc/device-tree/ -type f -exec head {} + | less
Beware, most file content ends with a null char, and some may contain other non-printing characters.
Solution 2
If dtc is available on your platform (else, install the device-tree-compiler
package), you can use:
dtc -I fs /sys/firmware/devicetree/base
Related videos on Youtube
Author by
Xofo
Updated on September 18, 2022Comments
-
Xofo over 1 year
I am using an embedded Arm with a Debian build. How does one list the compiled devices from the device tree? I want to see if a device is already supported.
For those reading this, the "Device Tree" is a specification/standard for adding devices to an (embedded) Linux kernel.
-
Kevin P. Fleming almost 4 yearsThis was immensely useful!
-
Harry Tsai about 3 yearsIf /sys/firmware/devicetree/base doesn't exist on your system, instead try
dtc -I fs /proc/device-tree