This post was first published on January 1, 2016 ! Its contents might be outdated!
The guide is no longer accurate mainly because FreeBSD 10.3 came out and also 11-CURRENT doesn’t need to be modified in order to boot on the Zero. You can follow this guide with the 11-CURRENT image, it will work without modifying the files on the boot partition. The images could be downloaded from the FreeBSD ARM images page. Look for the RPI-B image. The downloaded image can easy copied to the microSD card and it will boot. There is no need to modify the files in the boot partition.
Scope of this guide
This guide gives instructions on how can one boot FreeBSD 10.2-STABLE on a Raspberry Pi Zero. As a result, the operating system boots up, and is available over SSH. The instructions for the activities on the SD card are written and done on a Fedora 23, but they should apply to many other Linux/UNIX systems. I use the following additional components:
The SD card: Samsung microSD EVO+ 32GB (MB-MC32DAAMZ)
The microUSB - Ethernet adapter: Icy Box IB-AC510
Preparing the SD card
On my system, the SD card came up as /dev/sdb. It is possible that on other systems it would be something else. Checking the dmesg or lsblk could be very helpful. The first step is to “format” the SD card. I zero out the card before doing anything on it.
| |
This process usually takes a long time, but depends on the size and maximal speed of the SD card.
Downloading and writing the FreeBSD image to the SD card
In the meantime, download the actual FreeBSD image and unxz it. I use the 10.2-STABLE image, but it should work with the 11-CURRENT image too. The up-to-date images are available on the FreeBSD ARM Download page. After downloading, the file should be checked against the checksum and then it will be decompressed.
| |
If the checksum is equal to the value shown on the Download page, then decompress it.
| |
The result is an IMG file, that should be copied to the SD card.
| |
A few files need to be replaced on the card in order to make it boot on the Raspberry Pi Zero.
Making the SD Card bootable on the Zero
The easiest way now is to remove and reattach the card. After reattaching, a partition is mounted (if not, it needs to be mounted manually).
| |
The MSDOSBOOT partition contains the following files:
| |
The following files need to be deleted:
| |
The new files need to be downloaded from the raspberrypi/firmware Github repo. The files then could be copied to the card.
| |
The card can now be removed and inserted into the Raspberry Pi Zero.
| |
Booting FreeBSD
The first boot takes a lot of time, because the second partition gets resized. After booting up, it is possible to log in over SSH, or locally. The default user and password combos are:
freebsd / freebsd
root / root
dmesg on the Raspberry Pi Zero
| |
Thank you for reading!