StarFive sent me one of their VisionFive 2 RISC-V SBC for evaluation and review. I got the model with dual Gigabit Ethernet and 8GB RAM, and I’ll report my experience with the Debian 12 “bookworm” image. But note that won’t exactly be a review since the board is unreviewable at this time. It’s really for early adopters and there are many issues to solve, and in this post, I’ll report what works and what doesn’t, and some of the challenges I encountered just to install the OS…
VisionFive 2 unboxing
The board comes in a package that reads “Embrace change, embrace the future”.
The bottom side has some useful links and QR codes, and what you’ll want is the GitHub repository with the source code and instructions to build the image from source (Note: Ubuntu 16.04, 18.04, or 20.04 x86_64 recommended), as well as the RVspace forum section for the board where we’ll find instructions to get started and feedback from other users.
The board layout and components look exactly the same as when launched on Kickstarter, except my board is VisionFive 2 V1.3B.
We’ve got the StarFive JH7110 quad-core RISC-V processor in the center, BIWIN BWMZCX32H2A-64G 8GB RAM chip, a VL805 PCIe to USB 3.0 bridge like in the Raspberry Pi 4, two MotorComm YT8531C Gigabit Ethernet transceivers, and an AXP15060 PMIC. All main ports are on one side with a 3.5mm audio jack, four USB 3.0 ports, HDMI 2.0 output, and two Gigabit Ethernet ports.
The bottom side comes with a MicroSD card socket which we’ll use to boot the OS, connectors for an eMMC flash module, and an M.2 socket for an NVMe SSD.
Installing Debian 12 on VisionFive 2 SBC
Debian images are available on the StarFive website linking to either Baidu Drive or Google Drive. The latest image is currently Image-69 released at the end of December
The uncompressed image would not fit in my 8GB MicroSD card, so I flashed it to a 32GB MicroSD card which took close to 45 minutes to complete. I think it may be about to die, and I may have to buy yet another batch of cards. All this wasted time getting MicroSD cards that only last a few months is partially why I’ve always disliked boards that only boot with a MicroSD card…
I then connected a USB keyboard, a USB mouse, an Ethernet cable, and a USB Type-C power adapter. I initially went with a 5V/2A, but that’s not a good idea, since it does not provide enough power and the board will continuously boot loop. A 5V/3A Raspberry Pi power adapter did not cut it either, so I went with a 100W GaN power adapter to make sure I had no power-related problem. Oh, and I added some spacer to elevate the board since this is recommended.
But then I noticed the board would not boot, and found the Image 69 announcement in the forums that explains:
Please update latest SPL 46 and U-Boot 44 binaries by following Guide: 4.3 charpter 77 before running this Debian image. this is very important.
Finding the proper documentation took a while, since it’s spread all over the place in Chinese and/or English, but the best place to go is the Document Publish Status page with documentation in English. It’s possible to log in through SSH, but considering the likelihood of having a boot issue, I’d really recommend connecting a serial debug board which is how I found out about the boot loop issue mentioned above.
Before installing Debian 12, we’ll need to update the SPL and U-boot bootloader on the VisionFive 2, and use the sdcard.img minimal Linux image as well. We’ll find those on GitHub, and I used the files part of VisionFive2 Software v2.8.0. The first step was to flash sdcard.img to a MicroSD card. This image fits into an 8GB card.
1 2 3 4 5 6 7 8 9 10 11 12 |
Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 rpc.mountd: svc_tli_create: could not open connection for udp6 rpc.mountd: svc_tli_create: could not open connection for tcp6 OK Starting isp_ctrl_daemon.sh: OK Starting DHCP server: FAIL Welcome to Buildroot buildroot login: |
We can log in with the username “root” and the password “starfive”. Here’s the boot log for inquiring minds.
Let’s make sure we are connected to the network:
1 2 3 4 5 6 7 8 9 |
# ifconfig eth0 Link encap:Ethernet HWaddr 6C:CF:39:00:2A:F1 inet addr:192.168.31.114 Bcast:192.168.31.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:41 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4630 (4.5 KiB) TX bytes:730 (730.0 B) Interrupt:39 |
All good. We can now download the latest SPL and U-boot binaries from GitHub and transfer them to the board via SCP from your host machine:
1 2 |
$ scp u-boot-spl.bin.normal.out root@192.168.31.114:~ $ scp visionfive2_fw_payload.img root@192.168.31.114:~ |
Back in the VisionFive 2 terminal, we can check the partitions:
1 2 3 4 5 |
# cat /proc/mtd dev: size erasesize name mtd0: 00020000 00001000 "spl" mtd1: 00300000 00001000 "uboot" mtd2: 00100000 00001000 "data" |
It looks good, so let’s update the SPL binary with flashcp utility:
1 2 3 4 |
# flashcp -v u-boot-spl.bin.normal.out /dev/mtd0 Erasing blocks: 32/32 (100%) Writing data: 127k/127k (100%) Verifying data: 127k/127k (100%) |
and then U-boot:
1 2 3 4 |
# flashcp -v visionfive2_fw_payload.img /dev/mtd1 Erasing blocks: 683/683 (100%) Writing data: 2731k/2731k (100%) Verifying data: 2731k/2731k (100%) |
Power off the VisionFive 2 board and replace the MicroSD card with the one with the Debian 12 image. I could boot the image “successfully”.
But the first boot did take over 3 minutes, so you may have to be patient:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[ OK ] Finished Permit User Sessions. Starting Light Display Manager... Starting Hold until boot process finishes up... Starting Hostname Service... [ 184.478849] starfive-eth-plat 16030000.ethernet eth0: PHY [stmmac-0:00] driver [YT8531 Gigabit Ethernet] (irq=POLL) [ 184.496693] starfive-eth-plat 16030000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 184.504916] dwmac4: Master AXI performs fixed burst length [ 184.510487] starfive-eth-plat 16030000.ethernet eth0: No Safety Features support found [ 184.518472] starfive-eth-plat 16030000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported [ 184.528233] starfive-eth-plat 16030000.ethernet eth0: configuring for phy/rgmii-id link mode [ 184.555947] vs_gem_dumb_create size = 1000 [ 184.560082] Allocated coherent memory, vaddr: 0xFFFFFFE1FB40A100, paddr: 0x1017B8000 [ 184.560475] starfive-eth-plat 16040000.ethernet eth1: PHY [stmmac-1:00] driver [YT8531 Gigabit Ethernet] (irq=POLL) [ 184.567929] ====> vs_gem_alloc_buf, 162.vs_obj->get_pages = 0 [ 184.584371] starfive-eth-plat 16040000.ethernet eth1: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 185.040836] PVR_K: 410: RGX Firmware image 'rgx.fw.36.50.54.182' loaded Debian GNU/Linux Debian GNU/Linux bookworm/sid starfive hvc0 starfive login: bookworm/sid starfive ttyS0 starfive login: [ 185.596073] starfive-eth-plat 16040000.ethernet: Failed to reset the dma |
Subsequent boots are faster at around 90 seconds.
Another issue is that the TV screen is black although my TV detects the HDMI cable is connected, and there’s some activity about HDMI in the serial console:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[ 112.068695] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate rate 148500000 tmdsclk 148500000 [ 112.178204] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->pixclock = 148500000 [ 112.187959] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->tmdsclock = 148500000 [ 112.197795] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->prediv = 1 [ 112.206677] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->fbdiv = 99 [ 112.215556] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->tmds_div_a = 1 [ 112.224768] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->tmds_div_b = 1 [ 112.233996] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->tmds_div_c = 1 [ 112.243223] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->pclk_div_a = 1 [ 112.252452] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->pclk_div_b = 2 [ 112.261680] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->pclk_div_c = 2 [ 112.270908] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->pclk_div_d = 2 [ 112.280136] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->vco_div_5_en = 0 [ 112.289545] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->pre_cfg->fracdiv = 0 [ 112.298520] innohdmi-starfive 29590000.hdmi: ******************************************************* [ 112.307660] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->post_cfg->tmdsclock = 148500000 [ 112.317583] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->post_cfg->prediv = 1 [ 112.326559] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->post_cfg->fbdiv = 20 [ 112.335520] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->post_cfg->postdiv = 1 [ 112.344581] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->post_cfg->post_div_en = 3 [ 112.353989] innohdmi-starfive 29590000.hdmi: inno_hdmi_phy_clk_set_rate hdmi->post_cfg->version = 3 |
I moved to another location and tried with another display and it did not work at all. But that’s because my MicroSD card apparently failed:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Begin: Running /scripts/local-premount ... done. Warning: fsck not present, so skipping root file system [ 8.476889] JBD2: Invalid checksum found in transaction 3875 [ 8.482634] JBD2: recovery failed [ 8.486024] EXT4-fs (mmcblk1p3): error loading journal mount: mounting /dev/mmcblk1p3 on /root failed: Input/output error Failed to mount /dev/mmcblk1p3 as root file system. BusyBox v1.35.0 (Debian 1:1.35.0-1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) |
I had to take a MicroSD card from my security camera to carry on and purchased five Class A1 MicroSD cards online for future reviews…
I could boot normally, but I had the same problem black HDMI screen issue. I think I know why:
1 |
[ 695.829577] lightdm-gtk-gre[1535]: unhandled signal 11 code 0x1 at 0x000000406a220cc0 in libgtk-3.so.0.2404.30[3fbbb17000+6a3000] |
There’s a segmentation fault… Other people had a similar issue with either a black screen with a mouse pointer or a black screen without a mouse pointer. We’re told that’s because 4K displays are not supported yet, and this can be worked around by forcing 1920×1080 in lightdm configuration (/etc/lightdm/lightdm.conf) adding the following line under [Seat:*]:
1 |
display-setup-script=xrandr -s 1920x1080 |
My displays are already 1920×1080 or 1280×800, and I did not work for me. So I posted an entry in the forum and you can follow the progress from there.
Anyway, in this part of the VisionFive 2 review, I’ll only test headless Linux, and I will probably write a second part once a new Debian image is released and I can access the graphical user interface.
VisionFive 2 system info
We can check out the system information with a few commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
root@starfive:~# cat /etc/issue Debian GNU/Linux bookworm/sid \n \l root@starfive:~# uname -a Linux starfive 5.15.0-starfive #1 SMP Mon Dec 19 07:56:37 EST 2022 riscv64 GNU/Linux root@starfive:~# inxi -Fc0 perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_ADDRESS = "en_GB.UTF-8", LC_NAME = "en_GB.UTF-8", LC_MONETARY = "en_GB.UTF-8", LC_PAPER = "en_GB.UTF-8", LC_IDENTIFICATION = "en_GB.UTF-8", LC_TELEPHONE = "en_GB.UTF-8", LC_MEASUREMENT = "en_GB.UTF-8", LC_TIME = "en_GB.UTF-8", LC_NUMERIC = "en_GB.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). System: Host: starfive Kernel: 5.15.0-starfive arch: riscv64 bits: 64 Console: pty pts/0 Distro: Debian GNU/Linux bookworm/sid Machine: Type: RISCV System: StarFive VisionFive V2 details: N/A serial: VF7110B1-2253-D008E000-00001654 CPU: Info: single core model: N/A variant: u74-mc bits: 64 type: MT cache: L2: 2 MiB Speed (MHz): avg: 375 min/max: 375/1500 cores: 1: 375 2: 375 3: 375 4: 375 Graphics: Device-1: img-gpu driver: pvrsrvkm v: kernel Device-2: jh7110-hdmi driver: innohdmi_starfive v: N/A Device-3: jh7110-display driver: starfive v: N/A Display: server: X.org v: 1.21.1.3 driver: N/A note: X driver n/a tty: 203x53 Message: GL data unavailable in console for root. Audio: Device-1: jh7110-pwmdac driver: starfive_pwmdac Device-2: jh7110-hdmi driver: innohdmi_starfive Device-3: simple-audio-card driver: N/A Device-4: simple-audio-card driver: asoc_simple_card Device-5: simple-audio-card driver: N/A Device-6: simple-audio-card driver: asoc_simple_card Device-7: simple-audio-card driver: N/A Device-8: simple-audio-card driver: N/A Device-9: simple-audio-card driver: N/A Sound Server-1: ALSA v: k5.15.0-starfive running: yes Network: Device-1: dwmac driver: starfive_eth_plat IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 6c:cf:39:00:2a:f1 Device-2: dwmac driver: starfive_eth_plat IF: eth1 state: down mac: 6c:cf:39:00:2a:f2 Drives: Local Storage: total: 30.47 GiB used: 11.9 GiB (39.0%) ID-1: /dev/mmcblk1 vendor: Apacer model: APPSD size: 30.47 GiB Partition: ID-1: / size: 15.16 GiB used: 11.88 GiB (78.3%) fs: ext4 dev: /dev/mmcblk1p3 ID-2: /boot size: 99.8 MiB used: 22 MiB (22.0%) fs: vfat dev: /dev/mmcblk1p2 Swap: Alert: No swap data was found. Sensors: System Temperatures: cpu: 45.1 C mobo: N/A Fan Speeds (RPM): N/A Info: Processes: 113 Uptime: 19m Memory: 7.74 GiB used: 237.6 MiB (3.0%) Init: systemd target: graphical (5) Shell: Bash inxi: 3.3.18 root@starfive:~# df -h free -mh Filesystem Size Used Avail Use% Mounted on udev 3.7G 0 3.7G 0% /dev tmpfs 793M 3.0M 790M 1% /run /dev/mmcblk1p3 16G 13G 3.1G 80% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock /dev/mmcblk1p2 100M 22M 78M 23% /boot tmpfs 793M 24K 793M 1% /run/user/0 root@starfive:~# free -mh total used free shared buff/cache available Mem: 7.7Gi 206Mi 7.4Gi 2.0Mi 116Mi 7.5Gi Swap: 0B 0B 0B root@starfive:~# |
It seems everything is detected properly with the JH7110 quad-core CPU, 8GB RAM, 32GB SD card, and drivers for display, audio, and Ethernet.
VisionFive 2 features testing
We can’t test HDMI or other video or graphics-related features with this image since it’s not working with any of my monitors, but we can still check headless features.
GPIO
GPIOs are showing up in sysfs :
1 2 3 |
root@starfive:~# ls -l /dev/gpiochip* crw------- 1 root root 254, 0 Jun 10 2022 /dev/gpiochip0 crw------- 1 root root 254, 1 Jun 10 2022 /dev/gpiochip1 |
Let’s try to toggle GPIO 44 (pin 40 on the GPIO header):
1 2 3 4 5 |
cd /sys/class/gpio echo 44 > export gpio44/ echo out > direction echo 1 > value |
I could measure 3.27V with a multimeter with leads placed on pins 40 and 39. Let’s change the value to zero
1 |
echo 0 > value |
My multimeter reports 0.00V. GPIO is a pass. You’ll find how to use I2C, SPI, PWM, and UART interfaces in the documentation.
Ethernet
Let’s carry on by testing the two Gigabit Ethernet ports with iperf3 installed with apt.
LAN1 (edge of board):
- Upload:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
iperf3 -t 60 -c 192.168.31.114 -i 10 Connecting to host 192.168.31.114, port 5201 [ 5] local 192.168.31.199 port 53702 connected to 192.168.31.114 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-10.00 sec 1.10 GBytes 943 Mbits/sec 0 421 KBytes [ 5] 10.00-20.00 sec 1.10 GBytes 942 Mbits/sec 0 612 KBytes [ 5] 20.00-30.00 sec 1.10 GBytes 941 Mbits/sec 0 612 KBytes [ 5] 30.00-40.00 sec 1.10 GBytes 942 Mbits/sec 0 612 KBytes [ 5] 40.00-50.00 sec 1.10 GBytes 941 Mbits/sec 0 993 KBytes [ 5] 50.00-60.00 sec 1.10 GBytes 942 Mbits/sec 0 993 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.00 sec 6.58 GBytes 942 Mbits/sec 0 sender [ 5] 0.00-60.00 sec 6.57 GBytes 941 Mbits/sec receiver iperf Done. |
- Download:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
iperf3 -t 60 -c 192.168.31.114 -i 10 -R Connecting to host 192.168.31.114, port 5201 Reverse mode, remote host 192.168.31.114 is sending [ 5] local 192.168.31.199 port 38484 connected to 192.168.31.114 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 1.09 GBytes 940 Mbits/sec [ 5] 10.00-20.00 sec 1.10 GBytes 942 Mbits/sec [ 5] 20.00-30.00 sec 1.10 GBytes 942 Mbits/sec [ 5] 30.00-40.00 sec 1.10 GBytes 942 Mbits/sec [ 5] 40.00-50.00 sec 1.10 GBytes 942 Mbits/sec [ 5] 50.00-60.00 sec 1.10 GBytes 942 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.00 sec 6.58 GBytes 942 Mbits/sec 0 sender [ 5] 0.00-60.00 sec 6.57 GBytes 941 Mbits/sec receiver iperf Done. |
- Full-duplex (bidrectional):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
iperf3 -t 60 -c 192.168.31.114 -i 10 --bidir Connecting to host 192.168.31.114, port 5201 [ 5] local 192.168.31.199 port 60996 connected to 192.168.31.114 port 5201 [ 7] local 192.168.31.199 port 32776 connected to 192.168.31.114 port 5201 [ ID][Role] Interval Transfer Bitrate Retr Cwnd [ 5][TX-C] 0.00-10.00 sec 1.06 GBytes 908 Mbits/sec 0 1.33 MBytes [ 7][RX-C] 0.00-10.00 sec 459 MBytes 385 Mbits/sec [ 5][TX-C] 10.00-20.00 sec 1.05 GBytes 900 Mbits/sec 57 403 KBytes [ 7][RX-C] 10.00-20.00 sec 460 MBytes 386 Mbits/sec [ 5][TX-C] 20.00-30.00 sec 298 MBytes 250 Mbits/sec 3 410 KBytes [ 7][RX-C] 20.00-30.00 sec 978 MBytes 821 Mbits/sec [ 5][TX-C] 30.00-40.00 sec 841 MBytes 706 Mbits/sec 5 570 KBytes [ 7][RX-C] 30.00-40.00 sec 634 MBytes 532 Mbits/sec [ 5][TX-C] 40.00-50.00 sec 895 MBytes 751 Mbits/sec 11 710 KBytes [ 7][RX-C] 40.00-50.00 sec 586 MBytes 491 Mbits/sec [ 5][TX-C] 50.00-60.00 sec 414 MBytes 347 Mbits/sec 5 677 KBytes [ 7][RX-C] 50.00-60.00 sec 895 MBytes 751 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-60.00 sec 4.49 GBytes 644 Mbits/sec 81 sender [ 5][TX-C] 0.00-60.00 sec 4.49 GBytes 642 Mbits/sec receiver [ 7][RX-C] 0.00-60.00 sec 3.92 GBytes 561 Mbits/sec 267 sender [ 7][RX-C] 0.00-60.00 sec 3.92 GBytes 561 Mbits/sec receiver iperf Done. |
Results are perfect in either direction, but lower than the max with full-duplex. Those are however similar results as on some Arm platforms such as Khadas VIM4 SBC.
LAN2 (Next to HDMI port):
- Download:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
iperf3 -t 60 -c 192.168.31.115 -i 10 Connecting to host 192.168.31.115, port 5201 [ 5] local 192.168.31.199 port 57690 connected to 192.168.31.115 port 5201 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-10.00 sec 1.10 GBytes 942 Mbits/sec 0 424 KBytes [ 5] 10.00-20.00 sec 1.10 GBytes 941 Mbits/sec 0 424 KBytes [ 5] 20.00-30.00 sec 1.10 GBytes 942 Mbits/sec 0 936 KBytes [ 5] 30.00-40.00 sec 1.10 GBytes 942 Mbits/sec 0 936 KBytes [ 5] 40.00-50.00 sec 1.10 GBytes 942 Mbits/sec 16 749 KBytes [ 5] 50.00-60.00 sec 1.09 GBytes 940 Mbits/sec 130 296 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.00 sec 6.58 GBytes 941 Mbits/sec 146 sender [ 5] 0.00-60.00 sec 6.57 GBytes 941 Mbits/sec receiver iperf Done. |
- Upload:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
iperf3 -t 60 -c 192.168.31.115 -i 10 -R Connecting to host 192.168.31.115, port 5201 Reverse mode, remote host 192.168.31.115 is sending [ 5] local 192.168.31.199 port 48018 connected to 192.168.31.115 port 5201 [ ID] Interval Transfer Bitrate [ 5] 0.00-10.00 sec 1.09 GBytes 940 Mbits/sec [ 5] 10.00-20.00 sec 1.09 GBytes 941 Mbits/sec [ 5] 20.00-30.00 sec 1.10 GBytes 941 Mbits/sec [ 5] 30.00-40.00 sec 1.09 GBytes 940 Mbits/sec [ 5] 40.00-50.00 sec 1.10 GBytes 941 Mbits/sec [ 5] 50.00-60.00 sec 1.09 GBytes 940 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-60.00 sec 6.57 GBytes 941 Mbits/sec 0 sender [ 5] 0.00-60.00 sec 6.57 GBytes 940 Mbits/sec receiver iperf Done. |
Full-duplex:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
iperf3 -t 60 -c 192.168.31.115 -i 10 --bidir Connecting to host 192.168.31.115, port 5201 [ 5] local 192.168.31.199 port 48972 connected to 192.168.31.115 port 5201 [ 7] local 192.168.31.199 port 48984 connected to 192.168.31.115 port 5201 [ ID][Role] Interval Transfer Bitrate Retr Cwnd [ 5][TX-C] 0.00-10.00 sec 1011 MBytes 848 Mbits/sec 32 694 KBytes [ 7][RX-C] 0.00-10.00 sec 507 MBytes 425 Mbits/sec [ 5][TX-C] 10.00-20.00 sec 490 MBytes 411 Mbits/sec 1 672 KBytes [ 7][RX-C] 10.00-20.00 sec 843 MBytes 707 Mbits/sec [ 5][TX-C] 20.00-30.00 sec 1.05 GBytes 905 Mbits/sec 0 735 KBytes [ 7][RX-C] 20.00-30.00 sec 459 MBytes 385 Mbits/sec [ 5][TX-C] 30.00-40.00 sec 659 MBytes 553 Mbits/sec 70 475 KBytes [ 7][RX-C] 30.00-40.00 sec 731 MBytes 613 Mbits/sec [ 5][TX-C] 40.00-50.00 sec 951 MBytes 798 Mbits/sec 15 699 KBytes [ 7][RX-C] 40.00-50.00 sec 562 MBytes 471 Mbits/sec [ 5][TX-C] 50.00-60.00 sec 538 MBytes 451 Mbits/sec 27 587 KBytes [ 7][RX-C] 50.00-60.00 sec 817 MBytes 685 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate Retr [ 5][TX-C] 0.00-60.00 sec 4.62 GBytes 661 Mbits/sec 145 sender [ 5][TX-C] 0.00-60.01 sec 4.61 GBytes 660 Mbits/sec receiver [ 7][RX-C] 0.00-60.00 sec 3.83 GBytes 548 Mbits/sec 224 sender [ 7][RX-C] 0.00-60.01 sec 3.83 GBytes 548 Mbits/sec receiver iperf Done. |
It’s pretty much the same as the other Ethernet port, and that’s a pass as well…
M.2 NVMe storage
I installed a 256GB Apacer M.2 2280 PCIe Gen3 x4 SSD (AS2280P4) in the M.2 socket on the bottom of the board, and it’s detected properly:
1 2 3 4 5 6 7 8 9 10 11 |
root@starfive:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS mtdblock0 31:0 0 128K 0 disk mtdblock1 31:1 0 3M 0 disk mtdblock2 31:2 0 1M 0 disk mmcblk1 179:0 0 30.5G 0 disk |-mmcblk1p1 179:1 0 16M 0 part |-mmcblk1p2 179:2 0 100M 0 part /boot `-mmcblk1p3 179:3 0 15.5G 0 part / nvme0n1 259:0 0 238.5G 0 disk `-nvme0n1p1 259:1 0 238.5G 0 part |
iozone3 is not available through apt, so I had to download it and build it from source:
1 2 3 4 5 6 |
apt install build-essential wget https://www.iozone.org/src/current/iozone3_494.tgz tar xvf iozone3_494.tgz cd iozone3_494/src/current/ make linux-arm cp iozone /usr/local/bin |
There’s no RISC-V option in the Makefile, so I first tried to use “make linux”, but the build failed while linking. “make linux-arm” did complete, so we’ll use that…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
root@starfive:~# cd /media/nvme0n1p1/ root@starfive:/media/nvme0n1p1# sudo iozone -e -I -a -s 1000M -r 16384k -i 0 -i 1 -i 2 Iozone: Performance Test of File I/O Version $Revision: 3.494 $ Compiled for 64 bit mode. Build: linux-arm Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins Al Slater, Scott Rhine, Mike Wisner, Ken Goss Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR, Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner, Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone, Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root, Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer, Vangel Bojaxhi, Ben England, Vikentsi Lapa, Alexey Skidanov, Sudhir Kumar. Run began: Sun Feb 12 07:29:34 2023 Include fsync in write timing O_DIRECT feature enabled Auto Mode File size set to 1024000 kB Record Size 16384 kB Command line used: iozone -e -I -a -s 1000M -r 16384k -i 0 -i 1 -i 2 Output is in kBytes/sec Time Resolution = 0.000001 seconds. Processor cache size set to 1024 kBytes. Processor cache line size set to 32 bytes. File stride size set to 17 * record size. random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 1024000 16384 169763 161593 166202 158275 170468 202205 iozone test complete. |
The SSD is supposed to support up to 1,800 MB/s read speeds and 1,100 MB/s write speeds. So at 169MB/s and 158MB/s that does not cut it at all. I previously tested it at 1100 MB/s with ORICO Thunderbolt/USB enclosure connected to an Intel mini PC. Repeating the test on the VisionFive 2 yields the same low speeds.
Here’s the output for lscpi for reference:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
root@starfive:/media/nvme0n1p1# lspci -v 0000:00:00.0 PCI bridge: PLDA XpressRich-AXI Ref Design (rev 02) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Memory at <unassigned> (64-bit, prefetchable) Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 I/O behind bridge: 00000000-00000fff [size=4K] Memory behind bridge: 30000000-300fffff [size=1M] Prefetchable memory behind bridge: 0000000000000000-00000000000fffff [size=1M] Capabilities: [80] Express Root Port (Slot+), MSI 00 Capabilities: [e0] MSI: Enable- Count=1/32 Maskable+ 64bit+ Capabilities: [f8] Power Management version 3 Capabilities: [100] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?> Capabilities: [200] Advanced Error Reporting 0000:01:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller (rev 01) (prog-if 30 [XHCI]) Subsystem: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller Flags: bus master, fast devsel, latency 0, IRQ 58 Memory at 30000000 (64-bit, non-prefetchable) [size=4K] Capabilities: [80] Power Management version 3 Capabilities: [90] MSI: Enable+ Count=1/4 Maskable- 64bit+ Capabilities: [c4] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Kernel driver in use: xhci_hcd 0001:00:00.0 PCI bridge: PLDA XpressRich-AXI Ref Design (rev 02) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Memory at <unassigned> (64-bit, prefetchable) Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 I/O behind bridge: 00000000-00000fff [size=4K] Memory behind bridge: 38000000-380fffff [size=1M] Prefetchable memory behind bridge: 0000000000000000-00000000000fffff [size=1M] Capabilities: [80] Express Root Port (Slot+), MSI 00 Capabilities: [e0] MSI: Enable- Count=1/32 Maskable+ 64bit+ Capabilities: [f8] Power Management version 3 Capabilities: [100] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?> Capabilities: [200] Advanced Error Reporting 0001:01:00.0 Non-Volatile memory controller: Phison Electronics Corporation PS5013 E13 NVMe Controller (rev 01) (prog-if 02 [NVM Express]) Subsystem: Phison Electronics Corporation PS5013 E13 NVMe Controller Flags: bus master, fast devsel, latency 0, IRQ 59 Memory at 38000000 (64-bit, non-prefetchable) [size=16K] Capabilities: [80] Express Endpoint, MSI 00 Capabilities: [d0] MSI-X: Enable+ Count=9 Masked- Capabilities: [e0] MSI: Enable- Count=1/8 Maskable+ 64bit+ Capabilities: [f8] Power Management version 3 Capabilities: [100] Latency Tolerance Reporting Capabilities: [110] L1 PM Substates Capabilities: [200] Advanced Error Reporting Capabilities: [300] Secondary PCI Express Kernel driver in use: nvme |
It does not show the link speed, but if we check a more verbose output it shows:
1 2 3 4 5 |
LnkSta: Speed 5GT/s (downgraded), Width x1 (downgraded) LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS- LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis- Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB |
That one would be a failure for now, since the performance is way too low.
USB
Let shut down the board, remove the M.2 NVMe SSD, and put it into the ORICO enclosure mentioned above. Now let’s connect the USB SSD enclosure and boot the board again and
This is what the output of lsusb looks like with the USB enclosure, keyboard, and mouse:
1 2 3 4 5 6 7 8 |
root@starfive:~# lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M |
Let’s now run iozone:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
root@starfive:~# cd /media/sda1/ root@starfive:/media/sda1# sudo iozone -e -I -a -s 1000M -r 16384k -i 0 -i 1 -i 2 Iozone: Performance Test of File I/O Version $Revision: 3.494 $ Compiled for 64 bit mode. Build: linux-arm Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins Al Slater, Scott Rhine, Mike Wisner, Ken Goss Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR, Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner, Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone, Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root, Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer, Vangel Bojaxhi, Ben England, Vikentsi Lapa, Alexey Skidanov, Sudhir Kumar. Run began: Sun Feb 12 09:40:05 2023 Include fsync in write timing O_DIRECT feature enabled Auto Mode File size set to 1024000 kB Record Size 16384 kB Command line used: iozone -e -I -a -s 1000M -r 16384k -i 0 -i 1 -i 2 Output is in kBytes/sec Time Resolution = 0.000001 seconds. Processor cache size set to 1024 kBytes. Processor cache line size set to 32 bytes. File stride size set to 17 * record size. random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 1024000 16384 173936 176209 152915 151294 210743 173002 iozone test complete. |
The numbers are strangely close to the ones when connected to the M.2 socket. 173MB/s writes and 152MB/s reads… That should be closer to 300 to 400MB/s on a USB 3.0 port at 5 Gbps. It’s also possible iozone3 requires some optimizations for RISC-V but I view this as unlikely.
Audio jack
While we can’t test HDMI audio right now, we can still try the 3.5mm audio jack by connecting a pair of speakers powered by one of the USB ports from the board. USB is only for power, and the audio comes from the 3.5mm jack.
I used the preinstalled ffplay to play some license-free MP3:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
root@starfive:~# ffplay bensound-epic.mp3 -nodisp ffplay version 4.4.1 Copyright (c) 2003-2021 the FFmpeg developers built with gcc 11 (Debian 11.3.0-3) configuration: --prefix=/code_mm_20221111/target/usr --arch=riscv64 --target-os=linux --enable-gpl --disable-stripping --disable-static --enable-shared --enable-avfilter --disable-version3 --enable-log ging --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable- rdft --enable-libv4l2 --enable-alsa --enable-outdevs --enable-pthreads --enable-zlib --enable-indevs --enable-runtime-cpudetect --enable-pic --cpu=rv64imafd --enable-libaom --enable-libass --enable-libbl uray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-lib gsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --ena ble-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-li bx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-chromaprint --enable-libx264 --disable-frei0r --disable-gnutls --disable-ladspa --disable-libiec61883 --enable-omx --extra-ldflags=-L/code_mm_20221111/target/ usr/lib --extra-cflags=-I/code_mm_20221111/target/usr/include/omx-il --extra-libs=-lOMX_Core libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mp3, from 'bensound-epic.mp3':q= 0KB sq= 0B f=0/0 Duration: 00:02:58.55, start: 0.025057, bitrate: 112 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 112 kb/s Metadata: encoder : LAME3.99r ^Croot@starfive:~# fd= 0 aq= 14KB vq= 0KB sq= 0B f=0/0 |
It works fine, but the audio was saturated at full volume. There was no such issue after lowering the speakers’ volume.
Let’s add some comments about the MicroSD card. The cards have used have poor random I/O performance, but I could use those with Raspberry Pi and other SBCs without much difficulty. But with the Debian 12 image used in VisionFive 2, just typing commands in the terminal can be really, even a simple “ls” in the root directory can take 10 seconds to complete.
1 2 3 4 5 6 7 |
root@starfive:~# time ls 'audio_534a89f910.mp3?filename=easy-lifestyle-137766.mp3' iozone3_494 linux-headers-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb linux-libc-dev_5.15.0-starfive-1_riscv64.deb wget-log bensound-epic.mp3 iozone3_494.tgz linux-image-5.15.0-starfive_5.15.0-starfive-1_riscv64.deb sbc-bench.sh real 0m9.588s user 0m0.009s sys 0m0.001s |
I also have to wait around 5 to 10 minutes before I can go through the login prompt “starfive login: root” and start typing commands. Having a higher-performance MicroSD card or using an eMMC module would certainly help, but I’m pretty sure the Debian image also needs to be optimized in that regard.
SBC Bench benchmarks
I’m usually running sbc-bench.sh script to evaluate the performance of single board computers and mini PCs. RISC-V is a pretty new platform, so I did not much hope it would work smoothly, but I tried anyway.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
root@starfive:~# ./sbc-bench.sh -m StarFive JH7110, Kernel: riscv64, Userland: riscv64 CPU sysfs topology (clusters, cpufreq members, clockspeeds) cpufreq min max CPU cluster policy speed speed core type 0 -1 0 375 1500 sifive,u74-mc 1 -1 0 375 1500 sifive,u74-mc 2 -1 0 375 1500 sifive,u74-mc 3 -1 0 375 1500 sifive,u74-mc Thermal source: /sys/class/hwmon/hwmon0/ (120e0000.tmon) Time CPU load %cpu %sys %usr %nice %io %irq Temp 04:51:10: 750MHz 8.35 71% 1% 1% 0% 69% 0% 50.8°C 04:51:15: 750MHz 8.26 85% 1% 1% 0% 82% 0% 50.9°C 04:51:21: 750MHz 8.24 98% 0% 0% 0% 98% 0% 50.9°C 04:51:26: 750MHz 8.22 100% 0% 0% 0% 99% 0% 50.8°C 04:51:31: 750MHz 8.28 100% 0% 0% 0% 99% 0% 50.8°C 04:51:36: 750MHz 8.02 57% 2% 2% 0% 52% 0% 51.0°C 04:51:41: 750MHz 7.86 73% 0% 0% 0% 73% 0% 50.9°C 04:51:46: 750MHz 7.79 75% 0% 0% 0% 74% 0% 50.9°C 04:51:51: 750MHz 7.81 98% 0% 0% 0% 98% 0% 50.8°C |
The information view works well. There’s a lot of activity and I/Os here because a package is being installed in another terminal window.
But even during idle SBC bench will not start because of a high CPU load:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
root@starfive:~# ./sbc-bench.sh -c WARNING: This tool is meant to run only on Debian Stretch, Buster, Bullseye or Ubuntu Bionic, Focal, Jammy, Kinetic. When executed on Debian GNU/Linux bookworm/sid results are partially meaningless. Press [ctrl]-[c] to stop or [enter] to continue. WARNING: dmesg output does not contain early boot messages which help in identifying hardware details. It is recommended to reboot now and then execute the benchmarks. Press [ctrl]-[c] to stop or [enter] to continue. Average load and/or CPU utilization too high (too much background activity). Waiting... Too busy for benchmarking: 07:51:08 up 52 min, 3 users, load average: 7.35, 6.77, 6.40, cpu: % Too busy for benchmarking: 07:51:13 up 52 min, 3 users, load average: 7.24, 6.76, 6.40, cpu: % Too busy for benchmarking: 07:51:18 up 53 min, 3 users, load average: 7.14, 6.75, 6.40, cpu: % |
There are also two other warnings. The first one is that the script has not been tested on the yet-to-be-released Debian 12 “Bookworm”. The second is because dmesg output is truncated and not starting from 00:00. I’m not going to reboot, as it takes around 8 minutes for a complete boot cycle to the point after I log in and access the command prompt. Let’s disable CPU load average checking, and restart the script to see how far it can go:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
root@starfive:~# ./sbc-bench.sh -c WARNING: This tool is meant to run only on Debian Stretch, Buster, Bullseye or Ubuntu Bionic, Focal, Jammy, Kinetic. When executed on Debian GNU/Linux bookworm/sid results are partially meaningless. Press [ctrl]-[c] to stop or [enter] to continue. WARNING: dmesg output does not contain early boot messages which help in identifying hardware details. It is recommended to reboot now and then execute the benchmarks. Press [ctrl]-[c] to stop or [enter] to continue. sbc-bench v0.9.17 Installing needed tools: apt -f -qq -y install sysstat git curl lshw mbw p7zip...No 7-zip binary found and could not be installed. Aborting root@starfive:~# |
The 7-zip package is not part of the Debian RISCV64 repository and it would have to be built from source to run on the VisionFive 2 board. So at this point in time, it’s not possible to run SBC Bench without skipping a few tests. Let’s revisit it in a few months.
Conclusion
StarFive VisionFive 2 should be viewed as a RISC-V development board at this stage, and it’s not suitable for integration into projects/products until further progress is made on the software side. Since since Linux RISC-V is still pretty new, especially from a video/graphics point of view, it should be expected. There are already features that work fine such as Gigabit Ethernet, GPIOs, the audio jack, and USB, but others like HDMI and storage performance still need a lot of work. System stability needs to be improved too since my SSH connection dropped a few times and I was unable to reconnect, nor did the serial console work, requiring a hard reboot. But I can see a decent amount of activity in the forums and the company is working on mainlining the Linux kernel.
I’d like to thank StarFive for sending the board. Developers who want to help with software and/or testing can purchase the VisionFive 2 SBC reviewed here for $70.40 plus shipping (and potentially taxes). The board is also offered on Amazon for $112 with WiFi.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress