Setting up FreeBSD on a Raspberry Pi 5
You will need
- a Raspberry Pi 5
- a microSD card
- a USB stick formatted FAT32 with at least 2080kbytes free space
- an ethernet to USB adapter
Steps to follow
Download a FreeBSD image for Raspberry Pi. Go to FreeBSD download page. Click on the link to "RPI (3/4)" (don't worry about it not being for the Pi 5). (20250207: use FreeBSD-14.2-RELEASE-arm64-aarch64-RPI.img.xz)
Uncompress the image file with xz -d.
Copy the image to the microSD card (see Writing an Image File to USB). Plug the microSD card into the Raspberry Pi.
Download the rpi5-uefi boot files from rpi5-uefi downloads for pre-D0 RPi5s (just .zip) vs. rpi5-uefi downloads for D0 RPi5's (.zip and .fd)
- Pre-D0 RPi5's: Unzip the RPi5_UEFI_Release_X.Y.zip file
- D0 RPi5's: Unzip the the "RPI5-D0v1" RPI5_D0.zip and replace its RPI_EFI.fd with the "test" RPI_EFI.fd download.
- Copy the unzipped(/updated) contents to the root of the USB stick. Plug the USB stick into the Raspberry Pi.
- Connect an ethernet cable to one of the USB ports with the USB to ethernet cable and been in stable use since.
- Turn on the Raspberry Pi.
- EDK2 configuration (if desired) is accessed via use of the escape key during the . . . display.
For the D0 RPi5 EDK2 draft to use a serial console on FreeBSD: Device Manager > Console Preference Selection > Preferred console: <Serial> . Then do the save and then escape out until you can select Reset.
For reference, for a 16 GiByte "D0" RPI5, an example microsd card for just the RPI_EFI.fd related material has:
(This is analogous to the "USB stick" in these overall instructions --"USB stick" predates all my [MarkMillard] edits adding more notes about the "rpi5-uefi boot files". My personal context is not based on the PaulFloyd instructions that I added notes to.)
# gpart show -p /dev/mmcsd0
=> 63 62333889 mmcsd0 MBR (30G)
63 8129 - free - (4M)
8192 62325760 mmcsd0s1 fat32lba (30G)
# df -m /mnt
Filesystem 1M-blocks Used Avail Capacity Mounted on
/dev/mmcsd0s1 30424 2 30421 0% /mnt
# find -s /mnt/ -print
/mnt/
/mnt/RPI_EFI.fd
/mnt/bcm2712-d-rpi-5-b.dtb
/mnt/bcm2712-rpi-5-b.dtb
/mnt/bcm2712-rpi-500.dtb
/mnt/bcm2712-rpi-cm5-cm4io.dtb
/mnt/bcm2712-rpi-cm5-cm5io.dtb
/mnt/bcm2712-rpi-cm5l-cm4io.dtb
/mnt/bcm2712-rpi-cm5l-cm5io.dtb
/mnt/bcm2712d0-rpi-5-b.dtb
/mnt/config.txt
/mnt/overlays
/mnt/overlays/bcm2712d0.dtbo
/mnt/timeoutI (MarkMillard) use the above for booting M.2 or USB3 media that has the FreeBSD EFI loader in a (the) msdosfs and the FreeBSD boot file system (on that same media, UFS or ZFS in a partition).
The below shows an example config.txt that I use on a 16 GiByte "D0" RPi5:
# cat /mnt/config.txt
armstub=RPI_EFI.fd
#
# For NEW "D0" EDK2 ('Update UEFI space' and later, no release yet):
#device_tree_address=0x3e0000
#device_tree_end=0x400000
#
# For OLDER "D0" EDK2 (RPI5-D0v1 and test 2025-06-11 .. 2025-07-13):
device_tree_address=0x1f0000
device_tree_end=0x210000
# Force 32 bpp framebuffer allocation.
framebuffer_depth=32
# Disable compensation for displays with overscan.
disable_overscan=1
# Force maximum USB power regardless of the power supply.
usb_max_current_enable=1
# Force maximum CPU speed.
force_turbo=1
# Local additions:
enable_uart=1
uart_2ndstage=1
dtdebug=1
disable_commandline_tags=1
#
[pi5]
over_voltage_delta=100000
arm_freq=2600
[all]
program_usb_boot_timeout=1- The use of framebuffer_depth=32 (instead of 24) presume a modern enough EEPROM image.
My /boot/loader.conf for use of the serial console includes the lines: #boot_multicons="YES" boot_serial="YES" console="eficom,efi"
- (End of "D0" RPI5 examples.)
Known To Work
Raspberry Pi 5 Model B Rev 1.0 8Gbytes RAM I (PaulFloyd) have been using it for development work since February 2024, using FreeBSD 14.1 and then 14.2. Primarily this has been using ssh to connect from my amd64 FreeBSD workstation.
Known Limitations
Fan runs at full speed. Versions of pieeprom after 2024-01-05 may not run the fan at all. eeprom images can be downloaded from https://github.com/raspberrypi/rpi-eeprom/tree/master/firmware-2712/old/default. Install them with sudo rpi-eeprom-update -d -f pieeprom-2024-xx-xx.bin (from raspberry pi OS).
- No wifi. (FreeBSD stage issue. Linux supports such SDIO use based on the ACPI boot.)
- Ethernet only via USB, uses up one USB port. (EDK2 draft stage issue.)
- Network occasionally fails to start.
- Boot loader rpi5-uefi for pre-D0 (Rev1.0?) RPi5's is known to not work with RPi5 16GB and other D0 RPi5's.
- Boot loader rpi5-uefi for D0 (Rev1.1?) RPi5's is known to not work with RPi5 pre-D0 RPi5's.
The D0 RPi5 related notes were added by MarkMillard without testing the above "steps to follow".
- Also, those D0 RPi5 notes are from memory of a configuration setup months earlier that has been in stable use since.
Future Development
Unfortunately, since Feb 4, 2025 the worproject/rpi5-uefi GitHub repo has been marked as archived and read-only. Presumably that means that there will be no further development done there, and thus no more bug fixes or enhancements.