Sharing some progress updates with the group.
I have been able to successfully get ipfire to build for the Raspberry PI 5 using the base drivers that are currently included in the ipfire aarch64 tree for core 200. I then imaged an SD card with the built image, and have gotten it to boot into setup. For testing I’m using using RED and Green networks (BCM wireless as RED and the 1G Ethernet port as Green).
I’ll share the steps I did below and figure out the best way to submit a pull-request. I had to make some manually updates after the image was built to boot.txt and uenv config after the image was built to make it boot and work with u-boot properly.
As I mentioned before, I’m very new to the ipfire ecosystem and using the various tools like u-boot to create proper builds is a first for me. Forgive me if I’m over engineering the updates below to get it to work right, but at least its a starting point to get it to work on Raspberry Pi 5.
Step 1: Check out the code from github at GitHub - ipfire/ipfire-2.x: IPFire 2.x development tree I used the master branch.
Step 2: Modify the following files in the project. Below is the output from git diff. Save this output in a file called rpi5-changes.patch at the root of the project. Then run patch rpi5-changes.patch
diff --git a/config/rootfiles/common/aarch64/rpi-firmware b/config/rootfiles/common/aarch64/rpi-firmware
index c3eb09db1..bf35cf7ea 100644
--- a/config/rootfiles/common/aarch64/rpi-firmware
+++ b/config/rootfiles/common/aarch64/rpi-firmware
@@ -1,4 +1,5 @@
#boot/LICENCE.broadcom
+boot/bcm2712-rpi-5-b.dtb
boot/bcm2711-rpi-400.dtb
boot/bcm2711-rpi-4-b.dtb
boot/bcm2711-rpi-cm4-io.dtb
diff --git a/config/rootfiles/common/aarch64/u-boot b/config/rootfiles/common/aarch64/u-boot
index 277ada68d..198557713 100644
--- a/config/rootfiles/common/aarch64/u-boot
+++ b/config/rootfiles/common/aarch64/u-boot
@@ -3,6 +3,7 @@ boot/boot.mk
boot/boot.scr
boot/u-boot-rpi3.bin
boot/u-boot-rpi4.bin
+boot/u-boot-rpi5.bin
boot/uEnv.txt
boot/uboot.env
usr/bin/mkimage
@@ -22,3 +23,5 @@ usr/share/u-boot/orangepi_zero_plus/u-boot-sunxi-with-spl.bin
#usr/share/u-boot/rpi
usr/share/u-boot/rpi/u-boot-rpi3.bin
usr/share/u-boot/rpi/u-boot-rpi4.bin
+usr/share/u-boot/rpi/u-boot-rpi5.bin
+
diff --git a/config/rootfiles/common/linux-firmware b/config/rootfiles/common/linux-firmware
index 66c883f41..254d99147 100644
--- a/config/rootfiles/common/linux-firmware
+++ b/config/rootfiles/common/linux-firmware
@@ -1157,6 +1157,7 @@ lib/firmware/brcm/brcmfmac43455-sdio.AW-CM256SM.txt
lib/firmware/brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt
lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt
lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt
+#lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 5 Model B.txt
lib/firmware/brcm/brcmfmac43455-sdio.acepc-t8.txt
lib/firmware/brcm/brcmfmac43455-sdio.beagle,am5729-beagleboneai.txt
lib/firmware/brcm/brcmfmac43455-sdio.bin
@@ -1176,9 +1177,7 @@ lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
-lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,5-compute-module.txt
lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.txt
-lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,500.txt
lib/firmware/brcm/brcmfmac4350-pcie.bin
lib/firmware/brcm/brcmfmac4350c2-pcie.bin
lib/firmware/brcm/brcmfmac4354-sdio.bin
diff --git a/config/rootfiles/oldcore/147/filelists/linux-firmware-updates b/config/rootfiles/oldcore/147/filelists/linux-firmware-updates
index 90607af64..8983b6653 100644
--- a/config/rootfiles/oldcore/147/filelists/linux-firmware-updates
+++ b/config/rootfiles/oldcore/147/filelists/linux-firmware-updates
@@ -115,6 +115,7 @@ lib/firmware/bnx2x/bnx2x-e1-7.13.15.0.fw
lib/firmware/bnx2x/bnx2x-e1h-7.13.15.0.fw
lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
+lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.txt
lib/firmware/cxgb4/configs/t6-config-default.txt
lib/firmware/cxgb4/t4fw-1.24.14.0.bin
lib/firmware/cxgb4/t5fw-1.24.14.0.bin
diff --git a/config/rootfiles/oldcore/158/filelists/linux-firmware b/config/rootfiles/oldcore/158/filelists/linux-firmware
index 38e9ded40..7567121a0 100644
--- a/config/rootfiles/oldcore/158/filelists/linux-firmware
+++ b/config/rootfiles/oldcore/158/filelists/linux-firmware
@@ -199,6 +199,7 @@
/lib/firmware/brcm/brcmfmac43430a0-sdio.ilife-S806.txt
/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
+/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,5-model-b.txt
/lib/firmware/brcm/brcmfmac4356-sdio.vamrs,rock960.txt
/lib/firmware/cadence/mhdp8546.bin
/lib/firmware/cxgb4/configs/t6-config-default.txt
diff --git a/config/rootfiles/oldcore/185/filelists/files b/config/rootfiles/oldcore/185/filelists/files
index 53793fda1..4ff36f967 100644
--- a/config/rootfiles/oldcore/185/filelists/files
+++ b/config/rootfiles/oldcore/185/filelists/files
@@ -13,6 +13,7 @@ lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt
lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi Compute Module 4.txt
+lib/firmware/brcm/brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 5 Model B.txt
lib/firmware/brcm/brcmfmac4354-sdio.clm_blob
lib/firmware/brcm/brcmfmac4356-pcie.clm_blob
lib/firmware/brcm/brcmfmac4356-sdio.clm_blob
diff --git a/config/rpi-firmware/config.txt b/config/rpi-firmware/config.txt
index b28132335..5c8ef056e 100644
--- a/config/rpi-firmware/config.txt
+++ b/config/rpi-firmware/config.txt
@@ -67,5 +67,7 @@ kernel=u-boot-rpi2.bin
kernel=u-boot-rpi3.bin
[pi4]
kernel=u-boot-rpi4.bin
+[pi5]
+kernel=u-boot-rpi5.bin
[all]
##############################################################################
diff --git a/lfs/rpi-firmware b/lfs/rpi-firmware
index edd8e5d06..b2124e9e2 100644
--- a/lfs/rpi-firmware
+++ b/lfs/rpi-firmware
@@ -61,7 +61,7 @@ $(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
- @$(B2SUM)
+# @$(B2SUM)
###############################################################################
# Installation Details
diff --git a/lfs/u-boot b/lfs/u-boot
index b8f5e0e2f..b0928333e 100644
--- a/lfs/u-boot
+++ b/lfs/u-boot
@@ -112,6 +112,18 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && install u-boot.bin /boot/u-boot-rpi4.bin
cd $(DIR_APP) && make distclean
+ # Raspberry Pi 5
+ -mkdir -pv /usr/share/u-boot/rpi
+ cd $(DIR_APP) && make CROSS_COMPILE="" rpi_arm64_config
+ cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" RPi5 - IPFire.org"!' .config
+ cd $(DIR_APP) && sed -i -e 's!^.*CONFIG_DISTRO_DEFAULTS.*!CONFIG_DISTRO_DEFAULTS=y!' .config
+ cd $(DIR_APP) && sed -i -e 's!^CONFIG_BOOTCOMMAND=.*!CONFIG_BOOTCOMMAND="run distro_bootcmd"!' .config
+ cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
+ cd $(DIR_APP) && install -v -m 644 u-boot.bin \
+ /usr/share/u-boot/rpi/u-boot-rpi5.bin
+ cd $(DIR_APP) && install u-boot.bin /boot/u-boot-rpi5.bin
+ cd $(DIR_APP) && make distclean
+
# OrangePi Zero Plus
cd $(DIR_APP) && rm -rf arm-trusted-firmware-$(ATF_VER)
cd $(DIR_APP) && tar axf $(DIR_DL)/arm-trusted-firmware-$(ATF_VER).tar.gz
Step 3: Start a build following these steps:
sudo ./make.sh downloadsrc
sudo ./make.sh gettoolchain
sudo ./make.sh build
Note these commands will take awhile to run. Anywhere from 10-15 hours.
Step 4: When the build finishes, it will have an image file in images_aarch64/ipfire-2.29-core200-aarch64.img.xz Use an image flash program like balenaEtcher to flash this image on an SDcard.
Step 5: Mount the SD card and edit the following files in the root directory:
Add the following to /uEnv.txt:
SERIAL-CONSOLE=OFF
Update/add the following to /config.txt:
enable_uart=0
[pi5]
kernel=u-boot-rpi5.bin
bootdelay=-2
Step 6: Insert SD card in the Raspberry PI 5 and power it up. It should boot up into the setup screen. I connected an mini HDMI, ethernet and usb keyboard to do the initial configuring.
Step 7: In order to get the wireless to work properly, update/add the following to /etc/modprobe.d/brcmfmac.conf:
options brcmfmac feature_disable=0x82000
Step 8: Reboot and you should be able to access the web UI on the Green interface IP at port 444.
Interested to see if others can get this working. I’ll submit a proper git pull request once I have verification that it works for others.
Good luck!!