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
因篇幅问题不能全部显示,请点此查看更多更全内容