FreeBSD/ARM on the Raspberry Pi family

What is Raspberry Pi?

The original Raspberry Pi launched in early 2012 as an inexpensive ($35) PC based on a Broadcom BCM2835 SoC. It was developed by the UK-based Raspberry Pi foundation as an inexpensive system for educational use. As of April 2013, it has sold over a million units.

There are many versions of the Raspberry Pi:

The Raspberry Pi site has much more detailed information about models.

Raspberry Pi and FreeBSD

FreeBSD has supported the original Raspberry Pi since November, 2012 and Raspberry Pi 2 since March, 2015.

If you have questions, ask on the freebsd-arm mailing list.

How to Boot the Raspberry Pi

As of January 2013, FreeBSD-CURRENT fully supports either a video console (you'll need a USB keyboard and display connected) or it can be configured to use a serial console (you'll need a USB to TTL Serial Cable such as the one sold by Adafruit.com).

After connecting video, keyboard, and inserting the SDHC card, you connect power to actually boot.

Pre-Built Images

Version

Releases

Snapshots

RPI-B

10.1+, 11.0+

10-STABLE, 11-STABLE, 12-CURRENT

RPI2

11.0+

11-STABLE, 12-CURRENT

RPI3

FreeBSD 12-CURRENT

For Raspberry Pi Zero use the image for RPI-B.

The default passwords for the images are freebsd/freebsd and root/root .

How to Build Your Own Images

Raspberry Pi and Raspberry Pi 2 are supported by the Crochet build tool.

Anatomy of a Raspberry Pi Boot Image

A FreeBSD bootable image for Raspberry Pi has both FAT and UFS partitions containing the following files:

DTB Overlays

These are a new feature. Please see this README for more information.

Features

What works

RPi 1

RPi 2

RPi 3 / RPi 3B+ / RPi 2 1.2

RPi Zero

RPi Zero W

Audio

OK

OK

?

Not avail.

Not avail.

camera

Not Tested

OK

?

?

ethernet

OK

OK

OK

Not avail.

Not avail.

GPIO

OK

OK

?

OK

HDMI

OK

OK

OK

OK

i2c

OK

OK

?

?

SD card

OK

OK

OK

OK

SMP

Not avail.

OK

OK

Not avail.

Not avail.

SPI

OK

OK

?

?

USB 2.0

OK

OK

OK

OK (both device and host)

watchdog

OK

OK

?

?

WiFi

Unsupported (SDIO)

Not avail.

Unsupported (SDIO)

GPIO

Perl, Python and Ruby wrappers for interfacing with the GPIO ioctl are available at https://github.com/gonzoua/freebsd-gpio

Camera

Instructions for setting up the Camera are here.

External Displays

Some external displays made for the Raspberry Pi require extra configuration steps to work properly. The manufacturer should have provided these as part of the documentation. The settings are often the same as on Linux-based distributions for the Raspberry Pi. After writing the bootable image to the compact flash card, mount the FAT partition contained on it as msdosfs and open the config.txt file. This can also be done from within the Pi itself, provided the display gives some form of output, otherwise another machine has to be used. The partition is mounted like this after logging in:

/dev/msdosfs/MSDOSBOOT on /boot/msdos (msdos, local, noatime)

A couple of lines are already present in /boot/msdos/config.txt. The lines from the manufacturer have to be added to the end of that file. After saving and exiting the editor, reboot the Raspberry. The updated config.txt file will be loaded and the display should work as expected.

For example, the following lines were added to config.txt to make a 5" touchscreen display from Waveshare work and use the proper resolution:

max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1

FreeBSD/arm/Raspberry Pi (last edited 2018-07-02 02:10:51 by MarkLinimon)