Ivan Kovmir / unInstance

FreeBSD 13.1 on Raspberry Pi 3 Model B+ - unInstance

FreeBSD 13.1 on Raspberry Pi 3 Model B+

This post describes how to get going with FreeBSD on Raspberry Pi 3 Model B+. I try to mention all the little caveats I have encountered to give you—the reader—necessary peace of mind, and smooth experience.

Equipment

Apart from buying the SBO itself, there are mandatory addons to the device.

SD Card

Buying one, you must check its write speed. Most of the times, the package has a big number followed by “MB/s”, but you should not fall for that, as in 99% of the cases this is the card’s read speed. Avoid buying a noname brand SD card, this is the least suitable purpose to get it for. A crappy SD card is the source of most of the troubles with Raspberry Pi. A bad SD card may vastly descrease you performance. I have a 64GB SanDisk with 90MB/s write speed, and 170MB/s read speed, feels good enough. Whatever your intentions are, 32/64GB cards should be more than enough for you. If you need a lot of storage, consider buying a USB memory stick or SATA drives instead, which is much cheaper that big volume SD cards.

Power Supply Unit

I suggest you not to rely on your telephone’s PSU, as it may not give out enough power. If you consider FreeBSD to be your RPi OS, then, most probably, you want RPi to be your server with 24/7 uptime. In that case its worth buying the official RPi PSU. It is a reasonably priced PSU of decent quality that will give you peace of mind, I managed to get mine for approximately $10. A poor PSU is the second most common source of troubles.

Refer to the official documentation for the power consumption details.

Case

Cheap plastic cases are purely optional. However you can get an aluminum case to act as a big radiator for RPi, which is a highly recommended choice. It also gives you +97 points to shock resistance. You do not need fans unless you want to mine crypto currencies or use GPU.

RPi Aluminum Case

FreeBSD

This is the simplest part, although it has its nuances to be aware of.

Installation

Here is a directory with the official FreeBSD SD card images. At the time of writing the latest release is 13.1, so you need FreeBSD-13.1-RELEASE-arm64-aarch64-PINE64.img.xz. Download the image, uncompress it with unxz -kv /path/to/image.img.xz, and write the image with dd if=/path/to/image.img of=/path/to/sdcard bs=1M && sync. On Linux, use lsblk(8) to locate your SD card. Insert the SD card into RPi, plug in the Ethernet cable, supply power, and wait for it to boot.

Performance

FreeBSD may feel slow, sometimes very slow, on RPi. There are two most common sources of problems:

If you fix the two, you should be good enough. However there is one more nuance to decline performance:

LEDs

You might have noticed, some time after the OS boots, the red power and green storage activity LEDs stop blinking completely. This happens because FreeBSD exposes the LEDs as GPIO pins that you can activate manually, more on that here.

HDMI

Your HDMI display might not work, saying there is not signal. In that case you would have to open RPi’s BIOS and edit it. As RPi does not have BIOS, you configure its hardware through a config.txt file at the root of the FAT partition. This partition is available in FreeBSD under /boot/msdos, or take the SD card out and mount it to your computer. Open the file, and add hdmi_safe=1 to the [all] section.

Conclusion

This is a complete list of unexpected things to be aware of at the beginning. FreeBSD has Tier 1 support for aarch64 RPi, which is very good indeed. As a rule of thumb, if you encounter any problems, remember to check the SD card and PSU first.


© 2022 Ivan Kovmir — CC-BY 4.0 License
Built with swege
Hosted by DarknSpace