No wifi device on RPi, missing firmware in initramfs

Raspberry Pi 2

No wifi device on RPi, missing firmware in initramfs

Postby Malvineous » Thu Dec 23, 2021 12:01 pm

Hi all,

I'm trying to get the in built WiFi device working on an RPi 4, but it looks like something is broken in the latest firmware package. When I boot I get an error in dmesg about a missing firmware file:

$this->bbcode_second_pass_code('', '
brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2
brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
')
This happens early on in the boot sequence, while still in the initramfs, and sure enough that file is missing:

$this->bbcode_second_pass_code('', '
$ bsdtar tvf /boot/initramfs-linux.img | grep 43455-sdio
-rw-r--r-- 0 0 0 643651 Jan 1 1970 usr/lib/firmware/brcm/brcmfmac43455-sdio.bin
')
It has a .bin file, but not the .txt file.

I tried reloading the driver once the system had booted, and this worked:

$this->bbcode_second_pass_code('', '
$ rmmod brcmfmac
$ modprobe brcmfmac
$ dmesg | grep brcm
brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2
')
At this point I get a wlan0 device appearing and everything seems to work.

While a workaround would be to remove and re-add the module on each boot once the main root filesystem has been mounted, it would seem that a better solution would be to get those .txt files into the initramfs image along with the .bin files, but I'm not sure how to go about this. Are you supposed to list those .txt files in an initramfs config file somewhere, or is it meant to be handled automatically in the same way as how the .bin files get included?

Everything on the system is up to date as of posting this message:

$this->bbcode_second_pass_code('', '
$ pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
:: Starting full system upgrade...
there is nothing to do
')
Malvineous
 
Posts: 40
Joined: Sat Mar 11, 2017 1:45 pm

Re: No wifi device on RPi, missing firmware in initramfs

Postby graysky » Thu Dec 23, 2021 1:19 pm

Which kernel package? You should be running linux-rpi. Do you have firmware-raspberrypi installed?
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: No wifi device on RPi, missing firmware in initramfs

Postby Malvineous » Thu Dec 23, 2021 3:21 pm

Thanks for the quick reply!

Yes, I recently had to switch to linux-rpi. Here are the package versions:

$this->bbcode_second_pass_code('', '
$ pacman -Qo /boot/kernel7.img
/boot/kernel7.img is owned by linux-rpi 5.10.83-1

$ pacman -Qo /usr/lib/firmware/brcm/*43455*4-model*
/usr/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt is owned by linux-firmware 20211027.1d00989-1

$ pacman -Qo /usr/lib/firmware/updates/brcm/*43455*
/usr/lib/firmware/updates/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt is owned by firmware-raspberrypi 20211117-1
')
I do have firmware-raspberrypi installed (20211117-1) however this does not contain the brcmfmac43455-sdio.txt file requested during boot. It contains similar files with numbers 43456 and 43430 in the filenames instead, but it doesn't contain a 43455 version. Could that be the problem? I am guessing not, because I still don't have this file after booting and yet removing and reinserting the module successfully loads the firmware.

EDIT: I tried adding one of the .txt files manually to mkinitcpio.conf:

$this->bbcode_second_pass_code('', '
FILES=(/usr/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt)
')
And when I boot, it appears to load the firmware unlike earlier, but it encounters further errors:

$this->bbcode_second_pass_code('', '
brcmfmac: F1 signature read @0x18000000=0x15264345
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
usbcore: registered new interface driver brcmfmac
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Apr 15 2021 03:03:20 version 7.45.234 (4ca95bb CY) FWID 01-996384e2
brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
ieee80211 phy0: brcmf_cfg80211_reg_notifier: Firmware rejected country setting
ieee80211 phy0: brcmf_run_escan: error (-52)
ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
ieee80211 phy0: brcmf_run_escan: error (-52)
ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
ieee80211 phy0: brcmf_run_escan: error (-52)
ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
ieee80211 phy0: brcmf_run_escan: error (-52)
')
As with before, unloading and reloading the brcmfmac module once the boot process is complete fixes all these new problems and everything works fine.

EDIT2: This got it working properly from boot with no post-boot fixes needed:

$this->bbcode_second_pass_code('', '
FILES=(
/usr/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
/usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
)
')
Malvineous
 
Posts: 40
Joined: Sat Mar 11, 2017 1:45 pm


Return to Broadcom

Who is online

Users browsing this forum: No registered users and 9 guests