FreeBSD/ARM on Raspberry Pi
FreeBSD-CURRENT has supported Raspberry Pi since November, 2012. 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:
- The "Model B" includes Ethernet and originally included 256MB RAM. First shipped in Feb 2012. Can be identified by the lack of mounting holes and "(c) 2011" on the board
- Since late 2012, "Model B" has been updated with 512MB RAM. This version can be identified by the two mounting holes and "(c) 2011,2012" on the board.
- "Model A" was released in early 2013. It lacks Ethernet, has 256MB RAM and is somewhat cheaper than the Model B.
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 serial adapter 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:
- FAT Partition
- bootcode.bin - First stage boot
- start.elf - Second stage boot
- config.txt - configuration for start.elf
- rpi.dtb - FDT file loaded via config.txt
- uboot.bin - Third stage: U-Boot loader
- uEnv.txt - configuration file for U-Boot
- ubldr - Fourth stage: FreeBSD bootloader
- UFS Partition
- /boot/kernel - dynamic kernel
- ... rest of FreeBSD ...
2013-12-12: Please notice that there is a new version if the RPi out, called the "micron", 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.
How to Build an Image
Raspberry Pi is supported by the Crochet build tool.
Some unofficial, home-built, native OABI packages against CURRENT are available here
- fluxbox crashes when invoked as 'startfluxbox' , but it works when starting with 'startx' (which then starts fluxbox):
(gdb) bt f #0 0x20614a7c in _Unwind_SjLj_ForcedUnwind () from /lib/libgcc_s.so.1 No symbol table info available. #1 0x2076879c in pthread_setspecific () from /lib/libc.so.7
- libsbuf seems to trigger a SIGSEGV under certain conditions
- ports tree with WITH_NEW_XORG
- all packages built without HAL, and any 'make config' option for NLS/EXAMPLES/DOCS was switched off
- no other significant modifications