Sure, that part is clear. U-boot can pass board specific devicetree to GRUB (EFI loader) correctly. But GRUB then not pass it to the kernel when it loads it. So the bootlog provided above pretty much what one get if try to load the kernel without devicetree.
Yes, right now the installer can boot successfully if I manually configure a valid devicetree path in GRUB. It successfully recognized the NVMe and installed Ubuntu into it.
Quick status update. I enabledbootefi command on your fork. Temporarly disabled non-R3 mini targets just to speed up the CI. The resulting u-boot is able to boot GRUB and then Linux from the NVMe.
Before booting straight to the NVMe, I copied to devicetree into th NVMe rootfs (/boot/mt7986.dtb). This might not required as pointed out Eric in the previous comment. Contrary to my prevoius comments, GRUB might actually pass devicetree to the kernel, and the issue actually solved by the clk_ignore_unused pd_ignore_unused cma=128M argument. To be foolproof, I added it regardless.
Then I edited GRUB menuentry just to boot into the system:
menuentry 'Ubuntu BananaPi R3 mini' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0bc688a8-9da8-4167-9a53-fff27df09ebe' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 0bc688a8-9da8-4167-9a53-fff27df09ebe
devicetree /boot/mt7986.dtb
linux /boot/vmlinuz root=UUID=0bc688a8-9da8-4167-9a53-fff27df09ebe ro console=ttyS0,115200n8 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M clk_ignore_unused pd_ignore_unused cma=128M
initrd /boot/initrd.img
}
This boot straight to the system. Some TODO/missing pieces:
wifi driver not loaded at startup, the module have to loaded manually
eMMC not visible, lsblk only see the NVMe
ethernet not working, probably due to the missing firmware (the driver looking at the eMMC)
Both (wifi+ethernet) on r3mini need firmware in /lib/firmware on defined rootfs (nvme) to work and of course kernel modules in /lib/modules/$(uname -r). For modules you can add the module name to /etc/modules.conf or afair in modprobe.d