So setup emmc booting system. Then boot into initrd. Partition the nvme and format a root partition Then copy emmc root files to nvme root partition… Then edit kernel cmdline to setup new root.
Only thing, I have to add nano and parted and mkfs.btrfs to the initrd. (if I did not already)
I need to check if ATF and linux packages like this setup, may have to add a little code.
Boot holds the Linux kernel image and will be updated with every linux package update. Nand is not suitable.
Only small part of emmc will be used. After successfully booting nvme then emmc rootfs can be deleted only keep small ATF and boot partition there
Indeed have nand openwrt image as last resort backup is a good idea. It will be same as R3mini, where we MUST have a good backup system on nand, or may brick the board.
John has been working on supporting PCIe NVMe in U-Boot on recent MediaTek SoC’s, he will publish his code soon and that will allow you to implement e.g. ARM SystemReady standard boot with U-Boot sitting on any of the flash options and have it perform UEFI standard boot from USB (for installer) or NVMe (for production system). Then you don’t need a distro-specific bootloader any more and can just use ARM SR with UEFI like on most ARM SBCs by now.
I’m sorry for this question if it’s obvious. I am new to banana pi, but not routers, openwrt, or linux. I just received my R4 and really excited to try it. I’d like to follow your instructions but am a little confused as this is my first time. You say to boot from nand to install this on the EMMC. Does that mean that I should first install to sdcard, then boot, then use USB to install image to nand, then change boot device to nand, then burn emmc image to usb drive, once booted use serial to follow your instructions to burn to emmc? I guess my question is what image should I flash to the nand if I first need to boot from nand?
I have a brand new 16gb SanDisk card for just this purpose. So if I flash your sd image to the sdcard and set the boot device to sdcard the R4 will bootup just fine? Thanks for taking the time to answer a newb’s question.
I will post my results when I get a moment. Will likely be tomorrow. I was trying to build the image myself but their build script kept failing(GitHub - BPI-SINOVOIP/BPI-R4-MT76-OPENWRT-V21.02). Glad to see yours posted.