Could someone help with U-Boot update errors?

I am trying to install a Debian on the SSD, I am following the wiki from Debian at InstallingDebianOn StarFive VisionFiveV2

I got my u-boot-spl.bin.normal.out and u-boot.itb from http://deb.debian.org/debian/pool/main/u/u-boot/u-boot-starfive_2025.01-3.1_riscv64.deb

I unzipped the .deb and get the file out for transfer.

Then I followed Update QSPI Flash using U-Boot console

I got the following:

StarFive # sf probe
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
StarFive # env erase
Erasing Environment on SPIFlash… OK
StarFive # sf probe
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
StarFive # loady && sf update $loadaddr 0 $filesize

Ready for binary (ymodem) download to 0x60000000 at 115200 bps…

CCCxyzModem - CRC mode, 1(SOH)/144(STX)/0(CAN) packets, 4 retries

Total Size = 0x00023f52 = 147282 Bytes

device 0 offset 0x0, size 0x23f52
0 bytes written, 147282 bytes skipped in 0.113s, speed 1300144 B/s

After running “loady && sf update $loadaddr 0 $filesize”:

  1. the offset does not match the document; and

  2. it has zero bytes written.

I connected to the board using an usb serial.

Could someone please help?

Hi!

It was quite a time ago I did this. I used then u-boot-starfive_2025.01-3_riscv64.deb and I found serial to slow so I changed to a USB memory stick instead.

From my documentation I did the following:

# put u-boot-spl.bin.normal.out and u-boot.itb on a FAT or ext2 formatted USB-stick
# boot into u-boot
usb reset
sf probe
load usb 0:1 ${loadaddr} u-boot-spl.bin.normal.out && sf update ${loadaddr} 0 ${filesize}
load usb 0:1 ${loadaddr} u-boot.itb && sf update ${loadaddr} 0x100000 ${filesize}
env erase
reset

If you have to use serial, My docs say:

loady ${loadaddr} && sf update ${loadaddr} 0 ${filesize}
# ^+t y
# u-boot-spl.bin.normal.out

loady ${loadaddr} && sf update ${loadaddr} 100000 ${filesize}
# ^+t y
# u-boot.itb

In compairison to your commands,

  • I did the env erase last.
  • I used loady with $loadaddr.

I’m not sure but I think I did this with a u-boot I started via boot from serial. It could be that the VisionFive2 supplied u-boot is to old for this.

Hope this helps.
Tom

I am a VF2 end-user who does not understand uboot operation instructions.
Before the official release of debian13 last year, and,
Half a year ago; both installations were successful according to the articles on the debian wiki.

I use the ‘Update QSPI Flash from GNU/Linux OS’ in the article

Summary

#[quote=“james007, post:1, topic:6191”]
I got my u-boot-spl.bin.normal.out and u-boot.itb from http://deb.debian.org/debian/pool/main/u/u-boot/u-boot-starfive_2025.01-3.1_riscv64.deb
[/quote]
The uboot bundled with debin is somewhat outdated (2025.1),
I am using the built-in uboot (newer) of irradium.#

I do not recommend installing the official version of debian on SSD or MMC, or ,
Do not install grub boot on SSD, as grub on SSD will have the highest priority. USB debian installation/rescue cannot start first.
I am using a USB debian installation image to install grub on another USB device.
Then, through grub, start the OS, which is on USB or SSD. The OS can be the official version of debian, starfive_debian202510, starfive_ubuntu, archLinux-cwt, irradium, dietpi, and so on.

Key reminder: The USB used for startup must be a new model. I am using Sandisk USB 64GB

Finally, it is recommended that you replace the official release of the debian kernel with a custom kernel. The debian kernel does not support HDMI GPU. I just verified that custom kernels can be implemented.

Thank you all for replying to my questions!

I have the initial backer 8GB version and have never updated nor used.

Before I tried to follow the Debian wiki article, I did an update following Recovering the Bootloader
I used the u-boot-spl.bin.normal.out and visionfive2_fw_payload.img dated Oct 16, 2025 from GitHub release at Releases · starfive-tech/VisionFive2 · GitHub

Here is my boot screen from usb serial:

U-Boot SPL 2021.10 (Oct 10 2025 - 11:25:33 +0800)
LPDDR4: 8G version: g8ad50857.
Trying to boot from SPI

OpenSBI v1.2


/ __ \ / | _ _ |
| | | |
** __ __ _ __ | (** | |) || |
| | | | '_ \ / _ \ '_ \ _
_ | _ < | |
| || | |) | __/ | | |) | |) || |
_
/| ./ _|| ||/|/___|
| |
|_|

Platform Name : StarFive VisionFive V2
Platform Features : medeleg
Platform HART Count : 5
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 4000000Hz
Platform Console Device : uart8250
Platform HSM Device : —
Platform PMU Device : —
Platform Reboot Device : pm-reset
Platform Shutdown Device : pm-reset
Platform Suspend Device : —
Firmware Base : 0x40000000
Firmware Size : 248 KB
Firmware RW Offset : 0x20000
Runtime SBI Version : 1.0

Domain0 Name : root
Domain0 Boot HART : 1
Domain0 HARTs : 0*,1*,2*,3*,4*
Domain0 Region00 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01 : 0x0000000040000000-0x000000004001ffff M: (R,X) S/U: ()
Domain0 Region02 : 0x0000000040020000-0x000000004003ffff M: (R,W) S/U: ()
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address : 0x0000000040200000
Domain0 Next Arg1 : 0x0000000042200000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Domain0 SysSuspend : yes

Boot HART ID : 1
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcbx
Boot HART ISA Extensions : none
Boot HART PMP Count : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 34
Boot HART MHPM Count : 2
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109

U-Boot 2021.10 (Oct 10 2025 - 11:25:33 +0800), Build: jenkins-github_visionfive2_6.12-16

CPU: rv64imacu_zba_zbb
Model: StarFive VisionFive V2
DRAM: 8 GiB
MMC: sdio0@16010000: 0, sdio1@16020000: 1
Loading Environment from SPIFlash… SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110B1-2253-D008E000-00002957
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:38:e3
Ethernet MAC1 address: 6c:cf:39:00:38:e4
--------EEPROM INFO--------

In: serial
Out: serial
Err: serial
Model: StarFive VisionFive V2
Net: eth0: ethernet@16030000, eth1: ethernet@16040000

Hi Tom,

Thank you for your reply.

My first try was unsuccessful.
I gave it a second try, and your commands for usb serial mostly worked.

There were 45056 bytes skipped in 8.456s, I don’t know if that affect the installation.

StarFive # sf probe
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
StarFive # loady ${loadaddr} && sf update ${loadaddr} 0 ${filesize}

Ready for binary (ymodem) download to 0x60000000 at 115200 bps…

CCCxyzModem - CRC mode, 1(SOH)/143(STX)/0(CAN) packets, 6 retries

Total Size = 0x000239ba = 145850 Bytes

device 0 offset 0x0, size 0x239ba
145850 bytes written, 0 bytes skipped in 0.902s, speed 165028 B/s
StarFive # loady ${loadaddr} && sf update ${loadaddr} 100000 ${filesize}

Ready for binary (ymodem) download to 0x60000000 at 115200 bps…

CCCxyzModem - CRC mode, 1(SOH)/987(STX)/0(CAN) packets, 4 retries

Total Size = 0x000f69ab = 1010091 Bytes

device 0 offset 0x100000, size 0xf69ab
965035 bytes written, 45056 bytes skipped in 8.456s, speed 122261 B/s
StarFive # env erase
Erasing Environment on SPIFlash… OK S

After rebooting, I successfully updated U-Boot to version 2025.01-3.2 (Jun 08 2026 - 12:48:23 +0000), which is a newer Debian release. However, my attempt to update the u-boot.itb file again has failed. The offsets now align with the documentation and the files transferred fully without issues. However, any further update attempts were aborted.

StarFive # sf probe
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
StarFive # loady ${loadaddr} && sf update ${loadaddr} 0 ${filesize}

Ready for binary (ymodem) download to 0x82000000 at 115200 bps…

CCC
Timed out

Binary (ymodem) download aborted

After a few more attempts, I compiled U-Boot and OpenSBI myself. I believe the issue was caused by the available u-boot-spl.bin.normal.out and u-boot.itb files being too outdated.