======================================================================== Installing OpenBSD on a Raspberry PI 3 ======================================================================== I always wanted to try out OpenBSD on bare metal. Fortunately I had an unused Raspberry PI 3. This site is hosted on that setup. Well, it's more bare plastic. :-) Great help have been [3] and [4] (see "Sources" below), I suggest that you read that, too. The following is just my notes... Disclaimer: Some things do not work, e.g. HDMI port and wifi. [UPDATE 2022-02-11] wifi works since OpenBSD 6.7 [5], but I am not using it right now. [/UPDATE] Pin Mapping [1] ----------------- Before we start: Here's the GPIO Pin Mapping of the Raspberry PI 2 + 3: +----------------------+ | 1 2 | |pwr 3 4 | | 5 6 | | 7 8 | | 9 10 | | 11 12 | | ... | | 39 40 | | | | | | | | eth usb usb | +----------------------+ 1: 3.3V PWR 2: 5V PWR 3: GPIO 2 / I2C1 SDA 4: 5V PWR 5: GPIO 3 / I2C1 SCL 6: GND 7: GPIO 4 8: UART0 TX 9: GND 10: UART0 RX 11: GPIO 17 12: GPIO 18 13: GPIO 27 14: GND 15: GPIO 22 16: GPIO 23 17: 3.3V PWR 18: GPIO 24 19: GPIO 10 / SPI0 MOSI 20: GND 21: GPIO 9 / SPI0 MISO 22: GPIO 25 23: GPIO 11 / SPI0 SCLK 24: GPIO 8 / SPI0 CS0 25: GND 26: GPIO 7 / SPI0 CS1 27: Reserved 28: Reserved 29: GPIO 5 30: GND 31: GPIO 6 32: GPIO 12 33: GPIO 13 34: GND 35: GPIO 19 / SPI1 MISO 36: GPIO 16 / SPI1 CS0 37: GPIO 26 38: GPIO 20 / SPI1 MOSI 39: GND 40: GPIO 21 / SPI1 SCLK Using a USB-TTL-Serial-Converter ---------------------------------- I am using a converter by "DSD TECH" which is using a CP2102 from "Silicon Labs" as its main chip. My connection is as follows: - Pin 6: red - Pin 8: yellow - Pin 10: orange Be careful as the cable connected to the converter could be flipped or use other colors. Just make sure that you connect RX to TX, TX to RX and GND to GND. :-) Establish serial connection ----------------------------- +------ quot [3] | | the HDMI driver isn't used by the kernel [...] you need to set up | `cu` with a 3V serial cable, at least for initial setup. | +------ end quot Instead of `cu` (BSD) I am using `minicom` (on GNU/Linux) to connect to my Raspberry PI: +------ quot [2] | | $ minicom -b 115200 -D /dev/ttyUSB0 # your device may differ! | | Switch Flow Control Off in minicom | In minicom, press Ctrl + A then press Z. Now press O to configure | minicom. | | In the menu that appears, press the down arrow to move to Serial | port setup and the press then Enter key. | | Press F to switch flow control off and then press the Enter key. | | Scroll down to Exit and press Enter. | | The Raspberry PI can now be powered up. Messages from the Raspberry | PI will be displayed in minicom. | +------ end quot Installation -------------- +------ quot [3] | | - there's no driver for SD/MMC but that's the only thing the | hardware can level-0 boot from, so you need both the uSD card and | a USB disk, at least while getting started; | - there is no support for the built-in WiFi (a Broadcom | BCM43438 SDIO 802.11), so you have to use wired Ethernet or a USB | WiFi dongle [...] | +------ end quot Installation steps are as follows, where `/dev/disk2` is the microSD card: +------ quot [4] | | # dd if=miniroot63.fs of=/dev/disk2 bs=1m | | # mount /dev/disk2/boot /somewhere | | # echo "program_usb_boot_mode=1" >> /somewhere/BOOT/config.txt | +------ end quot Put the microSD card and a USB stick into the Raspberry PI. Start `minicom` as mentioned above. Boot the Raspberry PI by empowering it. Follow installation instructions. After installation you should be able to use the Raspberry PI without the microSD card and with only the USB stick connected. Sources --------- [1] https://docs.microsoft.com/en-us/windows/iot-core/learn-about-hardware/pinmappings/pinmappingsrpi -- 2020-04-27 [2] https://startingelectronics.org/articles/raspberry-PI/serial-port-connecting-linux/ -- 2020-04-27 [3] https://undeadly.org/cgi?action=article&sid=20170409123528 -- 2020-04-27 [4] https://www.tumfatig.net/20180706/running-openbsd-on-raspberry-pi-3/ -- 2020-04-27 [5] https://www.openbsd.org/plus67.html -- 2022-02-11 ------------------------------------------------------------------------ Changelog ----------- 2020-05-10 creation 2022-02-11 edited to add: wifi works