Device Tree Learning Note one

Source: Internet
Author: User

    • 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.