I tried the v3.0.4 sdcard.img from sdcard and from nvme

I’m happy to report the booting v.3.0.4 from the sdcard works.

I’m also happy to report booting v3.0.4 from nvme also works.

  1. From a x86_64 linux box, I flashed the image to the sdcard.
sudo wipefs --all /dev/sdb
sudo dd if=./sdcard.img of=/dev/sdb bs=4M status=progress conv=fdatasync

and copied the relevant files to the sdcard.

cd /run/media/davidm/rootfs/
rsync --archive /home/davidm/riscvplay/vf2_v3.0.4/u-boot-spl.bin.normal.out .
rsync --archive /home/davidm/riscvplay/vf2_v3.0.4/visionfive2_fw_payload.img .
  1. Inserted the sdcard into the vf2
  2. Powered up the vf2.
  3. did a flashcp to get the newer .out/fw_payload.img into the board.
flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
flashcp -v visionfive2_fw_payload.img /dev/mtd1
sync
sync
  1. rebooted.
reboot

The vf2 now has the newer v3.0.4 firmware.

shutdown -h now

We need to shutdown in order to install the nvme onto the vf2.

  1. From a x86_64 linux box, I dd’ed the ./sdcard.img to the nvme.
sudo wipefs --all /dev/sdb
sudo dd if=./sdcard.img of=/dev/sdb bs=4M status=progress conv=fdatasync
  1. extended the 4th partition rootfs.
    I used gparted /dev/sdb. It gets the job done quickly.

  2. Installed the nvme onto the vf2 board.

  3. powered up the vf2.

Voila, it booted off the nvme. It was easier than I thought it was going to be.

NOTE: it’s ok for logging with ssh, but it’s not ok to login as a desktop because it never reaches a login prompt.

8 Likes

This is very interesting. I hope you will try to boot other OS on NVMe as well.

That’s the thing, I only tried the buildroot image that has VF2 v3.0.4 firmware. I’m looking forward to the real debian/ubuntu/fedora images that have all the latest and greatest support patches for the vf2 and most importantly with the gpu support. We just need to be patient.

6 Likes

I was able to boot the 202303 Debian image directly from the NVMe with no SD card installed using the 3.0.4 firmware. After updating the firmware, use dd on another computer to copy the Debian image to the NVMe just like you would with an SD card. Then you need to mount the file systems on the NVMe and edit the fstab and uboot configs to point to /dev/nvme0p1 instead of /dev/mmcblk1 in a couple places.

Specifically:

  1. mount /dev/nvme0n1p3 (or whatever your NVMe disk is on your other computer), and edit extlinux/extlinux.conf
  2. replace all instances of mmcblk1 with nvme0n1 (so /dev/mmcblk1p4 becomes /dev/nvme0n1p4, etc)
  3. mount /dev/nvme0n1p4 and edit etc/fstab
  4. replace all instances of mmcblk1 with nvme0n1 (so /dev/mmcblk1p4 becomes /dev/nvme0n1p4, etc)

After that, install the NVMe in the VisionFive 2 and it should boot up directly off the NVMe.

If you have made any changes to u-boot scripts,
flashcp the new boot,
boot to u-boot prompt,
then eraseenv,
then reset.
Any past changes persist after flashing.

Unable to boot Armbian ‘out of the box’, which is on /dev/nvme0n1p1 instead of p4.
Again massage u-boot to boot Armbian.
The scripts look to nvme earlier, then mmc when booting flash.
Use switches to boot mmc if a system is installed on nvme.
I’ve gone back to release v2.11.5 for now.

Yes. patience is a virtue in the RISC-v world. :slight_smile:

But things are moving in the right direction.

1 Like

Good work

Good work . Are you going to try to get a usb boot with this method modified