The default FreeBSD kernel for Raspberry Pi can be found here in the FreeBSD source browser. It's everything you need to boot FreeBSD on a Pi, and includes GPIO support. However, the Pi is a nice small computer, so it's likely that you'll want it to include options such as Wifi, and pf. In my case, I wanted IPSEC and support for USB Serial via uftdi.
In order to add drivers to the kernel, it's useful to have a list of the drivers that can be added. That exists here. The man pages, are a useful place to look up what a specific driver does, what hardware it supports, etc.
I added this stuff.
# WLAN required for wireless device wlan device wlan_wep device wlan_ccmp device wlan_tkip # USB wireless support device ehci device uhci device ohci device wlan_amrr device firmware device urtw device zyd device ural device upgt device uath device run device rum # USB ethernet support device smcphy device mii device smsc # USB serial # device uftdi #proc filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework #pf device pf # IPsec interface. device enc
I also renamed my kernel configuration
The kernel options I added give me:
- WLAN support
- All the USB Wifi drivers
- pf, the packet filter
- the /proc filesystem
- the enc device, for IPSEC
I copied this kernel configuration (name RPI-B-WIFI) to the right spot on my local source tree
cp RPI-B-WIFI src/FreeBSD/head/sys/arm/conf/
Then I used the freebsd-arm-tools to create a 4GB disk image, with this kernel, a small swap, and the full ports tree:
sh build-arm-image.sh -s4 -u -p -firstname.lastname@example.org -w512 -kRPI-B-WIFI