@dhlii I wish good health to the developer of embedded Linux.
It will be very interesting for me to talk to you.
I have a question. Do you use specialized build systems such as buildroot in your work?
The first thing to do is add the target DTS to the u-boot. You can take this as a basis:
u-boot> find ./arch/arm/dts/ -name '*nanopi-r1*'
./arch/arm/dts/sun8i-h3-nanopi-r1.dts
./arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
linux-stable> find ./arch/arm/boot/dts/ -name '*nanopi*'
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-duo2.dts
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1-plus.dts
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-m1.dts
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo.dts
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-r1.dts
./arch/arm/boot/dts/allwinner/sun8i-h3-nanopi.dtsi
This DTS must match the wiring of the pins of the printed circuit board and match the brands of soldered chips.
The second good step is if you add the default u-boot configuration file.
This will allow you to repeat the loader assembly by changing only the dts
You can take this as a basis:
u-boot> find ./configs/ -name '*h3*'
u-boot> find ./configs/ -name '*nanopi*'
Special attention is paid to the CONFIG_DRAM_CLK parameter.
Even on identical boards but from different series, different memory chips can be soldered.
After u-boot has done its job and it loads the dtb of the kernel and the kernel itself, we will be able to dynamically change the dtb using overlays.
I.e., the DTB in u-boot is hard-coded, the DTB for the kernel we can change dynamically.
P.S. Here I have described my own development process.