I use an initrd (initramfs), and I would like to load the brcmfmac kernel driver to enable Wifi during that early stage.
When using mkinitramfs, the modules are copied into the initrd, but it's still missing some firmware files, namely brcmfmac43455-sdio.clm_blob and brcmfmac43455-sdio.txt. I assume these files are missing because they are not listed in modinfo -k $(uname -r) brcmfmac.
Here is the syslog complaining about the missing file:
Code: Select all
$> dmesg | grep -i brcmfmac
[ 3.334553] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 3.342690] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006
[ 3.352440] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2
[ 3.360937] usbcore: registered new interface driver brcmfmac
[ 4.467976] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
[ 5.499272] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
Placed in /etc/initramfs-tools/hooks/fix_brcm_missing_fiirmware (and chmod +x):
Code: Select all
#!/bin/sh -e
# Copy missing firmware files for brcmfmac driver
PREREQ=""
prereqs () { echo "${PREREQ}"; }
case "${1}" in prereqs) prereqs; exit 0 ;; esac ;
. /usr/share/initramfs-tools/hook-functions
echo "Copying missing firmware files for brcmfmac..."
cp /lib/firmware/brcm/brcmfmac43455-sdio.bin ${DESTDIR}/lib/firmware/brcm/
cp /lib/firmware/brcm/brcmfmac43455-sdio.clm_blob ${DESTDIR}/lib/firmware/brcm/
cp /lib/firmware/brcm/brcmfmac43455-sdio.txt ${DESTDIR}/lib/firmware/brcm/
Code: Select all
$> lsinitramfs /boot/initrd.img | grep -i brcmfmac43455
lib/firmware/brcm/brcmfmac43455-sdio.bin
lib/firmware/brcm/brcmfmac43455-sdio.txt
lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
Other reports for this issue:
viewtopic.php?p=1287414#p1287586
https://archlinuxarm.org/forum/viewtopic.php?p=58082
I hope this helps someone, and I hope this can be fixed upstream too.
I had some other issues loading this brcmfmac driver before with 4.14.71+, had to `rmmod brcmfmac` then `insmod /lib/modules/4.14.71-v7+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko` to reload it and then it works fine. Very weird: Fortunately, this doesn't seem to happen with 4.14.78.