Hi,
I tried to boot VisionFive 2 RISC-V SBC board [1] with a current
OpenBSD snapshot and I got it to boot from a SD card after replacing
the Linux root partition on the image provided by the vendor
with an OpenBSD partition.
I guess it's still early days and that could be why I couldn't find
previous messages or info on the web with dmesg output since is
not super-interesting yet.
Anyway, you can boot bsd.rd but the installer will not be able to
advance after the step where the install disk is selected since
no storage devices are found (no USB devices are detected yet
and I don't have a M2 SSD disk handy to test (to-do)).
See below dmesg output (I'll try to repeat this later with OpenBSD
preinstalled on the SD card to see if I can get further in the boot
process with this board):
8<====================================================================
disks: sd0*
>> OpenBSD/riscv64 BOOTRISCV64 1.5
boot>
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 5513256+1352760+212848+701688 [362973+122+503952+360008]=0xa0b160
clk u5_dw_i2c_clk_core already disabled
clk u5_dw_i2c_clk_apb already disabled
bootargs:
all mapped
type 0x0 pa 0x40000000 va 0x40000000 pages 0x80 attr 0x8
type 0x7 pa 0x40080000 va 0x40080000 pages 0x180 attr 0x8
type 0x2 pa 0x40200000 va 0x40200000 pages 0x4000 attr 0x8
type 0x7 pa 0x44200000 va 0x44200000 pages 0x3cf2 attr 0x8
type 0x9 pa 0x47ef2000 va 0x47ef2000 pages 0x1c attr 0x8
type 0x7 pa 0x47f0e000 va 0x47f0e000 pages 0xb66d1 attr 0x8
type 0x2 pa 0xfe5df000 va 0xfe5df000 pages 0xb attr 0x8
type 0x4 pa 0xfe5ea000 va 0xfe5ea000 pages 0x1 attr 0x8
type 0x7 pa 0xfe5eb000 va 0xfe5eb000 pages 0x1 attr 0x8
type 0x2 pa 0xfe5ec000 va attr 0x8
type 0x1 pa 0xfe6ec000 va 0xfe6ec000 pages 0x26 attr 0x8
type 0x4 pa 0xfe712000 va 0xfe712000 pages 0x8 attr 0x8
type 0x6 pa 0xfe71a000 va 0xfe71a000 pages 0x1 attr 0x8000000000000008
type 0x4 pa 0xfe71b000 va 0xfe71b000 pages 0x3 attr1e000 va 0xfe71e000 pages 0x3 attr 0x8000000000000008
type 0x4 pa 0xfe721000 va 0xfe721000 pages 0x1 attr 0x8
type 0x6 pa 0xfe722000 va 0xfe722000 pages 0x4 attr 0x8000000000000008
type 0x4 pa 0xfe726000 va 0xfe726000 pages 0xe attr 0x8
type 0x2 pa 0xfe734000 va 0xfe734000 pages 0x1811 attr 0x8
type 0x5 pa 0xfff45000 va 0xfff45000 pages 0x1 attr 0x8000000000000008
type 0x2 pa 0xfff46000 va 0xfff46000 pages 0xba attr 0x8
type 0x4 pa 0x100000000 va 0x100000000 pages 0x140000 attr 0x8
[ using 1228024 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2023 OpenBSD. All rights reserved. https://www.OpenBSD.org
OpenBSD 7.3-current (GENERIC) #337: Mon Jun 5 01:57:41 MDT 2023
deraadt@riscv64.openbsd.org:/usr/src/sys/arch/riscv64/compile/GENERIC
real mem = 4294967296 (4096MB)
avail mem = 8183058432 (7803MB)
SBI: OpenSBI v1.2, SBI Specification Version 1.0
random: boothowto does not indicate good seed
mainbus0 at root: StarFive VisionFive V2
cpu0 at mainbus0: SiFive U7 imp 4210427 rv64imafdcbsux
intc0 at cpu0
cpu0: 32KB 64b/line 64-way L1 I-cache, 32KB 64b/line 64-way L1 D-cache
cpu0: 2048KB 64b/line 2048-way L2 cache
"osc" at mainbus0 not configured
"gmac1_rmii_refin" at mainbus0 not configured
"gmac1_rgmii_rxin" at mainbus0 not configured
"i2stx_bclk_ext" at mainbus0 not configured
"i2stx_lrck_ext" at mainbus0 not configured
"i2srx_bclk_ext" at mainbus0 not configured
"i2srx_lrck_ext" at mainbus0 not configured
"tdm_ext" at mainbus0 not configured
"mclk_ext" at mainbus0 not configured
"jtag_tck_inner" at mainbus0 not configured
"bist_apb" at mainbus0 not configured
"stg_apb" at mainbus0 not configured
"gmac0_rmii_refin" at mainbus0 not configured
"gmac0_rgmii_rxin" at mainbus0 not configured
"clk_rtc" at mainbus0 not configured
"hdmitx0_pixelclk" at mainbus0 not configured
"mipitx_dphy_rxesc" at mainbus0 not configured
"mipitx_dphy_txbytehs" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
syscon0 at simplebus0: "aon_syscon"
syscon1 at simplebus0: "stg_syscon"
syscon2 at simplebus0: "sys_syscon"
plic0 at simplebus0
syscon3 at simplebus0: "dssctrl"
"pmu" at simplebus0 not configured
"cache-controller" at simplebus0 not configured
"clint" at simplebus0 not configured
"clock-controller" at simplebus0 not configured
"spi" at simplebus0 not configured
"otp" at simplebus0 not configured
"usbdrd" at simplebus0 not configured
"rtc" at simplebus0 not configured
"pmu" at simplebus0 not configured
com0 at simplebus0: dw16550
com0: console
"gpio" at simplebus0 not configured
"i2c5" at simplebus0 not configured
dwmmc0 at simplebus0: can't establish interrupt
dwmmc1 at simplebus0: can't establish interrupt
"reset-controller" at simplebus0 not configured
"ethernet" at simplebus0 not configured
"ethernet" at simplebus0 not configured
"snd-card" at simplebus0 not configured
"dmc" at simplebus0 not configured
gpiorestart0 at mainbus0
"firmware" at mainbus0 not configured
"config" at mainbus0 not configured
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
root device: qq q
use one of: exit
root device: exit
syncing disks... done
8<====================================================================
I'm also including the output I got from the firmware and u-boot
since I guess it could be interesting to other folks with interest
on this hardware. Also, maybe other folks could be running it with
more recent firmware and better results?
====================================================================
U-Boot SPL 2021.10 (Feb 12 2023 - 18:15:33 +0800)
DDR version: dc2e84f0.
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 : jh7110-hsm
Platform PMU Device : ---
Platform Reboot Device : pm-reset
Platform Shutdown Device : pm-reset
Firmware Base : 0x40000000
Firmware Size : 292 KB
Runtime SBI Version : 1.0
Domain0 Name : root
Domain0 Boot HART : 1
Domain0 HARTs : 0*,1*,2*,3*,4*
Domain0 Region00 : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01 : 0x0000000040000000-0x000000004007ffff ()
Domain0 Region02 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000040200000
Domain0 Next Arg1 : 0x0000000042200000
Domain0 Next Mode : S-mode
Domain0 SysReset : 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 (Feb 12 2023 - 18:15:33 +0800), Build: jenkins-VF2_515_Branch_SDK_Release-24
CPU: rv64imacu
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-XXXX-XXXXXXXX-XXXXXXXX
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: xx:xx:xx:xx:xx:xx
Ethernet MAC1 address: xx:xx:xx:xx:xx:xx
--------EEPROM INFO--------
In: serial@10000000
Out: serial@10000000
Err: serial@10000000
Model: StarFive VisionFive V2
Net: eth0: ethernet@16030000, eth1: ethernet@16040000
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
** Invalid partition 3 **
Couldn't find partition mmc 1:3
Can't set block device
** Invalid partition 3 **
Couldn't find partition mmc 1:3
Can't set block device
Hit any key to stop autoboot: 2 1 0
** Invalid partition 3 **
Couldn't find partition mmc 1:3
Can't set block device
Importing environment from mmc1 ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
Can't set block device
## Warning: defaulting to text format
## Error: "boot2" not defined
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
7[r[999;999H[6n8Card did not respond to voltage select! : -110
** Unable to read file ubootefi.var **
Failed to load EFI variables
Scanning mmc 1:f...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Found EFI removable media binary efi/boot/bootriscv64.efi
152332 bytes read in 13 ms (11.2 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
disks: sd0*
>> OpenBSD/riscv64 BOOTRISCV64 1.5
boot>
[...]
====================================================================
1. https://www.starfivetech.com/en/site/boards
Cheers,
Miguel.
--
Miguel Landaeta, miguel at miguel.cc
secure email with PGP 0x6E608B637D8967E9 available at http://keyserver.pgp.com/
"Faith means not wanting to know what is true." -- Nietzsche
No comments:
Post a Comment