Linux kernel 设备树编译器抛出错误dtc:无效选项--'@';

Linux kernel 设备树编译器抛出错误dtc:无效选项--'@';,linux-kernel,beagleboneblack,device-tree,Linux Kernel,Beagleboneblack,Device Tree,我试图编译一个覆盖图,并将其用于学习目的,但我无法编译覆盖图。 例如,我从derek molloy博客中获取了一个设备树覆盖示例 git clone git://github.com/derekmolloy/boneDeviceTree.git 现在我有了一个名字覆盖的目录。其中,存在一个脚本build,该脚本具有此覆盖的编译命令。 这是build内部的命令 #!/bin/bash echo "Compiling the overlay from .dts to .dtbo" dtc -O

我试图编译一个覆盖图,并将其用于学习目的,但我无法编译覆盖图。 例如,我从derek molloy博客中获取了一个设备树覆盖示例

git clone git://github.com/derekmolloy/boneDeviceTree.git
现在我有了一个名字覆盖的目录。其中,存在一个脚本build,该脚本具有此覆盖的编译命令。 这是build内部的命令

#!/bin/bash

echo "Compiling the overlay from .dts to .dtbo"

dtc -O dtb -o DM-GPIO-Test-00A0.dtbo -b 0 -@ DM-GPIO-Test.dts
DM-GPIO-Test.dts文件是源覆盖文件,DM-GPIO-Test-00A0.dtbo是输出

现在,如果我运行此脚本,我会收到以下消息

./build 
Compiling the overlay from .dts to .dtbo
dtc: invalid option -- '@'
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

Error: unknown option
/build
将覆盖从.dts编译为.dtbo
dtc:无效选项--“@”
用法:dtc[选项]
选项:-[qI:O:O:V:d:R:S:p:fb:i:H:sW:E:hv]
-q、 ”“安静
安静:-q抑制警告,-qq错误,-qq全部
-一、 --格式上
输入格式为:
dts-设备树源文本
dtb-设备树blob
fs-/proc/device树样式目录
-o、 ”“出去
输出文件
-O、 --输出格式
输出格式为:
dts-设备树源文本
dtb-设备树blob
汇编程序源
-五、 --输出版本
要生成的Blob版本,默认为%d(用于dtb和asm输出)
-d、 --摆脱依赖
输出依赖文件
-R、 --储备
t为保留映射条目留出空间(用于dtb和asm输出)
-S、 --空间
使blob至少较长(额外空间)
-p、 --垫
将填充添加到long的blob(额外空间)
-b、 --启动cpu
设置物理引导cpu
-f、 --武力
即使输入树有错误,也尝试生成输出
-i、 --包括
添加搜索包含文件的路径
-s、 --分类
输出前对节点和属性进行排序(用于比较树)
-H、 --幻影
有效的幻影格式包括:
传统-“linux,幻影”属性仅限
epapr-仅限“幻影”属性
两者-都是“linux,phandle”和“phandle”属性
-W、 --警告
启用/禁用警告(前缀为“否-”)
-E、 --错误
启用/禁用错误(前缀为“否-”)
-h、 “救命
打印此帮助并退出
-v、 --版本
打印版本并退出
错误:未知选项
在发出这个命令之前,我确实安装了设备树编译器。我的系统是ubuntu 14.04,64位。
这里出了什么问题?

获取ubuntu 14.04上内核3.8的正确dtc 这样做,


现在编译,此错误应该消失。

直到dtc版本1.4.3,才添加覆盖功能。
wget https://raw.githubusercontent.com/RobertCNelson/boot-scripts/master/tools/dtc/dtc-3.8.x.sh
chmod +x dtc-3.8.x.sh
./dtc-3.8.x.sh