标签:
在设备树学习的时候,如果可以看到最终生成的设备树的内容,对于我们学习设备树以及分析问题有很大帮助。这里我们需要使用设备树生成工具dtc的反汇编功能
root@pengdl-VirtualBox:~/tq2440/Linux/linux-4.0.1# ./scripts/dtc/dtc -h
Usage: dtc [options] <input file>
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 (for dtb and asm output)
  -d, --out-dependency <arg> 
    Output dependency file
  -R, --reserve <arg>        
    tMake space for <number> reserve map entries (for dtb 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 even if the input tree has errors
  -i, --include <arg>        
    Add a path to search for include 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
假设我们最终的设备树文件是:arch/arm/boot/dts/s3c2416-smdk2416.dtb
./scripts/dtc/dtc -I dtb -O dts -o output.dts arch/arm/boot/dts/s3c2416-smdk2416.dtb
输出文件output.dts就是反汇编的结果,他就是实际生成的设备树。
make menuconfig ---> Boot options ---> Flattened Device Tree support
可以看看arch/arm/boot/dts/Makefile中你要的那个设备树的dtb文件是否配置上了。
make dtbs
==
标签:
原文地址:http://www.cnblogs.com/pengdonglin137/p/4495056.html