User Tools

Site Tools


Translations of this page:


OpenBSD on OrangePi PC2

The OrangePi PC2 (OPiPC2) is an inexpensive yet powerful arm64/aarch64 hardware platform supported by OpenBSD. This dmesg output illustrates its support on OpenBSD -current.


This installation assumes the use of:

  • an OpenBSD box to build the prerequisite ports
  • an Orange Pi PC2
  • a USB-TTL serial cable like this
  • an appropriate 5V 3000mA power adapter
  • a quality microSD card
  • wired network access
  • a microSD card adapter

Access to an HDMI-compatible LCD and a USB keyboard are useful additions.

Important Note

It is unlikely that your OrangePi PC2 is DOA/dead on arrival.

For any signs of an operational board, the OrangePi PC2 requires a working image with the appropriate boot files, including aarch64 u-boot. Without a correctly configured microSD card, the OPiPC2 will appear inoperable.


As arm64 support is relatively new and in regular development, the -current branch of arm64 will be used for installation. OpenBSD provides sufficient installation instructions, on which this guide is based on.

The first step is to install sysutils/dtb and sysutils/u-boot-aarch64.

   $ pkg_add dtb
   $ pkg_add u-boot-aarch64


From an OpenBSD mirorr, only an appropriate miniroot*.fs file is required.

To install OpenBSD -stable, get this miniroot*.fs.

To install OpenBSD -current, get this miniroot*.fs.

Write the miniroot.fs file to the microSD card inserted but not mounted. The X should be replaced with the device number for the microSD card.

   $ dd if=miniroot62.fs of=/dev/sdXc bs=1m


In addition to the OpenBSD partition (or slice), an MSDOS-formatted partition is necessary for the u-boot and dtb files, which are provided by the sysutils/dtb and sysutils/u-boot-aarch64 ports.

   $ mount /dev/sdXi /mnt
   $ mkdir -p /mnt/vendor
   $ cp /usr/local/share/dtb/arm64/allwinner/sun50i-h5-orangepi-pc2.dtb /mnt/allwinner

Unmount the /dev/sdXi at /mnt.

   $ umount /mnt

The final step for preparing the install media is to write the u-boot file to the microSD card.

   $ dd if=/usr/local/share/u-boot/orangepi_pc2/u-boot-sunxi-with-spl.bin of=/dev/sdXc bs=1024 seek=8

If an orangepi_pc2 directory is not present, check that the aarch64 version of the sysutils/u-boot port is installed.

Booting the OrangePi PC2 for the First Time

To boot the OPiPC2 and install OpenBSD:

  • insert the ethernet cable on a DHCP-enabled network
  • insert the microSD card

The console cable is connected on three pins residing on the top of the OPiPC2 board between the power input and the HDMI port. From left to right, the pins are labeled GND RX TX. Three connectors are used from the USB-TTL cable as follows:

  • black is for GND or the ground
  • green is for RX, or receive
  • white is for TX, or transmit

The red connector is for power, and should not be connected.

On a USB port from a second computer, connect the USB-TTL cable, and with a console application such as cu(1) connect to the OPiPC2 board with the speed set at 115200.

On OpenBSD, use the following command:

   $ cu -l /dev/cuaU0 -s 115200

An HDMI connection can be used, but most of the boot messages will not be displayed.

Insert the power adapter into the OPiPC2. The full boot sequence should scroll on the console screen, arriving at:


After a few seconds, the bsd.rd RAM disk will boot, providing the standard OpenBSD bsd.rd menu.

en/openbsd_on_orangepi_pc2.txt · Last modified: 2018/02/02 20:35 by gman999