After fixing the bug of u-boot in SPI with NVMe driver, we have the working bootchain from SPI to NVMe now. The new u-boot package is pushed to the testing apt repository. Below is how to enable the SPI to NVMe boot chain.
deb http://apt.radxa.com/stretch-testing/ stretch main
deb http://apt.radxa.com/bionic-testing/ bionic main
To update to the latest testing repo, change your apt repo address to the testing one, and
sudo apt-get install rockpi4b-rk-u-boot-latest /usr/local/sbin/rockpi4b_upgrade_bootloader.sh
/boot/hw_intfc.conf and enabled the following:
intfc:uart4=off intfc:spi1=on intfc:dtoverlay=spi1-flash
Reboot, the SPI flash will be shown as /dev/mtd0 under Linux.
Use the script to flash the uboot image to SPI flash and type YES to perform the flash.
Now we have the uboot image installed to SPI flash. It’s time to move the image to NVMe.
For new installation and simpacity, you can just download a fresh ROCK Pi 4 image(Android is not supported at the moment, other images should be all supported) dd the whole image to /dev/nvme0n1 on ROCK Pi 4.
For moving existing image from uSD or eMMC to NVMe disk, just dd
/dev/mmcblk1 to /dev/nvme0n1.
sudo dd if=/dev/mmcblk0 conv=sync,noerror of=/dev/nvme0n1 bs=16M
sudo dd if=/dev/mmcblk1 conv=sync,noerror of=/dev/nvme0n1 bs=16M