FreeBSD/ARM on Raspberry Pi

FreeBSD-CURRENT has supported Raspberry Pi since November, 2012 and Raspberry Pi 2 since March, 2015. If you have questions, ask on the freebsd-arm mailing list.

What is Raspberry Pi?

The 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 several versions of the Raspberry Pi:

What works

RPi 1

RPi 2

RPi 3

RPi Zero

RPi Zero W

Audio

OK

OK

?

Not avail.

camera

Not Tested

OK

?

?

ethernet

OK

OK

OK

Not avail.

GPIO

OK

OK

?

OK

HDMI

OK

OK

OK

OK

i2c

OK

OK

?

?

SD card

OK

OK

OK

OK

SMP

Not avail.

OK

?

Not avail.

SPI

OK

OK

?

?

USB 2.0

OK

OK

OK

OK (target mode)

watchdog

OK

OK

?

?

WiFi

Unsupported (SDIO)

Unsupported (SDIO)

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.

Anatomy of a Raspberry Pi Boot Image

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

2013-12-12: Please notice that there is a new version if the RPi out, using a "micron" RAM chip, recognizable by the "M with orbit" logo on the chip. These require the newest firmware files (bootcode.bin, start.elf and possibly config.txt) None of the prebuilt images have these at this time, and trying to boot them gives you a single short flash of the green LED and no more.

2014-10-18: The firmware included in the official images has been updated to support B+ model.

2015-06-26: The default passwords for the images are freebsd/freebsd and root/root

How to Build an Image

Raspberry Pi and Raspberry Pi 2 are supported by the Crochet build tool. Ready to use images are available at ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0. For Raspberry Pi Zero use the image for RPI-B.

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

Binary snapshots

Raspberry Pi snapshots are available for FreeBSD 10.3-PRERELEASE for RPI-B and FreeBSD 11-CURRENT for RPI-B and RPI2.

FreeBSD/arm/Raspberry Pi (last edited 2017-06-16 15:18:16 by BenedictReuschling)