设备树编译工具DTC

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

  

猜你喜欢

转载自www.cnblogs.com/liushuhe1990/p/9653114.html