如何将设备树覆盖包含到 Raspberry Pi CM4 中

How to include device tree overlay into Raspberry Pi CM4

我想使用 Yocto 包括 UART3 和 UART5 覆盖以启用它们。它们已经与整个包裹一起交付 (https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/uart3-overlay.dts) 我添加到我的主要图像配方行:

RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/uart3-overlay.dtbo"
RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/uart5-overlay.dtbo"

我还添加了 .bbappend 以在 /boot/config.txt (file /meta-mylayer/recipes-bsp/bootfiles/rpi-config_%.bbappend):

中启用它们
do_deploy:append() {
   echo "dtoverlay=uart3" >>"${DEPLOYDIR}/bootfiles/config.txt"
   echo "dtoverlay=uart5" >>"${DEPLOYDIR}/bootfiles/config.txt"
}

我收到一个错误:

ERROR: _exec_cmd: install -m 0644 -D /home/jwz/work/build/tmp/deploy/images/raspberrypi4-64/uart3-overlay.dtbo /home/jwz/work/build/tmp/work/raspberrypi4_64-poky-linux/adsb-debug-image/1.0-r0/tmp-wic/boot.1/overlays/uart3-overlay.dtbo returned '1' instead of 0
| output: install: cannot stat '/home/jwz/work/build/tmp/deploy/images/raspberrypi4-64/uart3-overlay.dtbo': No such file or directory

我想这些叠加层没有编译,我怎样才能将它们包含在编译过程中?

干杯

找到解决方案。

只需将这些行添加到构建文件夹内的 local.conf。

/*HONISTER*/
RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/uart3.dtbo"
RPI_KERNEL_DEVICETREE_OVERLAYS:append = " overlays/uart5.dtbo"

/*DUNFELL*/
RPI_KERNEL_DEVICETREE_OVERLAYS_append = " overlays/uart3.dtbo"
RPI_KERNEL_DEVICETREE_OVERLAYS_append = " overlays/uart5.dtbo"