OpenBSD 7.9 - Pi5 and Dual 2.5G Router HAT

Hi

I have a Raspberry PI5 with the Dual 2.5G Router hat. To the config.ini I added these 2 lines

dtparam=pciex1
dtparam=pciex1_gen=2

When I use Raspberry PI OS (latest version) the Hat works, I see the 2 network interfaces and the SSD works. If I boot with OpenBSD 7.9 i have these 2 issues

  1. I only see cad0 and rge0 network interfaces. rge1 is missing

  2. When Crucial P310 SSD is added (1GB) (still booting from the sdcard), then the System crashes at startup (see below)

Any ideas how to solve these issues? Let me know if you need more information

Thanks


Cannot persist EFI variables without system partition
** Booting bootflow '<NULL>' with efi_mgr
Booting: Label: mmc 0 Device path: \
/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000001000000)/SD(0)/SD(0)
                
disks: sd0*
> > OpenBSD/arm64 BOOTAA64 1.24
boot>  
cannot open sd0a:/etc/random.seed: No such file or directory
booting sd0a:/bsd: 3201768+1344104+12714976+652288 \
[294291+91+757440+311692]=0x140c928 Copyright (c) 1982, 1986, 1989, 1991, 1993
               The Regents of the University of California.   All rights reserved.
Copyright (c) 1995-2026 OpenBSD. All rights reserved.   https://www.OpenBSD.org

OpenBSD 7.9 (RAMDISK) #211: Wed May   6 18:34:33 MDT 2026
       [email protected]:/usr/src/sys/arch/arm64/compile/RAMDISK
real mem   = 4284379136 (4085MB)
avail mem = 4066193408 (3877MB)
random: good seed from bootblocks
mainbus0 at root: Raspberry Pi 5 Model B Rev 1.1
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2, SYSTEM_SUSPEND
efi0 at mainbus0: UEFI 2.11
efi0: Das U-Boot rev 0x20250700
smbios0 at efi0: SMBIOS 3.7.0
smbios0: vendor U-Boot version "2025.07" date 07/01/2025
smbios0: raspberrypi Raspberry Pi 5 Model B Rev 1.1
cpu0 at mainbus0 mpidr 0: ARM Cortex-A76 r4p1
cpu0: 64KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: 2048KB 64b/line 16-way L3 cache
cpu0: DP,RDM,Atomic,CRC32,SHA2,SHA1,AES+PMULL,LRCPC,DPB,ASID16,PAN+ATS1E1,LO,HPDS,VH,HAFDBS,CSV3,CSV2,RAS,AdvSIMD+HP,FP+HP,SSBS
 "atf" at mainbus0 not configured
"linux,cma" at mainbus0 not configured
"nvram" at mainbus0 not configured
simplefb0 at mainbus0: 1920x1080, 16bpp
wsdisplay0 at simplefb0 mux 1
wsdisplay0: screen 0 added (std, vt100 emulation)
"system" at mainbus0 not configured
simplebus0 at mainbus0: "clocks"
"clk-osc" at simplebus0 not configured
"clk-vpu" at simplebus0 not configured
"clk-uart" at simplebus0 not configured
"clk-emmc2" at simplebus0 not configured
"clk-usb" at simplebus0 not configured
"clk_xosc" at simplebus0 not configured
"sdio_src" at simplebus0 not configured
"sdhci_core" at simplebus0 not configured
simplebus1 at mainbus0: "soc"
bcmstbrescal0 at simplebus1
bcmstbreset0 at simplebus1
bcmmbox0 at simplebus1
bcmstbgpio0 at simplebus1
ampintc0 at simplebus1 nirq 320, ncpu 4: "interrupt-controller"
bcmstbpinctrl0 at simplebus1
bcmstbgpio1 at simplebus1
bcmstbpinctrl1 at simplebus1
syscon0 at simplebus1: "avs-monitor"
"thermal" at syscon0 not configured
sdhc0 at simplebus1
sdhc0: SDHC 3.00, 200 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, ddr52, dma
"timer" at simplebus1 not configured
"interrupt-controller" at simplebus1 not configured
pluart0 at simplebus1: rev 3, 32 byte fifo
pluart0: console
"clock" at simplebus1 not configured
"intc" at simplebus1 not configured
"intc" at simplebus1 not configured
"spi" at simplebus1 not configured
"watchdog" at simplebus1 not configured
bcmirng0 at simplebus1
"intc" at simplebus1 not configured
"serial" at simplebus1 not configured
"firmware" at simplebus1 not configured
"power" at simplebus1 not configured
"fb" at simplebus1 not configured
rpirtc0 at simplebus1
simplebus2 at simplebus1: "nvmem"
"nvmem_otp" at simplebus2 not configured
"nvmem_cust" at simplebus2 not configured
"nvmem_mac" at simplebus2 not configured
"nvmem_priv" at simplebus2 not configured
"fixedregulator_3v3" at simplebus1 not configured
"fixedregulator_5v0" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
simplebus3 at mainbus0: "axi"
bcmmip0 at simplebus3
bcmmip1 at simplebus3
syscon1 at simplebus3: "syscon"
bcmpcie0 at simplebus3
pci0 at bcmpcie0
ppb0 at pci0 dev 0 function 0 "Broadcom BCM2712" rev 0x30
pci1 at ppb0 bus 1
ppb1 at pci1 dev 0 function 0 vendor "ASMedia", unknown product 0x2806 rev 0x01
pci2 at ppb1 bus 2
ppb2 at pci2 dev 0 function 0 vendor "ASMedia", unknown product 0x2806 rev 0x01: msi
pci3 at ppb2 bus 3
ppb3 at pci2 dev 2 function 0 vendor "ASMedia", unknown product 0x2806 rev 0x01: msi
pci4 at ppb3 bus 7
ppb4 at pci2 dev 6 function 0 vendor "ASMedia", unknown product 0x2806 rev 0x01: msi
pci5 at ppb4 bus 9
rge0 at pci5 dev 0 function 0 "Realtek RTL8125" rev 0x05: msix: RTL8125B, address \
00:48:54:20:39:66 ppb5 at pci2 dev 14 function 0 vendor "ASMedia", unknown product \
0x2806 rev 0x01: not configured by system firmware bcmpcie1 at simplebus3
pci6 at bcmpcie1
ppb6 at pci6 dev 0 function 0 "Broadcom BCM2712" rev 0x30
pci7 at ppb6 bus 1
rpone0 at pci7 dev 0 function 0 "Raspberry Pi RP1" rev 0x00
simplebus4 at rpone0: "rp1"
rpiclock0 at simplebus4
rpigpio0 at simplebus4
"mailbox" at simplebus4 not configured
rpipwm0 at simplebus4
"adc" at simplebus4 not configured
cad0 at simplebus4: rev 0x70109, address 88:a2:9e:c0:18:27
brgphy0 at cad0 phy 1: BCM54210E, rev. 2
"pio" at simplebus4 not configured
"dma" at simplebus4 not configured
xhci0 at simplebus4, xHCI 1.10
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr \
1 xhci1 at simplebus4, xHCI 1.10
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr \
1 "sram" at simplebus4 not configured
"gpiomem" at simplebus4 not configured
"iommu" at simplebus3 not configured
"iommu" at simplebus3 not configured
"iommu" at simplebus3 not configured
"iommuc" at simplebus3 not configured
"dma" at simplebus3 not configured
"dma" at simplebus3 not configured
"codec" at simplebus3 not configured
"pisp_be" at simplebus3 not configured
sdhc1 at simplebus3
sdhc1: SDHC 3.00, 200 MHz base clock
sdmmc1 at sdhc1: 4-bit, sd high-speed, mmc high-speed, ddr52, dma
agtimer0 at mainbus0: 54000 kHz
"clk-27M" at mainbus0 not configured
"clk-108M" at mainbus0 not configured
"arm-pmu" at mainbus0 not configured
"phy" at mainbus0 not configured
"leds" at mainbus0 not configured
"sd-io-1v8-reg" at mainbus0 not configured
"sd-vcc-reg" at mainbus0 not configured
"wl-on-reg" at mainbus0 not configured
"cam0_reg" at mainbus0 not configured
"cam1_reg" at mainbus0 not configured
"cam_dummy_reg" at mainbus0 not configured
"dummy" at mainbus0 not configured
"i2c0if" at mainbus0 not configured
"i2c0mux" at mainbus0 not configured
"rp1_firmware" at mainbus0 not configured
"rp1_vdd_3v3" at mainbus0 not configured
pwmfan0 at mainbus0
"pwr_button" at mainbus0 not configured
sdmmc1: can't supply bus power
sdmmc1: can't enable card
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Sandisk, SL32G, 0030> removable
sd0: 29664MB, 512 bytes/sector, 60751872 sectors
uhidev0 at uhub0 port 2 configuration 1 interface 0 "Logitech Gaming Mouse G402" rev \
                2.00/90.03 addr 2
uhidev0: iclass 3/1
uhid at uhidev0 not configured
uhidev1 at uhub0 port 2 configuration 1 interface 1 "Logitech Gaming Mouse G402" rev \
                2.00/90.03 addr 2
uhidev1: iclass 3/0, 17 report ids
ukbd0 at uhidev1 reportid 1
wskbd0 at ukbd0 mux 1
wskbd0: connecting to wsdisplay0
uhid at uhidev1 reportid 3 not configured
uhid at uhidev1 reportid 4 not configured
uhid at uhidev1 reportid 16 not configured
uhid at uhidev1 reportid 17 not configured
uhidev2 at uhub1 port 2 configuration 1 interface 0 "Logitech G515 TKL" rev \
                2.00/67.00 addr 2
uhidev2: iclass 3/1
ukbd1 at uhidev2
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev3 at uhub1 port 2 configuration 1 interface 1 "Logitech G515 TKL" rev \
                2.00/67.00 addr 2
uhidev3: iclass 3/1, 4 report ids
uhid at uhidev3 reportid 2 not configured
uhid at uhidev3 reportid 3 not configured
uhid at uhidev3 reportid 4 not configured
uhidev4 at uhub1 port 2 configuration 1 interface 2 "Logitech G515 TKL" rev \
                2.00/67.00 addr 2
uhidev4: iclass 3/0, 17 report ids
uhid at uhidev4 reportid 16 not configured
uhid at uhidev4 reportid 17 not configured
softraid0 at root
scsibus1 at softraid0: 256 targets
root on rd0a swap on rd0b dump on rd0b
WARNING: bad clock chip time
WARNING: CHECK AND RESET THE DATE!
SError: 28db20 esr be000011 far ffffff805e85e000
panic: do_el0_error
syncing disks... done

AFAIK OpenBSD (and many other standard OSses) uses EFI to get running and also ACPI mode (not DeviceTree). Looking at Radxa Dual 2.5G Router HAT it means that the drivers and handling for at least the ASM2806 need to be done by the RPi5 firmware (in EEPROM, closed source) and/or U-Boot which sits on top of that closed source and proprietary firmware. Also U-Boot philosophy is to just provide what is needed to get the OS booted. And not doing complete ACPI layers AFAIK, only does DeviceTree based. So It won’t work, unless you change U-Boot yourself and reverse engineer RPi EEPROM/firmware code and/or change OpenBSD kernel so that it does DeviceTree and also supports that PCIE switch chip. Even if you ask on a better place (RPL forum) you won’t get an answer. You need to develop all yourself if you want OpenBSD with multiple RJ45 port. There are other methods to use OpenBSD, but I don’t know what your objective is with OpenBSD on RPI5.

Thanks for the detailed explanation. The suggested code adjustments are far beyond my expertise :wink: - I want only to run it as router with pf - so I mainly need 2 nic’s (which i have now, as the onboard and 1 on the HAT are detected), the only additional thing I would be happy is if the SSD would work (instead of sdcard). Or do you have any other recommendation for that setup?

What I do on all Linux 64-bit computers is install virt-manager and that installs various dependencies needed to use virtualization (KVM/libvirt/QEMU). So then you define a virtual machine (is standard UEFI compliant when ARM64) with 2 ethernet interfaces and storage for the OS (OpenBSD in your case, but can be OpenWRT or else). I think use e1000 and SATA, for most Linux distro kernels there is a complete set of virtual interface drivers for networking, storage and graphics (virt) but OpenBSD might not understand that so you need real HW based virtualization drivers. Storage is simply a file, for LAN and WAN, you can create bridges for the RJ45 ports in the Raspberry Pi OS and then in the VM hook up the e1000’s to respective bridges. I use that for years already, even works on lower end SBC’s like ROCK3A. You need about minimum 512MB RAM for the host itself (assuming headless) so for a 8GB Pi5, you have about 7.5GB RAM left for virtual machines.

Thanks, that could work, but as I wanted a hardened router using openbsd having the additional virtualizion inbetween is against the goal I want to achieve. So for now I will run it from the SDCard and hope that more support is added in upcoming versions - but thanks again for your time and suggestions