None of the existing guides and methods on the radxa wiki for installing a newer u-boot to the SPI worked for me but I managed to get nvme booting working using the Armbian install script so I wrote this guide.
Before posting this here I wanted to add this to the radxa wiki but I have been unable to sign up. I tried to create myself a radxa wiki account but it asked me the question:
“How layers of board is rock pro?(type 6)”
That is poor English and isn’t grammatically correct. It probably should read:
“How many layers of board are used by the rock pro? (type 6)”
Regardless “How many layers are used in the rock pro pcb?”? So I’d need to know one of the rock pro engineers to find out? What a bizarre question! Please make your forum membership questions a bit easier Radxa. Genuine users like me can’t get an account. What is the exact question in proper English and where would I find the answer, on the schematics? I searched “rock pro board layers” on a couple of search engines and got no relevant results but I’m not sure what the question is anyway.
Here is my unformatted guide that I’d like to get added to the wiki:
The install script for Armbian, nand-sata-install, in versions 20.11 or later makes it easy to write a mainline u-boot image to the RockPi’s SPI to enable booting directly from nvme disks. You can boot other distributions of Linux such as Manjaro using the Armbian u-boot. I have confirmed these instructions work on a RockPi 4c using a Samsung EVO 960 SSD.
Prerequisities: ROCK Pi 4(A/B/C) v1.4 or 1.3 with SPI soldered in (v1.3 comes without SPI flash from the factory). If you already have Radxa’s u-boot written to SPI you need to short pins 23 and 25 for Armbian to boot.
Boot Armbian v20.11.x or later on your ROCK Pi 4(A/B/C). Note that as of March 2022, Armbian for the RockPi 4 doesn’t have a maintainer so you will have to download an archived install image from here:
https://armbian.hosthatch.com/archive/rockpi-4b/archive/
These are images for the rockpi4b but they also work with the 4c.
After booting into Armbian 20.11 or later (i used a 21.08.1 image), add the following lines to /boot/armbianEnv.txt
overlays=spi-jedec-nor
param_spinor_spi_bus=1
After rebooting, verify that the SPI mtd interface is enabled by running:
ls /dev/mtdblock0
You need to create at least one empty partition on your nvme disk using your favourite partitioning tool (cfdisk, sgdisk, gparted…) before you can run the armbian installer:
cfdisk /dev/nvme0n1
After creating a partition, run nand-sata-install then choose:
Choose option: "Boot from SPI - system on SATA, USB or NVMe"
Choose NVMe partition, eg. /dev/nvme0n1p1
Accept erasing of the choosen partition with "Yes"
Choose fs type (tested with ext4)
Wait a few minutes for rootfs transfer to chosen partition
Choose writing SPI bootloader with "Yes"
Confirm that you want to flash it with "Yes"
Wait ~60 seconds for writing
Choose Exit
Reboot or poweroff