Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
fix-wifi-rpi.sh 635 B
#!/bin/bash

# Issue:  New firmware as of Fedora 34/RHEL 9 uses xz-compressed firmware files
# Unfortunately, the Rpi loader for wifi (brcm/broadcom) specifies files directly, and doesn't support the .xz files
# This is a simple hacky script to extract xz files in the brcm firmware directory and extract them, so they can be loaded properly

#echo "blacklist brcmfmac" > /etc/modprobe.d/01-rpi-blacklist.conf

mkdir -p  /tmp/brcm_bak
cp -p /lib/firmware/brcm/*.xz   /tmp/brcm_bak/
xz -d  /tmp/brcm_bak/*.xz
mv -f /tmp/brcm_bak/*   /lib/firmware/brcm/
rmdir /tmp/brcm_bak

modprobe brcmfmac
rm -f /etc/modprobe.d/01-rpi-blacklist.conf