Hi

Perhaps also take a look the email thread here:
https://lists.yoctoproject.org/g/yocto/topic/101728482#61210
This patch fixes kernel build error like this.

Run command "MACHINE=rock2-square bitbake linux-yocto" and get the error.

|   SYNC    include/config/auto.conf
|   GEN     Makefile
| make[2]: *** No rule to make target 'arch/arm/boot/dts/rk3288-rock2-square.dtb'.  Stop.

You can run "MACHINE=tinker-board bitbake linux-yocto" to test it.

When I build I get:

| /opt/oe/configs/z/build-master/tinker-board/layers/openembedded-core/scripts/lib/wic/engine.py:362: SyntaxWarning: invalid escape sequence '\/'
| abs_path = re.sub('\/\/+', '/', path)
| INFO: Creating image(s)...
|
| ERROR: _exec_cmd: install -m 0644 -D /z/build-master/tinker-board/build/tmp-glibc/deploy/images/tinker-board/rockchip/rk3288-tinker.dtb /z/build-master/tinker-board/build/tmp-glibc/work/tinker_board-oe-linux-gnueabi/core-image-base/1.0/tmp-wic/boot.6/rockchip/rk3288-tinker.dtb returned '1' instead of 0
| output: install: cannot stat '/z/build-master/tinker-board/build/tmp-glibc/deploy/images/tinker-board/rockchip/rk3288-tinker.dtb': No such file or directory
|
| WARNING: /z/build-master/tinker-board/build/tmp-glibc/work/tinker_board-oe-linux-gnueabi/core-image-base/1.0/temp/run.do_image_wic.449:160 exit 1 from 'BUILDDIR="/z/build-master/tinker-board/build" PSEUDO_UNLOAD=1 wic create "$wks" --vars "/z/build-master/tinker-board/build/tmp-glibc/sysroots/tinker-board/imgdata/" -e "core-image-base" -o "$build_wic/" -w "$tmp_wic"'
| WARNING: Backtrace (BB generated script):
| #1: do_image_wic, /z/build-master/tinker-board/build/tmp-glibc/work/tinker_board-oe-linux-gnueabi/core-image-base/1.0/temp/run.do_image_wic.449, line 160
| #2: main, /z/build-master/tinker-board/build/tmp-glibc/work/tinker_board-oe-linux-gnueabi/core-image-base/1.0/temp/run.do_image_wic.449, line 177
ERROR: Task (/opt/oe/configs/z/build-master/tinker-board/layers/openembedded-core/meta/recipes-core/images/core-image-base.bb:do_image_wic) failed with exit code '1'
I think another patch would fix it.
diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc
index 635288c..b4f4226 100644
--- a/conf/machine/include/rockchip-wic.inc
+++ b/conf/machine/include/rockchip-wic.inc
@@ -13,7 +13,7 @@ WKS_FILE_DEPENDS ?= " \
        "
 IMAGE_BOOT_FILES = " \
        ${KERNEL_IMAGETYPE} \
-       ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${KERNEL_DEVICETREE}', d)} \
+       ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${SOC_FAMILY}*.dtb', d)} \
        "
 
 # use the first-defined <baud>;<device> pair in SERIAL_CONSOLES