table of Contents
1. View the role of the device tree
Help debug the program
Two, view the original dtb file through the virtual file system
/sys/firmware/fdt // original dtb file
hexdump -C /sys/firmware/fdt
Three, view the dtb file of the directory structure program
// The root node corresponds to the base directory, each node corresponds to a directory, and each attribute corresponds to a file
/sys/firmware/devicetree/base.
Use cat and hexdump to print the corresponding value.
Fourth, view all the files of platform_device
// All platform_devices in the system come from the device tree, and there are also some. The path registered in the .c file is /sys/devices/platform.
For platform_device from the device tree,
you can enter /sys/devices/platform/<device name >ls View its device tree properties, if of_node is created by the device tree, if not, it is created by the .c file.
Five, link files
/proc/device-tree is the link file, pointing to /sys/firmware/devicetree/base