- 找到Buildroot中的配置文件(通常是configs/_defconfig)并在其中添加以下选项:
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_PACKAGE_DTC=y
- 在使用buildroot编译时,添加以下选项:
make menuconfig
选择Kernel -> Device Tree -> Enable DTC option
- 或者,手动打开DTC选项并重新编译:
make linux-dirclean
make
- 如果以上方法没有解决问题,可以手动下载dtc的源码并使用以下命令编译:
make -f Makefile.libfdt
make dtc
代码示例:
在.config文件中添加以下选项:
Device Tree support
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_PACKAGE_DTC=y
使用menuconfig:
make menuconfig
Kernel -> Device Tree -> Enable DTC option
手动编译DTC:
make -f Makefile.libfdt
make dtc