剥离petalinux设备树,使用 dtc 单独编译
将petalinux工程目录下:
components/plnx_workspace/device-tree/device-tree
project-spec/meta-user/recipes-bsp/device-tree/files
目录下的所有文件都拷贝出出来:
然后使用命令:
cpp -nostdinc -I. -undef -x assembler-with-cpp system-top.dts > preprocessed.dts
dtc -I dts -O dtb -o system.dtb preprocessed.dts
即可编译出 system.dtb