I've been trying to make my Raspberry Pi 4 encrypted install headless. I've decided that the best option for me would be entering the passphrase using ssh using WiFi. I followed this tutorial. I found the WiFi chip mkinitcpio modules for the Raspberry Pi 4 and added them to modules section. But every time I reboot I get error messages that wlan0 doesn't exist. After I enter my password manually with keyboard and boot, the wifi doesn't work and when I do
ip a, there's only eth0.
I'm on arm-testing and linux-rpi4-mainline (I've tested it on arm-stable and linux-rpi4, but it also didn't work)
MODULES=(brcmfmac brcmutil) BINARIES=(/usr/bin/btrfs wpa_passphrase wpa_supplicant) HOOKS=(base udev keyboard keymap modconf block wifi net tinyssh encryptssh filesystems fsck)
(The wifi hook is created from the Arch Linux wiki page that I've linked earlier)
Probably the most important thing - dmesg errors:
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 mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2 brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2
Thank you for your help in advance!
Update: I managed to fix the wlan0 doesn't exist error. I just had to add these files to the FILES section:
/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt /lib/firmware/brcm/brcmfmac43455-sdio.bin. It fixed the wlan0 before decrypting the root partition but still didn't fix my wifi after booting into KDE. My workaround is to do
sudo modprobe -r brcmfmac and then
sudo modprobe brcmfmac. Also a new error shows up during boot and even though wlan0 is available, Raspberry Pi 4 won't connect to the network. Those are the two errors that show up every second:
ieee80211 phy0: brcmf_run_escan: error (-52) ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
I've tried finding the solution on the internet. Some say it's because of the older firmware (I think mine says during boot that the brcmfmac is from 27 Feb 2018) or because of the network country code not being set. I don't really know where to enter that and even if it did work, I'm not so sure if my wifi would connect after booting to KDE.
So I'm stuck now. I don't know where to continue or what to do next.