OpenBSD on the Raspberry Pi


As at the time of writing, the OpenBSD website lists support for the Raspberry Pi as:

Broadcom BCM2837/BCM2711
        Raspberry Pi 3
        Raspberry Pi 4

https://www.openbsd.org/arm64.html

What’s key here are the acronyms ‘BCM2837’ and ‘BCM2711’. The latter is the Rapsberry Pi 4B’s SoC. The former is the SoC found in the Raspberry Pi 3B+, 3B and 2B (v1.2).

The following table shows the key hardware configurations of the Model B Raspberry Pis.

1B1B+2B (v1.1)2B (v1.2)3B3B+4B
SoCBCM2835BCM2835BCM2836 BCM2837BCM2837B0BCM2837B0BCM2711B0
CPUARM1176JZFS
32bit
(ARMv6)
1 core
0.7GHz
ARM1176JZFS
32bit
(ARMv6)
1 core
0.7GHz
CortexA7
32bit
(ARMv7)
4 cores
0.9GHz
CortexA53
64bit (ARMv8)
4 cores
1.2GHz
CortexA53
64bit (ARMv8)
4 cores
1.2GHz
CortexA53
64bit
(ARMv8)
4 cores
1.4GHz
CortexA72
64bit
(ARMv8)
4 cores
1.5GHz
USB
Controller
LAN9512LAN9514LAN9514LAN9514LAN9514LAN7515VL805 (USB3.0)
Ethernet
Controller
LAN9512LAN9514LAN9514LAN9514LAN9514LAN7515BCM54213PE
WiFi ChipsetN/AN/AN/AN/ACYW43438CYW43455CYW43455
PoENoNoNoNoNoYes
(with HAT)
Yes
(with HAT)
OpenBSD SupportNoNoNoNoFullNo Ethernet
No WiFi
No boot from microSD card

3B

Installation-wise, the 3B is the simplest option and the closest thing you get to the usual OpenBSD install process. You just write the minirootXY.fs file to a microSD card, put it in the 3B’s microSD, power it up and go through the installation process. It’s relatively painless. The LAN9514 USB+Ethernet chip from Standard Microsystems Corporation (SMSC) is supported by the smsc driver, out-fo-the-box. The Cypress CYW43438 wireless chip is supported by the bwfm driver. The driver needs a firmware file which is loaded when the driver attaches. This happens automatically the first time OpenBSD is booted after install. Alternatively, it can be installed manually using fw_update. You’ll see both bwfm0 and smsc0 when you run ifconfig.

The 3B was released in Febuary 2016 with the BCM2837 SoC. This is the same SoC used in the earlier model (2Bv1.2). In January 2019, the Raspberry Pi Foundation upgraded the 3B to use the BCM2837B0 SoC. This is the same SoC used the later model (3B+). You can tell which 3B you’ve got by physically looking at the board. The BCM2837 does not have a heat spreader. It is a dull black chip with ‘BCM2837’ written on it. Duh! The BCM2837B0 is covered with a silver-looking heat spreader with ‘BCM2837B0’ written on it. Double-duh! The raspberrypi.org webpage for the 3B shows both – the still photo at the top is the (block) BCM2837, while the embedded video shows the (silver) BCM2837B0. This SoC upgrade has been the only modification to the 3B’s hardware.

3B+

The 3B+ has the same SoC as the 3B. However, the 3B+ use a different (integrated) USB and Ethernet controller – Microchip Technology Inc’s LAN7515. Microchip Technology acquired SMSC in 2012 and developed the LAN7515 specifically for the Raspberry Pi Foundation and there is no publicly available documentation (viz. datasheet) for it:

This part was a specialized part for Raspberry Pi, so the information is not publicly available.

https://microchipsupport.force.com/s/article/Where-can-I-find–datasheets–example-boards–example-board-schematics-for-LAN7515

With no documentation, writing an OpenBSD device driver is a labour of love for someone with the requisite skills. The 3B+ has not (yet?) received that love. Given the similarity of SoC, however, you can still use OpenBSD but you’ll have to use separate hardware for network connectivity, ie. a USB adapter, which kind of defeats the purpose. You may as well go for a 3B or a 4B.

4B

Installing OpenBSD on the 4B is a little bit fiddly:

You will need a microSD card (only a small one is needed), a USB
storage device, a TTL serial interface adapter (e.g. CP2102 USB-UART
converter), and a cable to attach this to the TXD/RXD/GND pins on the
https://pinout.xyz/ header on the board.

Follow the installation instructions at https://github.com/pftf/RPi4
to install UEFI firmware to a FAT-formatted microSD card.

…from the INSTALL.arm64 file

You install to your USB storage device so, after installation, you’re running OpenBSD on an RPi 4B with a microSD card occupying the slot and a USB storage device occupying one of the four USB ports. Depending on the physical size of the USB storage device you may be happy with this arrangement or you may not. If not, you may want to experiment with pixie booting. I’ve done it with the 4B using GNU-Linux but, I confess, I haven’t tried it with OpenBSD.

The advantage of the 4B over the other models – apart from its superior CPU – is that the 4B has true Gigabit Ethernet as well as USB3.0. They’re connected to the CPU over a PCIe bus so there’s no throughput bottlenecks that you may otherwise experience on the 3B – depending on what tasks you’re actually performing at the time, that is, ie. your Ethernet and USB workloads may never occur at the same time as to cause a bottleneck in throughput on the 3B’s shared USB hub. You simply won’t have such a problem with the 4B.

2B (v1.2)

You may notice that, on paper, the 2B v1.2 has a similar SoC to the 3B (BCM2837 vs BCM2837B0). In fact, the Raspberry Pi website says the following about the latter:

The underlying architecture of the BCM2837B0 is identical to the BCM2837A0 chip used in other versions of the Pi. The ARM core hardware is the same, only the frequency is rated higher.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2837b0/README.md

The 2B v1.2 also has the same LAN9514 USB/Ethernet controller as the 3B. However, I couldn’t get mine to boot the microsSD card containing the burned minirootXY.fs image. This was somewhat disappointing given the similar hardware to the 3B. C’est la vie.

2B (v1.1) and Below

There’s no OpenBSD support for any of the earlier SoCs used in the Raspberry Pi. If you look at OpenBSD ARMv7 port, it’s Allwinner or Freescale. There is no Broadcom support.

Categories:OpenBSD

2 comments

  1. Thanks all the tutos ..LAN7515 is supported by OpenBSD. The mue driver supports Microchip LAN7500/LAN7505/LAN7515/LAN7850 USB 2.0 Gigabit Ethernet devices and LAN7800/LAN7801 USB 3.0 Gigabit Ethernet devices, including the following:

    Microchip EVB-LAN7800LC
    Z-TEK ZE582

Leave a Reply to Zevi Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: