Archives For August 2012

ARMv6/AMRv7 support is now in main FreeBSD codebase.

New goodies:

  • General ARMv6/ARMv7 kernel bits (pmap, cache,
    assembler routines, etc…)
  • ARM SMP support
  • VFP/Neon support
  • ARM Generic Interrupt Controller driver
  • Improved thread-local storage for cpus >=ARMv6
  • Two new values for TARGET_ARCH: armv6 and armv6eb
  • Driver for SMSC LAN95XX and LAN8710A ethernet controllers
  • Marvell MV78x60 support (multiuser, ARMADA XP kernel config)
  • TI OMAP4 and AM335x support (multiuser, no GPU or graphics
    support, kernel configs for Pandaboard and Beaglebone)
  • LPC32x0 support (multiuser, frame buffer works with SSD1289
    LCD controller.Embedded Artists EA3250 kernel config)
  • Barebone Nvidia Tegra2 support (timers, interrupts and UART.
    No kernel config)

I’m going to re-create Raspberry Pi port off HEAD and start merging least intrusive bits back to the tree.

FreeBSD/Pi setup HowTo

August 5, 2012 — 60 Comments

This instruction is no longer correct. New version is here

Took some time but it seems we’re there too :)

Alexander Rybalko, who works on USB drivers for the platform got remote telnet shell to the device:

Having fixed serial console for userland applications (two lines change) and after some tweaking of SDHCI driver I got access to multiuser shell too: multiuser.txt
Still not usable for putting together distros but stable enough for those who are willing to get their hands dirty with kernel side.

Here is short how to on getting FreeBSD boot on Raspberry Pi:

Get sources:

git clone git://
cd freebsd-pi
git checkout rpi

Fetch u-boot files from here: freebsd-pi-uboot-20120806-sd.tar.gz.

Build sources and create SD card image with script like this:
set -e

export TARGET_ARCH=arm
export SRCROOT=/usr/home/gonzo/Sources/freebsd-pi
export MAKEOBJDIRPREFIX=/usr/home/gonzo/Sources/obj
KERNEL_BIN=`realpath $MAKEOBJDIRPREFIX`/arm.arm/`realpath $SRCROOT`/sys/$KERNCONF/kernel.bin

make -C $SRCROOT kernel-toolchain

rm -f $IMG
dd if=/dev/zero of=$IMG bs=128M count=8
MDFILE=`mdconfig -a -f bsd-pi.img`
gpart create -s MBR ${MDFILE}
gpart add -s 32m -t '!12' ${MDFILE}
gpart add -s 896m -t '!12' ${MDFILE}
gpart set -a active -i 1 ${MDFILE}
newfs_msdos -L boot -F 16 /dev/${MDFILE}s1
newfs /dev/${MDFILE}s2
mount_msdosfs /dev/${MDFILE}s1 /mnt
tar -x -v -z -C /mnt -f freebsd-uboot-sd.tar.gz
cp $KERNEL_BIN /mnt
umount /mnt
mount /dev/${MDFILE}s2 /mnt
make -C $SRCROOT DESTDIR=/mnt installworld
make -C $SRCROOT DESTDIR=/mnt distribution

# Minimal config
echo 'hostname="freebsd-pi"' > /mnt/etc/rc.conf
echo '/dev/mmcsd0s2 / ufs rw 1 1' > /mnt/etc/fstab

umount /mnt
mdconfig -d -u $MDFILE

dd image to SD card, insert it to Raspberry Pi and check serial port for some output

There is also U-Boot configuration that uses dhcp/tftp method by default freebsd-pi-uboot-20120806-netboot.tar.gz. It’s more suitable for kernel hacking but requires environment setup.