设备树
dts:device tree source
dtc
dtc:device tree compiler
# dtc -help
Usage:
dtc [options] <input file>
Options:
-h
This help text
-q
Quiet: -q suppress warnings, -qq errors, -qqq all
-I <input format>
Input formats are:
dts - device tree source text
dtb - device tree blob
fs - /proc/device-tree style directory
-o <output file>
-O <output format>
Output formats are:
dts - device tree source text
dtb - device tree blob
asm - assembler source
-V <output version>
Blob version to produce, defaults to 17 (relevant for dtb
and asm output only)
-d <output dependency file>
-R <number>
Make space for <number> reserve map entries (relevant for
dtb and asm output only)
-S <bytes>
Make the blob at least <bytes> long (extra space)
-p <bytes>
Add padding to the blob of <bytes> long (extra space)
-b <number>
Set the physical boot cpu
-f
Force - try to produce output even if the input tree has errors
-s
Sort nodes and properties before outputting (only useful for
comparing trees)
-v
Print DTC version and exit
-H <phandle format>
phandle formats are:
legacy - "linux,phandle" properties only
epapr - "phandle" properties only
both - Both "linux,phandle" and "phandle" properties
举例
dtb:device tree blob
# dtc -I dts -O dtb -o dest.dtb src.dts
dtc将dts编译成二进制格式dtb
bootloader在引导kernel的过程中,会先读取该dtb到内存
dtb地址设置
# fdt addr xxx //内存地址
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!