U-Boot v2026.04 and OpenSBI v1.8.1 issues

I have a strange behavior when trying to build the newly released OpenSBI v1.8.1 and U-Boot v2026.04. Used the build steps which are described in the U-Boot documentation.

Seems the build system from U-Boot v2026.04 doesn’t integrate OpenSBI into the binaries or since OpenSBI v1.8.1 there is no longer a starting banner and the board information after U-Boot’s SPL:

U-Boot SPL 2026.04 (Apr 16 2026 - 17:34:49 +0200)
DDR version: dc2e84f0.
Trying to boot from SPI


U-Boot 2026.04 (Apr 16 2026 - 17:34:49 +0200)

CPU:   sifive,u74-mc
Model: StarFive VisionFive 2 v1.3B
DRAM:  8 GiB
Core:  159 devices, 30 uclasses, devicetree: board
WDT:   Not starting watchdog@13070000
MMC:   mmc@16010000: 0, mmc@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-2318-D008E000-18003208
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:5d:7e
Ethernet MAC1 address: 6c:cf:39:00:5d:7f
--------EEPROM INFO--------

In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
starting USB...
USB XHCI 1.00
Bus xhci_pci: 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Working FDT set to ff6fc0c0
Hit any key to stop autoboot: 0
StarFive #

This issue didn’t exists with U-Boot v2025.10 and OpenSBI v1.7, there was always the start banner from OpenSBI via the serial interface shown:

U-Boot SPL 2025.10 (Nov 10 2025 - 05:03:26 +0100)
DDR version: dc2e84f0.
Trying to boot from SPI

OpenSBI v1.7
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name               : StarFive VisionFive 2 v1.3B
Platform Features           : medeleg
Platform HART Count         : 4
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     : ---
Platform CPPC Device        : ---
Firmware Base               : 0x40000000
Firmware Size               : 353 KB
Firmware RW Offset          : 0x40000
Firmware RW Size            : 97 KB
Firmware Heap Offset        : 0x4c000
Firmware Heap Size          : 49 KB (total), 3 KB (reserved), 12 KB (used), 33 KB (free)
Firmware Scratch Size       : 4096 B (total), 400 B (used), 3696 B (free)
Runtime SBI Version         : 3.0
Standard SBI Extensions     : time,rfnc,ipi,base,hsm,srst,pmu,dbcn,fwft,legacy,dbtr,sse
Experimental SBI Extensions : none

Domain0 Name                : root
Domain0 Boot HART           : 2
Domain0 HARTs               : 1*,2*,3*,4*
Domain0 Region00            : 0x0000000010000000-0x0000000010000fff M: (I,R,W) S/U: (R,W)
Domain0 Region01            : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region02            : 0x0000000040040000-0x000000004005ffff M: (R,W) S/U: ()
Domain0 Region03            : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region04            : 0x000000000c000000-0x000000000fffffff M: (I,R,W) S/U: (R,W)
Domain0 Region05            : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X)
Domain0 Next Address        : 0x0000000040200000
Domain0 Next Arg1           : 0x00000000402c1d28
Domain0 Next Mode           : S-mode
Domain0 SysReset            : yes
Domain0 SysSuspend          : yes

Boot HART ID                : 2
Boot HART Domain            : root
Boot HART Priv Version      : v1.11
Boot HART Base ISA          : rv64imafdcbx
Boot HART ISA Extensions    : zihpm,sdtrig
Boot HART PMP Count         : 8
Boot HART PMP Granularity   : 12 bits
Boot HART PMP Address Bits  : 34
Boot HART MHPM Info         : 2 (0x00000018)
Boot HART Debug Triggers    : 8 triggers
Boot HART MIDELEG           : 0x0000000000000222
Boot HART MEDELEG           : 0x000000000000b109


U-Boot 2025.10 (Nov 10 2025 - 05:03:26 +0100)

CPU:   sifive,u74-mc
Model: StarFive VisionFive 2 v1.3B
DRAM:  8 GiB
Core:  159 devices, 29 uclasses, devicetree: board
WDT:   Not starting watchdog@13070000
MMC:   mmc@16010000: 0, mmc@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-2318-D008E000-18003208
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:5d:7e
Ethernet MAC1 address: 6c:cf:39:00:5d:7f
--------EEPROM INFO--------

starfive_7110_pcie pcie@940000000: Starfive PCIe bus probed.
starfive_7110_pcie pcie@9c0000000: Starfive PCIe bus probed.
In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
starting USB...
Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
Bus xhci_pci: 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Working FDT set to ff717740
Hit any key to stop autoboot: 0
StarFive #

Is there a way without Linux to test if OpenSBI v1.8.1 works? Need U-Boot and OpenSBI for bare-metal development on the VF2.

Okay, I have fixed the issue. I used the build steps described in the U-Boot documentation. But these build steps seems to be definitely wrong. Unfortunately I didn’t know anymore how I have built U-Boot v2025.10 with OpenSBI v1.7. So after some search I found the correct solution to build U-Boot v2026.04 and OpenSBI v1.8.1 and update the SPI flash with the actual firmware.

Here the working output:

U-Boot SPL 2026.04 (Apr 16 2026 - 19:33:14 +0200)
DDR version: dc2e84f0.
Trying to boot from SPI

OpenSBI v1.8.1
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name               : StarFive VisionFive 2 v1.3B
Platform Features           : medeleg
Platform HART Count         : 4
Platform HART Protection    : pmp
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     : ---
Platform CPPC Device        : ---
Firmware Base               : 0x40000000
Firmware Size               : 357 KB
Firmware RW Offset          : 0x40000
Firmware RW Size            : 101 KB
Firmware Heap Offset        : 0x4d000
Firmware Heap Size          : 49 KB (total), 0 KB (reserved), 13 KB (used), 35 KB (free)
Firmware Scratch Size       : 4096 B (total), 416 B (used), 3680 B (free)
Runtime SBI Version         : 3.0
Standard SBI Extensions     : time,rfnc,ipi,base,hsm,srst,pmu,dbcn,fwft,legacy,dbtr,sse
Experimental SBI Extensions : none

Domain0 Name                : root
Domain0 Boot HART           : 1
Domain0 HARTs               : 1*,2*,3*,4*
Domain0 Region00            : 0x0000000040040000-0x000000004005ffff M: (F,R,W) S/U: ()
Domain0 Region01            : 0x0000000040000000-0x000000004003ffff M: (F,R,X) S/U: ()
Domain0 Region02            : 0x0000000010000000-0x0000000010000fff M: (I,R,W) S/U: (R,W)
Domain0 Region03            : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region04            : 0x000000000c000000-0x000000000fffffff M: (I,R,W) S/U: (R,W)
Domain0 Region05            : 0x0000000000000000-0xffffffffffffffff M: () 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    : zihpm,sdtrig
Boot HART PMP Count         : 8
Boot HART PMP Granularity   : 12 bits
Boot HART PMP Address Bits  : 34
Boot HART MHPM Info         : 2 (0x00000018)
Boot HART Debug Triggers    : 8 triggers
Boot HART MIDELEG           : 0x0000000000000222
Boot HART MEDELEG           : 0x000000000000b109


U-Boot 2026.04 (Apr 16 2026 - 19:48:27 +0200)

CPU:   sifive,u74-mc
Model: StarFive VisionFive 2 v1.3B
DRAM:  4 GiB
Core:  159 devices, 30 uclasses, devicetree: board
WDT:   Not starting watchdog@13070000
MMC:   mmc@16010000: 0, mmc@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-2318-D008E000-18003208
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:5d:7e
Ethernet MAC1 address: 6c:cf:39:00:5d:7f
--------EEPROM INFO--------

In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
starting USB...
USB XHCI 1.00
Bus xhci_pci: 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Working FDT set to ff6fc140
Hit any key to stop autoboot: 0
StarFive #

Don’t know if I should post the correct build steps here, if another user runs into the same issue.

:+1: :clap:

Build steps to build OpenSBI v1.8.1 and U-Boot v2026.04 for VisionFive 2

NOTE:

The build steps are a little bit tricky currently. But they are working and tested on real hardware.

Prerequisites for Vision Five 2 8GiB DDR-RAM variant:

Currently the official sources from U-Boot only supports the 4GiB RAM variant from the board. For supporting of the 8GiB DDR-RAM variant of the board containing the RAM-IC BiWin BMWZCX32H2A-64G-X (soldered on my model), there is a modification in the device tree source required.

Just change the DDR RAM size from 4GiB to 8GiB in the device tree source dts/upstream/src/riscv/starfive/jh7110-common.dtsi from the U-Boot sources in the memory node:

4GiB DDR-RAM:

memory@40000000 {
		device_type = "memory";
		reg = <0x0 0x40000000 0x1 0x0>;
		bootph-pre-ram;
	};

8GiB DDR-RAM:

memory@40000000 {
		device_type = "memory";
		reg = <0x0 0x40000000 0x2 0x0>;
		bootph-pre-ram;
	};

Now the 8GiB should be supported by U-Boot and also returned from U-Boot’s EFI environment memory map query.

Build OpenSBI (first stage):

$ git clone https://github.com/riscv-software-src/opensbi.git
$ cd opensbi
$ git checkout v1.8.1
$ make distclean
$ export CROSS_COMPILE=riscv64-unknown-linux-gnu- 
$ make PLATFORM=generic

After successful built, the following files should be created:

opensbi/build/platform/generic/firmware/fw_dynamic.bin

Build U-Boot:

$ git clone https://github.com/u-boot/u-boot.git
$ cd u-boot
$ git checkout v2026.04
$ make mrproper
$ export CROSS_COMPILE=riscv64-unknown-linux-gnu-
$ export OPENSBI=/path/to/openspi/fw_dynamic.bin
$ make starfive_visionfive2_defconfig
$ make

After successful built, the following files should be created:

u-boot/u-boot.bin

u-boot/dts/upstream/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb

Build OpenSBI (second stage):

$ cd opensbi
$ make distclean
$ make PLATFORM=generic FW_PAYLOAD_PATH=/path/to/u-boot/u-boot.bin FW_FDT_PATH=/path/to/u-boot/jh7110-starfive-visionfive-2-v1.3b.dtb FW_TEXT_START=0x40000000

Create FIT image (with U-Boot’s mkimage):

  • Create the file visionfive2-uboot-fit-image.its with the following content:
/dts-v1/;

/ {
	description = "U-boot-spl FIT image for JH7110 VisionFive2";
	#address-cells = <2>;

	images {
		firmware {
			description = "u-boot";
			data = /incbin/("fw_payload.bin");
			type = "firmware";
			arch = "riscv";
			os = "u-boot";
			load = <0x0 0x40000000>;
			entry = <0x0 0x40000000>;
			compression = "none";
		};
	};

	configurations {
		default = "config-1";

		config-1 {
			description = "U-boot-spl FIT config for JH7110 VisionFive2";
			firmware = "firmware";
		};
	};
};
  • Copy the OpenSBI/U-Boot binary fw_payload.bin into the same directory as the file visionfive2-uboot-fit-image.its
  • Create the FIT image (firmware.itb):
$ cd u-boot
$ ./tools/mkimage -f /path/to/visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware firmware.itb

The following files should be created which containing the final firmware images:

u-boot/spl/u-boot-spl.bin.normal.out

u-boot/firmware.itb

Prepare/Format SD card:

$ sudo sgdisk --clear --set-alignment=2 --new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 --new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 --new=3:16384:1654784 --change-name=3:system --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 /dev/sdx

Create FAT32 file system:

$ sudo mkfs.vfat -F 32 /dev/sdx3

Copy new built firmware onto SD card:

$ sudo dd if=u-boot-spl.bin.normal.out of=/dev/sdx1
$ sudo dd if=firmware.itb of=/dev/sdx2

To update the SPI flash is currently not described here. See U-Boot documentation for update the new firmware onto the SPI flash, or ask it here.

All this is done automatically when building opensbi and u-boot.

https://gitlab.com/sndwvs/images_build_kit/-/blob/arm/compilation.sh?ref_type=heads#L37

https://gitlab.com/sndwvs/images_build_kit/-/blob/arm/compilation.sh?ref_type=heads#L102

firmware for the SPI from the board itself

cat /proc/mtd
flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
flashcp -v visionfive2_fw_payload.img  /dev/mtd2
irradium: u-boot-spl.bin.normal.out -> u-boot.bin and visionfive2_fw_payload.img -> u-boot.itb

firmware via UART

installed package: lrzsz
updating the SPI bootloader:
# lsz -X jh7110-recovery-<version>.bin < /dev/ttyUSB0 > /dev/ttyUSB0

  0: update 2ndboot/SPL in flash
  1: update 2ndboot/SPL in emmc
  2: update fw_verif/uboot in flash
  3: update fw_verif/uboot in emmc
  4: update otp, caution!!!!
  5: exit

select: 0
# lsz -X u-boot.bin < /dev/ttyUSB0 > /dev/ttyUSB0
select : 2
# lsz -X u-boot.itb < /dev/ttyUSB0 > /dev/ttyUSB0
select exit: 5
2 Likes

Yes, thanks.

But if using only OpenSBI/U-Boot for booting bare-metal targets (none-Linux or *BSD) it can be done also with U-Boot’s CLI with the sf command (both locally if a SD card contain the images or also can transferred via TFTP to U-Boot.

Here a small example if a SD card contains the images:

Starfive# sf probe
Starfive# fatload mmc 1:3 $loadaddr u-boot-spl.bin.normal.out $filesize
Starfive# sf update $loadaddr 0x0 $filesize
Starfive# fatload mmc 1:3 $loadaddr firmware.itb $filesize
Starfive# sf update $loadaddr 0x100000 $filesize

Oops…

Cannot edit my post anymore. Incorrect and might be fatal commands.

Should be:

Starfive# sf probe
Starfive# fatload mmc 1:3 $loadaddr u-boot-spl.bin.normal.out
Starfive# sf update $loadaddr 0x0 $filesize
Starfive# fatload mmc 1:3 $loadaddr firmware.itb
Starfive# sf update $loadaddr 0x100000 $filesize
1 Like