设备树编译器抛出错误 dtc:无效选项 -- '@'
Device tree compiler throws error dtc: invalid option -- '@'
我正在尝试编译覆盖图并将其用于学习目的,但我无法编译覆盖图。
例如,我从 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
我在发布此 command.My 系统之前安装了设备树编译器 ubuntu 14.04,64 位。
这里有什么问题?
在 ubuntu 14.04 上为内核 3.8 获取正确的 dtc
这样做,
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
现在编译,这个错误应该没有了。
我正在尝试编译覆盖图并将其用于学习目的,但我无法编译覆盖图。 例如,我从 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
我在发布此 command.My 系统之前安装了设备树编译器 ubuntu 14.04,64 位。 这里有什么问题?
在 ubuntu 14.04 上为内核 3.8 获取正确的 dtc 这样做,
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
现在编译,这个错误应该没有了。