设备树编译工具DTC

it2022-05-09  19

DTC将.dts编译为.dtb的工具。DTC的源代码在目录scripts/dtc目录中

内核使能了设备树。编译内核的时候DTC工具会自动被编译出来,对应于

scripts/dtc/Makefile 中 hostprogs-y := dtc

 也可以单独安装DTC

sudo apt-get install device-tree-compiler

 在linux内核的arch/arm/boot/Makefile中。定义了哪些dtb文件会被编译出来,如下

dtb-$(CONFIG_SOC_AM33XX) += \ am335x-lxm.dtb \ am335x-pigoa800.dtb \ am335x-pigoa800-1g.dtb \ am335x-pigoa810.dtb \ am335x-pigoa810-1g.dtb \ am335x-pigoa840.dtb \ am335x-pigoa840-1g.dtb \ am335x-pigoa84x.dtb \ am335x-pigoa84x-1g.dtb \ am335x-pigoa84x-ram1g-nand1g.dtb \ am335x-pigoa84x-ram1g-nand256.dtb \ am335x-pigoa84x-ram512g-nand1g.dtb \ am335x-pigoa84x-ram512-nand256.dtb \ am335x-ieda800-1g.dtb \ am335x-chiliboard.dtb \ am335x-wega-rdk.dtb

在linux下,我们可以单独编译设备树

make dtbs

 反汇编

./scripts/dtc/dtc -I dtb -o dts -o xxx.dts arch/arm/boot/dts/xxx.dtb

  

转载于:https://www.cnblogs.com/liushuhe1990/p/9653114.html


最新回复(0)