- How do I view the contents of a compiled build device tree?
When learning from the device tree, if you can see the contents of the resulting device tree, it is very helpful for us to learn the device tree and analyze the problem. Here we need to use Device Tree Generator tool to disassemble the DTC function
[Email protected]:~/tq2440/linux/linux-4.0.1#./SCRIPTS/DTC/DTC-HUSAGE:DTC [Options]<inputfile>Options:-[QI:O:O:V:D:R:S:P:FB:I:H:SW:E:HV]-Q,--Quiet Quiet:-Q Suppress warnings,-qq errors,-QQQ All-I ,--in-format <arg> Input formats Are:dts - device tree Source text DTB - device tree blob fs -/proc/device-Tree style directory-O,--out <arg> Output file -O,--out-format <arg> Output formats Are:dts - Device Tree Source text DTB - device tree blob ASM - assembler source -V,--out-version <arg>Blob version to produce, defaults to%d ( forDTB and ASM output)-D,--out-dependency <arg>Output Dependencyfile-R,--reserve <arg>Tmake Space for<number> Reserve Map Entries ( forDTB and ASM output)-S,--space <arg>Make the blob at least<bytes>Long(extra space)-P,--pad <arg>Add padding to the blob of<bytes>Long(extra space)-B,--boot-cpu <arg>Set The physical boot CPU-F,--Force Try to produce output evenifThe input tree has errors-I,--include <arg>Add a path to search forInclude files-S,--sort sort nodes and properties before outputting (useful for Comparing trees) -H,--phandle <arg>Valid phandle formats are:legacy-"Linux,phandle"Properties Only EPAPR-"Phandle"Properties only both-Both"Linux,phandle"and"Phandle"Properties-W,--warning <arg>Enable/disable warnings (prefix with"no-") -E,--error <arg>Enable/disable errors (prefix with"no-") -H,--Help Print this Help and exit-V,--version Print version and exit
Suppose our final device tree file is: ARCH/ARM/BOOT/DTS/S3C2416-SMDK2416.DTB
Arch/arm/boot/dts/s3c2416-smdk2416.dtb
The output file Output.dts is the result of disassembly, which is the actual device tree that is generated.
- Linux configuration, support device tree
make Menuconfig---> Boot options---> Flattened Device Tree support
- Linux Compiled device tree
You can see if the DtB file of the device tree you want in Arch/arm/boot/dts/makefile is configured.
make Dtbs
==
Device Tree Learning Note one