I was told on IRC to avoid VF2 firmware releases newer than v3.1.5, so I went to the v3.1.5 release page and downloaded the sdcard.img
(which I wrote to a microSD card with balena etcher) as well as the u-boot-spl.bin.normal.out
and visionfive2_fw_payload.img
files.
Next, I booted the VF2 with the newly-written microSD card inserted and logged in over SSH as root. I think the password was starfive
? Once logged in, I ran cat /proc/mtd
to make sure that I saw this output:
dev: size erasesize name
mtd0: 00040000 00001000 "spl"
mtd1: 00300000 00001000 "uboot"
mtd2: 00100000 00001000 "data"
Once I confirmed that, I copied the u-boot-spl.bin.normal.out
and visionfive2_fw_payload.img
files to the VF2 by using wget
(because scp
didn’t work for some reason). And I flashed them to the VF2 using the flashcp
command and saw the following output:
# flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
Erasing blocks: 33/33 (100%)
Writing data: 129k/129k (100%)
Verifying data: 129k/129k (100%)
# flashcp -v visionfive2_fw_payload.img /dev/mtd1
Erasing blocks: 722/722 (100%)
Writing data: 2887k/2887k (100%)
Verifying data: 2887k/2887k (100%)
Following this, I shut down the system with shutdown -h now
and removed the USB-C power plug. That’s the firmware updated.
Then, to reset the bootloader environment: I connected a USB-serial from a USB port on my Mac to pins 6,8,10 on the VF2 40-pin GPIO, as outlined in the VF2 docs, and used screen
on my Mac to connect to the USB serial with screen /dev/cu.usbserial-6124101 115200
(your USB serial device path will probably be different), and plugged the USB-C power back into the VF2.
I saw a message saying to press a key to interrupt the bootloader, so I did that, and then I typed in the commands from @danboid’s other comment:
env default -a -f
setenv boot_targets "mmc0 nvme0 dhcp"
setenv bootcmd_nvme0 "devnum=0; run nvme_boot"
saveenv
This results in a VF2 that can boot Linux successfully from the SD card or Haiku successfully from NVME, if you use Etcher to write the Haiku image to an NVME drive via USB adapter or something. Unfortunately, I haven’t been able to get Haiku to boot from SD card yet; it panics during boot, something about “unable to find boot filesystem” or similar. I haven’t tried digging into that yet since NVME booting is working for me. Although I’m very much looking forward to having multiple USB devices work at the same time so that I can try actually using the system instead of just booting it.