Uboot-rockchip: No rule to make target dts/upstream/src/arm64/rockchip/rk3566-nanopi-r3s.dtb

I'm trying to develop a OpenWRT snapshot build for the NanoPi R3S and am currently working on adding the appropriate files for uboot-rockchip (uboot 2024.7 from current snapshot) - I've already written configs/nanopi-r3s-rk3566_defconfig, arch/arm/dts/rk3566-nanopi-r3s-u-boot.dtsi as well as rk3566-nanopi-r3s.dts on the kernel side.

When I run make package/boot/uboot-rockchip/{clean,compile} V=s I get the following error:

make[5]: *** No rule to make target 'dts/upstream/src/arm64/rockchip/rk3566-nanopi-r3s.dtb', needed by 'dtbs'. Stop.

Indeed nanopi-r3s.dts and nanopi-r3s.dtb are missing from this upstream directory. If I manually add the (identical) kernel-side copy of nanopi-r3s.dts to the upstream DTS directory, things work. But obviously that seems to be the wrong way to go about it. Any suggestions?

create a patch to add them to upstream is the usual approach

perhaps a peek at this patchset will help

I managed to figure this out. Turns out it's a good idea to RTFM sometimes :man_facepalming:. While yes, you could technically add the file directly to U-Boot's dts/upstream/src directory, the canonical approach per U-Boot's documentation is to add the new board's DTS to arch/arm/dts and literally add the line # CONFIG_OF_UPSTREAM is not set (pound sign at all) to the board's defconfig. If this line is missing the U-Boot assumes the DTS exists in upstream and doesn't look for it where you'd expect to put it.

1 Like