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
ident RPI-B-WIFI
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
- uftdi
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 -mtom@khubla.com -w512 -kRPI-B-WIFI
May 24, 2013 - 7:39 am
Could you share the image if possible?
May 27, 2013 - 10:00 pm
The images are here
June 1, 2013 - 10:34 am
root password?
June 20, 2013 - 2:17 pm
There is no root password
June 20, 2013 - 2:17 pm
http://files.khubla.com/freebsd-raspberry-pi/
July 24, 2013 - 12:26 am
Hey!
trying to build img,
this error stops
cp …..head/sys/RPI-B/bcm2835-rpi-b.dtb: No such file or directory
what need to do with it?
thx for any answer,
head revision 253591
July 24, 2013 - 12:32 am
but i find that it`s now called rpi.dtb at the same place, now will try to build with change script build-arm-image.sh
July 24, 2013 - 5:37 am
yep, all done ) with this edit of build-arm-image.sh
now bcm2835-rpi-b.dtb in script need to be replaced by rpi.dtb , they just compiled all in one rpi.dtb 🙂
thanks for base script 🙂
root@avalon:/root # ipfw show
65535 442 50698 allow ip from any to any
root@avalon:/root # mount
/dev/mmcsd0s2a on / (ufs, local, noatime, journaled soft-updates, nfsv4acls)
devfs on /dev (devfs, local)
root@avalon:/root # cat /etc/fstab
/dev/mmcsd0s2a / ufs rw,noatime 1 1
/dev/mmcsd0s2b none swap sw 0 0
root@avalon:/root # uname -a
FreeBSD avalon 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r253591M: Wed Jul 24 10:39:02 EEST 2013 root@:/usr/tmp/newbuildraspbery/obj/arm.armv6/usr/tmp/newbuildraspbery/head/sys/RPI-B arm
root@avalon:/root #
– something top cut ————-
last pid: 819; load averages: 0.13, 0.17, 0.12 up 0+00:09:07 11:30:10
15 processes: 1 running, 14 sleeping
CPU: 0.4% user, 0.0% nice, 1.6% system, 0.4% interrupt, 97.7% idle
Mem: 9236K Active, 10M Inact, 27M Wired, 19M Buf, 416M Free
Swap: 512M Total, 512M Free
October 2, 2013 - 10:37 pm
I first use freebsd on raspberry pi, now I have a question about use wifi RTL8188CUS under freebsd,I can not find the device wlan when use “ifconfig -a”, how should I do? Thank you
October 4, 2013 - 7:43 pm
What’s in your dmesg?
February 11, 2014 - 3:37 am
[…] Si vous voulez faire l’image vous même, voici un article (en anglais) qui explique comment proceder et comment compiler le kernel : http://blog.khubla.com/freebsd/creating-a-custom-freebsd-build-for-raspberry-p […]
March 6, 2016 - 5:34 pm
I’m installing SNORT on Raspberry PI 2 and receive a “Bus Error” when I start the application …. any ideas?
Thanks
Ruben