Setting up FreeBSD on a Raspberry Pi 5, many URL links to share. How to build a bootable microSD card or USB flash disk stick.
https://wiki.freebsd.org/arm/Raspberry%20Pi%205 Raspberry Pi 5 Boot stuff
Setting up FreeBSD on a Raspberry Pi 5, many URL links to share. How to build a bootable microSD card or USB flash disk stick.
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) or try FreeBSD 15.0-CURRENT download directory https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/15.0/
use wget -c or curl -O RPI image 2025 October 04 https://download.freebsd.org/ftp/snapshots/ISO-IMAGES/15.0/FreeBSD-15.0-ALPHA5-arm64-aarch64-RPI-20251004-1c0898edf28f-280541.img.xz
Uncompress the image file with CLI command 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
- Unzip the RPi5_UEFI_Release_X.Y.zip file
- Copy the unzipped 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.
- Turn on the Raspberry Pi.
time dd if=FreeBSD-15.0-PRERELEASE-arm64-aarch64-RPI-20250822-027be99b1f33-279771.img of=/dev/mmcblk0 conv=sync status=progress
bs=4M
Copy files from zip file to root of usb flash drive stick.
What the disks look like before write
https://wiki.freebsd.org/RonaldKlop/Raspberry%20Pi%205%2016GB Ronald Klop RPI 5 bring up efforts.
https://github.com/worproject/rpi5-uefi/issues/43#issuecomment-2599407055 RPI5-UEFI comments
https://lists.buildroot.org/pipermail/buildroot/2025-April/776656.html RPI500 dtb build
https://lists.freebsd.org/archives/freebsd-arm/2025-February/004569.html FreeBSD RPI5 install
https://github.com/raspberrypi Find the firmware here. bootcode.bin bcm2712
https://www.raspberrypi.com/products/raspberry-pi-5/ Raspberry Pi 5 products for sale.
Auditing the files written into the USB Flash drive FAT32 MSDOS root directory
md5deep -z -b * > ~/audit_bootfiles_raspi500_oct12.md5
cat ~/audit_bootfiles_raspi500_oct12.md5
cat ~/audit_bootfiles_raspi500_oct12.md5
5888 3a92d74688db2222f8720662dc5902d0 armstub8.bin
5888 165ec91ff1cd734909c6c1debb78e951 armstub8-gic.bin
30390 2ca2f05f45f642ad11a3382b079afc82 bcm2710-rpi-2-b.dtb
32753 d949ed83d629f2d60c7eed8c3a628777 bcm2710-rpi-3-b-plus.dtb
32142 fd64787103dcfada2bada262bb9bfe6d bcm2710-rpi-3-b.dtb
30285 fb5766a42fe2f783c2e2e331d379ae7a bcm2710-rpi-cm3.dtb
52593 382a44150bbeebdff6e25276be78250c bcm2711-rpi-4-b.dtb
76038 f6ebced6b0a6f5d946f383e1553a0188 bcm2712-rpi-5-b.dtb
78747 31ddc54cdd1ec0359cbbeb3f2aa18549 bcm2712-rpi-500.dtb
2594 129f76823001548ceae8f532c7af1dbf config.txt
221 af72c5becec929caf80fcc380222718c config_4B.txt
52624 9dafb010e8211131c9fff60652a00aa9 bootcode.bin
331 7bfe92010349bec31f95f78c70df2334 config_rpi5.txt
177 20ab45202003d40ef7b82a0d213745ca config.txt.orig
3173 8508c02209021891c93383c95314f9e4 fixup4cd.dat
3173 8508c02209021891c93383c95314f9e4 fixup_cd.dat
5399 07c47ded7da4070466b9c5c3114b2311 fixup4.dat
8381 1bea75343c4db255edd7e8f1b964730f fixup4db.dat
8387 93d3779bab7a6e2bd5a26a13bd39cae4 fixup4x.dat
7266 111a94d6a47ca5a9baa1d424cf997e87 fixup.dat
10230 40296ead1e9469ac6e4970037f4f56d5 fixup_db.dat
10228 b3ba08e67ae5dac649e3af73ba5192fa fixup_x.dat
240 ec1a61f2cf768b409ddfd0d148b926a7 README
1594 c403841ff2837657b2ed8e5bb474ac8d LICENCE.broadcom
805756 bfba0eb7a9c3f3c806f0174cf40c7cb4 start4cd.elf
2031616 c9d6a51f16ae4e6a24c3747c5b4a374e RPI_EFI.fd
2251392 f14cce71c61143fb25490d22a46aaa1c start4.elf
3747688 f1e72dc9363d0624cca3b6e332bae65b start4db.elf
7397096 b814f134789b37a9388f9bc375d53be2 kernel.img
805756 6aa8e3f9b5fb4c205c6ba70b57e19987 start_cd.elf
2998888 1c52310d59f5c4e6ae6e37adc41aab8b start4x.elf
9889457 9966b0c6254a3238b9b0ab0a43005074 kernel_2712.img
2975680 66cb6612b87a371de4fd90adce8c68dd start.elf
630976 2a0ca79228d84492f6ba44351ede2337 u-boot.bin
4819624 bde456c41de8278d38db8f61b042ee4c start_db.elf
3722504 9d31bf021d0637e1268d4ae982f68eb6 start_x.elf
ls -l
ls -l
total 41620
-rwxr-xr-x 1 root root 5888 Nov 28 2024 armstub8.bin
-rwxr-xr-x 1 root root 5888 Nov 28 2024 armstub8-gic.bin
-rwxr-xr-x 1 root root 30390 Apr 5 2023 bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root 32142 Apr 5 2023 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 32753 Apr 5 2023 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root 30285 Apr 5 2023 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root 52593 Apr 5 2023 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root 78747 Oct 4 23:24 bcm2712-rpi-500.dtb
-rwxr-xr-x 1 root root 76038 Mar 15 2024 bcm2712-rpi-5-b.dtb
-rwxr-xr-x 1 root root 52624 Oct 5 00:23 bootcode.bin
-rwxr-xr-x 1 root root 221 May 19 00:24 config_4B.txt
-rwxr-xr-x 1 root root 331 Sep 23 13:25 config_rpi5.txt
-rwxr-xr-x 1 root root 2594 Oct 5 01:28 config.txt
-rwxr-xr-x 1 root root 177 Nov 28 2024 config.txt.orig
drwxr-xr-x 8 root root 4096 Nov 28 2024 dtb
drwxr-xr-x 3 root root 4096 Nov 28 2024 EFI
-rwxr-xr-x 1 root root 3173 Apr 5 2023 fixup4cd.dat
-rwxr-xr-x 1 root root 5399 Apr 5 2023 fixup4.dat
-rwxr-xr-x 1 root root 8381 Apr 5 2023 fixup4db.dat
-rwxr-xr-x 1 root root 8387 Apr 5 2023 fixup4x.dat
-rwxr-xr-x 1 root root 3173 Apr 5 2023 fixup_cd.dat
-rwxr-xr-x 1 root root 7266 Apr 5 2023 fixup.dat
-rwxr-xr-x 1 root root 10230 Apr 5 2023 fixup_db.dat
-rwxr-xr-x 1 root root 10228 Apr 5 2023 fixup_x.dat
-rwxr-xr-x 1 root root 9889457 Oct 5 00:44 kernel_2712.img
-rwxr-xr-x 1 root root 7397096 Oct 5 00:36 kernel.img
-rwxr-xr-x 1 root root 1594 Apr 5 2023 LICENCE.broadcom
drwxr-xr-x 2 root root 4096 Nov 28 2024 overlays
-rwxr-xr-x 1 root root 240 Nov 28 2024 README
-rwxr-xr-x 1 root root 2031616 Mar 18 2024 RPI_EFI.fd
-rwxr-xr-x 1 root root 805756 Apr 5 2023 start4cd.elf
-rwxr-xr-x 1 root root 3747688 Apr 5 2023 start4db.elf
-rwxr-xr-x 1 root root 2251392 Apr 5 2023 start4.elf
-rwxr-xr-x 1 root root 2998888 Apr 5 2023 start4x.elf
-rwxr-xr-x 1 root root 805756 Apr 5 2023 start_cd.elf
-rwxr-xr-x 1 root root 4819624 Apr 5 2023 start_db.elf
-rwxr-xr-x 1 root root 2975680 Apr 5 2023 start.elf
-rwxr-xr-x 1 root root 3722504 Apr 5 2023 start_x.elf
-rwxr-xr-x 1 root root 630976 Nov 28 2024 u-boot.bin
[kliktel@kliktel-pc sdb1]$ cat config.txt
armstub=RPI_EFI.fd
device_tree_address=0x1f0000
device_tree_end=0x210000
# Force 32 bpp framebuffer allocation.
#framebuffer_depth=32
# Force 16 bpp framebuffer allocation.
framebuffer_depth=16
# 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
[pi4]
#hdmi_safe=1
#overscan_left=1
# 1080p screen 1920x1080 pixel screen size
hdmi_group=1
hdmi_mode=16
[pi5]
#hdmi_safe=1
#overscan_left=1
# 1080p screen 1920x1080 pixel screen size
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87 # 1920x1080 @ 60Hz (adjust for your display)
[pi500]
#hdmi_safe=1
#overscan_left=1
# 1080p screen 1920x1080 pixel screen size
# Uncomment to force a console on the HDMI port (default is serial)
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87 # 1920x1080 @ 60Hz (adjust for your display)
# For more options and information see
# http://rpi-hw.github.io/config-txt/
# To force HDMI output even if no monitor is detected
#hdmi_force_hotplug=1
# Uncomment to force a console on the HDMI port (default is serial)
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=87 # 1920x1080 @ 60Hz (adjust for your display)
# Uncomment to force a specific resolution (uncomment only one)
#hdmi_group=1
#hdmi_mode=16 # 1024x768 @ 60Hz
#hdmi_group=2
#hdmi_mode=4 # 1920x1080 @ 60Hz
# Enable serial console (recommended for debugging FreeBSD boot)
enable_uart=1
dtoverlay=disable-bt # Disable Bluetooth if not needed (frees UART pins)
# ARM-specific settings for Pi 5/500 (BCM2712)
arm_64bit=1
# kernel=ubldr.bin # FreeBSD's U-Boot loader (ensure ubldr.bin is in boot partition)
# kernel=u-boot.bin # FreeBSD's U-Boot loader (ensure ubldr.bin is in boot partition)
kernel=bootcode.bin # FreeBSD's U-Boot loader (ensure ubldr.bin is in boot partition)
# kernel=kernel_2712.img # RPI 500 BCM2712 Linux Kernel image
# Disable overscan for full-screen display (adjust if black borders appear)
disable_overscan=1
overscan_scale=1
# Power management (Pi 5/500 specific)
power_off_on_halt=1 # Uncomment to power off on halt (saves energy)
# Device Tree overlays (FreeBSD uses a base DTB; add if custom hardware)
#dtoverlay=rpi-poe # For Power over Ethernet, if applicable
dtparam=i2c_arm=on # Enable I2C (test with i2c -p in FreeBSD)
dtparam=spi=on # Enable SPI
# Uncomment for composite video (PAL/NTSC, rarely used)
#sdtv_mode=0 # 0=NTSC, 2=PAL
#sdtv_disable_colourburst=1
# Memory split (default is fine for FreeBSD; GPU gets 64MB)
gpu_mem=64
# End of config.txt
Here is a test with an October 04 2025 FreeBSD Current imge:
xz -d FreeBSD-15.0-ALPHA5-arm64-aarch64-RPI-20251004-1c0898edf28f-280541.img.xz
time dd if=FreeBSD-15.0-ALPHA5-arm64-aarch64-RPI-20251004-1c0898edf28f-280541.img of=/dev/mmcblk0 conv=sync status=progress
bs=4M
Comments
Post a Comment