Running FreeBSD 11 on Raspberry Pi

FreeBSD 11 was released recently. I ran pre-released FreeBSD 11 on Raspberry Pi  already. And I have noted that it behaviour changes from snapshot to snapshot.

Let’s see how released FreeBSD 11 works on Raspberry Pi Model B.

Serial Console

We don’t need to change anything to work with serial console cable.

cu

USB Wi-Fi

USB Wi-Fi setup slightly changes. After boot with connected device we can see our device in dmesg output:

wifi-dmesg

There are no interface, but there are kernel modules for it:

wifi-if-1

But we can add wlan interface:

wifi-wlan-1wifi-wlan-2

Next steps are update /etc/rc.conf and create /etc/wpa_supplicant.conf

wifi-rcwifi-wpa

After reboot we can see wlan interface:

wifi-if-2

Let’s check it:

wifi-ping

It works.

Applications

Compiled applications are available with a pkg  a utility for manipulating packages:

pkg-1pkg-3

GPIO and GPIOLED

Nothing changes here, it works:

gpio

See details here and here.

I2C

Also nothing new here, standard i2c utility doesn’t work. I still use my newi2c utility:

i2c

Real Time Clock

We can use ds1307 driver to get a real-time clock (RTC).

First we need to add ds1307 to FDT file /usr/src/sys/boot/fdt/dts/arm/bcm2835.dtsi:

rtc-1

Next, we need to compile and install our new FDT:

fdt-1

After reboot we can see new but unknown device:

rtc-2

I didn’r find any loadable module for ds1307 device. We need to add ds1307 device to our kernel /usr/src/sys/arm/conf/RPI-B:

rpi-b

After that we can compile and install our new kernel:

make-buildkernel1

make-installkernel1

After reboot we can see our new RTC device:

rtc-3rtc-4

CPU frequency

It’s here and working:

cpu

One-wire

To work with 1-Wire bus we need to add support for it our FDT file /usr/src/sys/boot/fdt/dts/arm/rpi.dts:

rpi_dts

4 in the third string is a number of pin we will use for connecting 1-wire devices.

But we don’t need to recompile our kernel. There are loadable kernel modules for 1-wire we can use.

ow-2

Let’s check how DS18B20 temperature sensors connected to 1-wire bus works:

ow-1

It works.

Advertisements

One thought on “Running FreeBSD 11 on Raspberry Pi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s