Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1691325
  • 博文数量: 206
  • 博客积分: 1450
  • 博客等级: 上尉
  • 技术积分: 2285
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-11 11:38
个人简介

学习永无止境!!

文章分类

全部博文(206)

文章存档

2022年(5)

2019年(3)

2018年(8)

2017年(32)

2016年(7)

2015年(13)

2014年(44)

2013年(24)

2011年(6)

2010年(17)

2009年(46)

2008年(1)

分类: 嵌入式

2017-07-05 12:20:39

运行dtc -h可以看到如下:
Usage: dtc [options]


Options: -[qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@Ahv]
  -q, --quiet                
        Quiet: -q suppress warnings, -qq errors, -qqq all
  -I, --in-format      
        Input formats are:
                dts - device tree source text
                dtb - device tree blob
                fs  - /proc/device-tree style directory
  -o, --out            
        Output file
  -O, --out-format     
        Output formats are:
                dts - device tree source text
                dtb - device tree blob
                asm - assembler source
  -V, --out-version    
        Blob version to produce, defaults to 17 (for dtb and asm output)
  -d, --out-dependency  
        Output dependency file
  -R, --reserve        
        Make space for reserve map entries (for dtb and asm output)
  -S, --space          
        Make the blob at least long (extra space)
  -p, --pad            
        Add padding to the blob of long (extra space)
  -a, --align          
        Make the blob align to the (extra space)
  -b, --boot-cpu       
        Set the physical boot cpu
  -f, --force                
        Try to produce output even if the input tree has errors
  -i, --include        
        Add a path to search for include files
  -s, --sort                 
        Sort nodes and properties before outputting (useful for comparing trees)
  -H, --phandle        
        Valid phandle formats are:
                legacy - "linux,phandle" properties only
                epapr  - "phandle" properties only
                both   - Both "linux,phandle" and "phandle" properties
  -W, --warning        
        Enable/disable warnings (prefix with "no-")
  -E, --error          
        Enable/disable errors (prefix with "no-")
  -@, --symbols              
        Enable generation of symbols
  -A, --auto-alias           
        Enable auto-alias of labels
  -h, --help                 
        Print this help and exit
  -v, --version              
        Print version and exit


可以看到-I 指定输入文件模式;-O 指定输出模式;-o 输出文件名;最后一个参数为输入文件。
使用例子:
汇编:
dtc -I dts -O dtb -o devicetree.dtb xilinx.dts
反汇编:
dtc -I dtb -O dts -o devicetree.dts xilinx.dtb
阅读(1055) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~