StarFive VisionFive 2 SD-card boot errors

Hi,
I have

  • Armbian_23.8.0-trunk.51_Visionfive2_lunar_edge_5.15.0.img
  • ubuntu-23.04-preinstalled-server-riscv64+visionfive2.img
  • starfive-jh7110-VF2_515_v2.5.0-69.img

all are not booting, error message is

BOOT fail,Error is 0xffffffff

All images are transfered to SD with balenaEtcher-1.18.4.

What can I do to make these images bootable?

Firmware is up-to-date
Hardware is ok, from the five images I have, starfive-jh7110-VF2-SD-wayland.img works fine (minimal desktop Debian 11)

Regards,

Dennis

1 Like

Have you triggered the Boot Mode keys?

Please heed my advice. Stop using balena etcher if you’re getting errors there.

Boot into a linux from a thumb drive on a wintel box. Then do the following:

    • Please ensure your sdcard is unmounted before doing any of the wiping/imaging to the sdcard.
lsblk
umount /run/media/davidm/rootpart
umount /run/media/davidm/root
umount /run/media/davidm/305E-3140
lsblk
  1. Wipe your sdcard,
wipefs --all /dev/sdb
  1. then write the ubuntu image with dd tool
xz -dk ubuntu-23.04-preinstalled-server-riscv64+visionfive2.img.xz
dd if=./ubuntu-23.04-preinstalled-server-riscv64+visionfive2.img of=/dev/sdb bs=4M status=progress conv=fdatasync

Note: then make sure you have your network cable connected to it. Afterwards, power it up. Be very patient. It takes a few minutes to see it on your network. I usually do

ping 192.168.2.79
PING 192.168.2.79 (192.168.2.79) 56(84) bytes of data.
From 192.168.2.16 icmp_seq=1 Destination Host Unreachable
From 192.168.2.16 icmp_seq=2 Destination Host Unreachable
From 192.168.2.16 icmp_seq=3 Destination Host Unreachable

and after a while it echoes a response.

From 192.168.2.16 icmp_seq=55 Destination Host Unreachable
From 192.168.2.16 icmp_seq=56 Destination Host Unreachable
From 192.168.2.16 icmp_seq=57 Destination Host Unreachable
64 bytes from 192.168.2.79: icmp_seq=58 ttl=64 time=1024 ms
64 bytes from 192.168.2.79: icmp_seq=59 ttl=64 time=0.632 ms
64 bytes from 192.168.2.79: icmp_seq=60 ttl=64 time=0.445 ms
64 bytes from 192.168.2.79: icmp_seq=61 ttl=64 time=0.433 ms
64 bytes from 192.168.2.79: icmp_seq=62 ttl=64 time=0.456 ms

--- 192.168.2.79 ping statistics ---
62 packets transmitted, 5 received, +45 errors, 91.9355% packet loss, time 62442ms
rtt min/avg/max/mdev = 0.433/205.274/1024.404/409.565 ms, pipe 4

then I can ssh into it:

 $ ssh ubuntu@192.168.2.79
ubuntu@192.168.2.79's password: 
Welcome to Ubuntu 23.04 (GNU/Linux 6.4.0-rc5+ riscv64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon Jun  5 17:47:47 EDT 2023

  System load:  1.62               Temperature:           47.7 C
  Usage of /:   8.9% of 112.73GB   Processes:             118
  Memory usage: 2%                 Users logged in:       0
  Swap usage:   0%                 IPv4 address for end0: 192.168.2.79

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

0 updates can be applied immediately.


Last login: Mon Jun  5 17:17:10 2023 from 192.168.2.16
ubuntu@vf2-UbuSrv-YOW 2023-06-05_17:47:51_EDT : ~
 $ uname -a
Linux vf2-UbuSrv-YOW 6.4.0-rc5+ #114 SMP Mon Jun  5 01:37:45 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
ubuntu@vf2-UbuSrv-YOW 2023-06-06_12:35:44_EDT : ~

after doing this, I shutdown:

sudo shutdown -h now

And all the SBC’s lights are off almost instantly. Please enable the custom repo for the
latest daily ubuntu server kernel builds provided by our superhero @agreenbhm are magical :slight_smile: Thank you again. Can’t praise enough.

2 Likes

As @larryw3i mentioned, check your boot mode settings Boot Mode Settings and bootloader. I get that error when the the bootloader doesn’t load.
(edit: added everything below after new user restrictions were lifted)
Yes, I literally all I get is (no u-boot messages):

dwmci_s: Response Timeout.
BOOT fail,Error is 0xffffffff

The specific error line can occur in other places too so if you get more output it might be helpful to mention that.

In my case the board seemed to have an issue with the SPI stored bootloader with literally nothing booting (at the time I hadn’t uart connected so don’t have exact messages).
The fix was to switch from SPI to SDIO/SD (from both dip switches on the right to bottom to left) which then get the sdcard.img (part of the VisionFive release e.g. https://github.com/starfive-tech/VisionFive2/releases/download/VF2_v3.0.4/sdcard.img ).
After that I followed the boot loader upgrade instructions as per Updating SPL and U-Boot of Flash then changing the dip switches back to use SPI flash (both in right position).

The reason the sdcard.img boots is due to its specific layout (its intended for flashing after all):

Device      Start     End Sectors  Size Type
/dev/sdb1    4096    8191    4096    2M HiFive BBL
/dev/sdb2    8192   16383    8192    4M HiFive FSBL
/dev/sdb3   16384  614399  598016  292M Microsoft basic data
/dev/sdb4  614400 1638399 1024000  500M Linux filesystem

versus e.g. ubuntu image which looks like:

Device      Start     End Sectors  Size Type
/dev/sdb1  229376 9437150 9207775  4.4G Linux filesystem
/dev/sdb2    8192   16383    8192    4M unknown
/dev/sdb12  16384   24575    8192    4M Linux filesystem
/dev/sdb13   4096    8191    4096    2M HiFive BBL
/dev/sdb15  24576  229375  204800  100M EFI System

My second attempt to get my VF2 working I had a good solid USB Type C PD power supply (30W 2A@15V) but I chose to use a really old MicroSD card I had laying around, which turned out not to work…

Samsung 16GB UHS-I Grade 1 MicroSDHC Class 10
Samsung 16GB UHS-1 Grade 1 MicroSDHC Pro - Class 10

It would load the SPI+U-Boot partition fine and the U-Boot+OpenSBI partition fine, but partition 3 was always invalid.

Ultimately the error message seen just before this was “Card did not respond to voltage select! : -110”. So it was like during the boot process the voltages were being changed and then the VF2 could no longer read the MicroSD card.

( ref: https://paste.ee/p/pZ7pG#m0s9tCltOCNeweIRxHfP7CxBElJAwMMV )

I ended up buying a new MicroSD card and everything worked fine after that.

I also saw the below error messages on my first attempt to powerup my VF2 when I used 5V to power the board, from a bench power supply connected to the two +5 V GPIO pins and two Ground pins (to help reduce the maximum current on each individual pin). The wires used were not the best so I was probably suffering a large voltage drop across them. The allowed voltage range for USB 2.0 High Speed is 4.75V to 5.25V, so I slowly raised my bench power supply to 5.25 volts and those error messages vanished at about 5.15 volts. And that was when I started to see problems with my MicroSD card.

U-Boot SPL 2021.10 (Mar 22 2023 - 19:45:47 +0800)
DDR version: dc2e84f0.
 dwmci_s: Response Timeout.
BOOT fail,Error is 0xffffffff
dwmci_s: Response Timeout.
BOOT fail,Error is 0xffffffff
1 Like

Hi, same error here, I have to set boot mode QSPI

For me VF2 can boot this way :+1:t4: