Extract branch targets into pure feeds to compile mainline openwrt. dts to dtb error

I found a fork based on openwrt21.02 that provides support for msm8916 for several similar devices. The compilation can be used, but the internal code is a bit messy, so I extracted the targets/linux/msm89xx directory, made a feed of targets, and tried to compile.

cat: /home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/arch/arm64/boot/dts/qcom/msm8916-handsome-openstick-ufi001c.dtb: No such file or directory

It seems that dts did not compile dtb. I tried to modify it.
follow:How OpenWrt compiles DTS files? - #2 by johnth

define Device/msm8916
   SOC := msm8916
   QCOM_CMDLINE := "earlycon console=tty0 console=ttyMSM0,115200 root=/dev/mmcblk0p14 rw rootwait"
   KERNEL := append-dtb (add this line)
   KERNEL_INITRAMFS := $(KERNEL_DTB)  (add this line)

the new error:
cat: /home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/image-.dtb: No such file or directory

I found append-dtb in \include\image-commands.mk

define Build/append-dtb
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@

It seems that firstword DEVICE_DTS is not defined
Where should it be defined?

the base code: https://github.com/HandsomeMod/HandsomeMod.git
the targets code: https://github.com/jackadam1981/target_410_for_openwrt.git

feed.config add
src-git targets https://github.com/jackadam1981/target_410_for_openwrt.git

Sorry, my English is not good, I used machine translation.

The other targets (I just checked on ipq40xx) define DEVICE_DTS in image/Makefile for Device/Default:

So basically, this seems to be your QCOM_DTS.

cc1: fatal error: /home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/arch/arm64/boot/dts/msm8916-handsome-openstick-ufi001b.dts: No such file or directory

Thank you for your guidance.

Although the error msm8916-handsome-openstick-ufi001b.dts is currently reported and cannot be found, I am not sure where these names are defined.

I'll change the name of DTS to continue compiling and testing.

This could be two lines above the one I linked to KERNEL_DEPENDS: I'm not sure if it just tells the build system that it is required for compilation or if it also triggers copying the dts files to the build directory, but it's worth a try.

The known situation is from not being able to find DTB to not being able to find DTS.

It should be the beginning of dts dtb compilation.

Although I didn't clear the naming convention, I changed the file name directly because it couldn't be found.


Where can I find an explanation for this naming convention?

aarch64-openwrt-linux-musl-cpp -nostdinc -x assembler-with-cpp  -I/home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/arch/arm64/boot/dts -I/home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/arch/arm64/boot/dts/include -I/home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/include/ -undef -D__DTS__  -o /home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/image-msm8916-handsome-openstick-ufi001b.dtb.tmp /home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/arch/arm64/boot/dts/msm8916-handsome-openstick-ufi001b.dts
cc1: fatal error: /home/jack/openwrt/build_dir/target-aarch64_cortex-a53+neon_musl/linux-msm89xx_msm8916/linux-6.1.52/arch/arm64/boot/dts/msm8916-handsome-openstick-ufi001b.dts: No such file or directory

I put three copies in the target

like openwrt\target\linux\ramips\dts

like openwrt\target\linux\ipq40xx\files\arch\arm\boot\dts

Address for error prompt

I am still unfamiliar with Linux and openwrt compilation.

Who can help guide the direction?

what about this patch

I don't think it's a problem here, dts shouldn't have been added by path.

If dts were added through path, there wouldn't be as many dts files in the target directory anymore.

Still looking at the code of other devices, continuing to learn.

But I don't have a learning route.