VisionFive2 with the latest Debian image

I recently got a VisionFive2 board and tried to install the latest debian build (202306). I am using Ubuntu 23.04 as my desktop. I flashed it to a microsd card.
I am able to boot from the SD card in SDIO mode only. Is it because this image has OpenSBI + UBoot+Linux? In QSPI mode I am unable to boot with this image.

I tried updating both SBI and UBoot with TFTP server approach

===
tarFive # sf probe
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
StarFive # tftpboot 0xa0000000 ${serverip}:u-boot-spl.bin.normal.out
Using ethernet@16040000 device
TFTP from server 10.0.0.138; our IP address is 10.0.0.132
Filename ‘u-boot-spl.bin.normal.out’.
Load address: 0xa0000000
Loading: ##########
4.5 MiB/s
done
Bytes transferred = 132368 (20510 hex)
StarFive # sf update 0xa0000000 0x0 $filesize
device 0 offset 0x0, size 0x20510
0 bytes written, 132368 bytes skipped in 0.23s, speed 5213262 B/s
StarFive # tftpboot 0xa0000000 ${serverip}:visionfive2_fw_payload.img
Using ethernet@16040000 device
TFTP from server 10.0.0.138; our IP address is 10.0.0.132
Filename ‘visionfive2_fw_payload.img’.
Load address: 0xa0000000
Loading: #################################################################
#################################################################
#################################################################
#######
8.8 MiB/s
done
Bytes transferred = 2956613 (2d1d45 hex)
StarFive # sf update 0xa0000000 0x100000 $filesize
device 0 offset 0x100000, size 0x2d1d45
Updating, 21% 6063053 B/s Updating, 41% 5983051 B/s Updating, 61% 5956731 B/s Updating, 81% 5943635 B/s0 bytes written, 2956613 bytes skipped in 0.510s, speed 5901699 B/s

And still the same result. I am curious about the bytes skipped message in the output. Not sure if it got really updated or not.

But for now I am using the SDIO mode to boot. Is there a way to fix the QSPI mode to work?

Thanks

Venkat

Hi,

Please post your console output while you try to boot off QSPI

Please find the log attached.

Thanks

Venkat
bootlog-qspi.txt (4.8 KB)

202306 is need update spl/uboot .
202306-SD.img is included spl/uboot and SDIO mode is using sdcard’s spl/uboot to boot .

2 Likes

Can you try updating directly from the latest image?

sudo apt install mtd-utils

Do you get a valid output with the next command?
cat /proc/mtd

If yes, you can try to update directly, without having to use tftp.

2 Likes

The instructions here worked for me with the 202306 image:

There is a newer version (VF2_v3.1.5) of u-boot-spl.bin.normal.out and visionfive2_fw_payload.img available, but I’ve not tried it (yet). My board is using (VF2_v3.0.4), the version in the instructions above. Which is the same version that is in the first two partitions of the image file that you wrote to the SD card.

2 Likes

Thanks - I built OpenSBI with the steps in the Technical reference manual. After flashing and restarting, I see the output is
Test payload running.
I made sure I am at the latest and in the right branches (master for opensbi and JH7110_VisionFive2_devel for u-boot.
Will try with the released versions again.

I booted into debian using sdio mode, copied the release version of the files and flashed them using flashcp. Still can’t boot using QSPI mode. But no longer get the ‘Test payload running message’. Still can’t boot using QSPI mode with SD image. Only using SDIO mode I can boot for now.
Thanks
Venkat

Thanks for all the suggestions.

I am beginning to wonder if there is an issue with the SD card. Should I try NVME approach?

Also, are there updated steps of building opensbi and u-boot. The steps I followed from the technical reference manual with the suggested configuration files did not work properly

Thanks

Venkat