Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set WiFi firmware in /lib/firmware/cypress due to RasPiOS & Ubuntu changes #3482

Merged
merged 5 commits into from Feb 26, 2023

Conversation

holta
Copy link
Member

@holta holta commented Feb 25, 2023

This PR restores IIAB implementers' ability to select WiFi firmware on most Raspberry Pi's.

This is necessary because Raspberry Pi OS (and Ubuntu now too) have recently changed how WiFi firmware is selected for 43430 and 43455 chips (i.e. the Broadcom/Cypress/Infineon WiFi/Bluetooth chip used in most Raspberry Pi's).

Specifically, selecting a preferred WiFi firmware in directory /lib/firmware/brcm is no longer workable — with Raspberry Pi's that use these 2 chips — as can be seen from these newer (OS-provided) symlinks here:

root@box:/lib/firmware/brcm# ls -l brcm*rasp* | grep '\.\.' | cut -d' ' -f 9-
brcmfmac43430-sdio.raspberrypi,3-model-b.bin -> ../cypress/cyfmac43430-sdio.bin
brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob -> ../cypress/cyfmac43430-sdio.clm_blob
brcmfmac43430-sdio.raspberrypi,model-zero-w.bin -> ../cypress/cyfmac43430-sdio.bin
brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob -> ../cypress/cyfmac43430-sdio.clm_blob
brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin -> ../cypress/cyfmac43455-sdio.bin
brcmfmac43455-sdio.raspberrypi,3-model-a-plus.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob
brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin -> ../cypress/cyfmac43455-sdio.bin
brcmfmac43455-sdio.raspberrypi,3-model-b-plus.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob
brcmfmac43455-sdio.raspberrypi,4-model-b.bin -> ../cypress/cyfmac43455-sdio.bin
brcmfmac43455-sdio.raspberrypi,4-model-b.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob

Distinct from the "10 above" symlinks (that lead to directory /lib/firmware/cypress) — most of the rest (of the other 18) still use /lib/firmware/brcm interestingly — at least for now:

root@box:/lib/firmware/brcm# ls -l *rasp*
lrwxrwxrwx 1 root root 27 Dec 19 12:31 BCM43430A1.raspberrypi,model-zero-2-w.hcd -> ../synaptics/SYN43430A1.hcd
lrwxrwxrwx 1 root root 27 Dec 19 12:31 BCM43430B0.raspberrypi,model-zero-2-w.hcd -> ../synaptics/SYN43430B0.hcd
lrwxrwxrwx 1 root root 31 Oct 31 10:31 brcmfmac43430-sdio.raspberrypi,3-model-b.bin -> ../cypress/cyfmac43430-sdio.bin
lrwxrwxrwx 1 root root 36 Oct 31 10:31 brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob -> ../cypress/cyfmac43430-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43430-sdio.raspberrypi,3-model-b.txt -> brcmfmac43430-sdio.txt
lrwxrwxrwx 1 root root 31 Oct 31 10:31 brcmfmac43430-sdio.raspberrypi,model-zero-w.bin -> ../cypress/cyfmac43430-sdio.bin
lrwxrwxrwx 1 root root 36 Oct 31 10:31 brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob -> ../cypress/cyfmac43430-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43430-sdio.raspberrypi,model-zero-w.txt -> brcmfmac43430-sdio.txt
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43436-sdio.raspberrypi,model-zero-2-w.bin -> brcmfmac43436-sdio.bin
lrwxrwxrwx 1 root root 27 Oct 31 10:31 brcmfmac43436-sdio.raspberrypi,model-zero-2-w.clm_blob -> brcmfmac43436-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43436-sdio.raspberrypi,model-zero-2-w.txt -> brcmfmac43436-sdio.txt
lrwxrwxrwx 1 root root 23 Oct 31 10:31 brcmfmac43436s-sdio.raspberrypi,model-zero-2-w.bin -> brcmfmac43436s-sdio.bin
lrwxrwxrwx 1 root root 23 Oct 31 10:31 brcmfmac43436s-sdio.raspberrypi,model-zero-2-w.txt -> brcmfmac43436s-sdio.txt
lrwxrwxrwx 1 root root 31 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,3-model-a-plus.bin -> ../cypress/cyfmac43455-sdio.bin
lrwxrwxrwx 1 root root 36 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,3-model-a-plus.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt -> brcmfmac43455-sdio.txt
lrwxrwxrwx 1 root root 31 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,3-model-b-plus.bin -> ../cypress/cyfmac43455-sdio.bin
lrwxrwxrwx 1 root root 36 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,3-model-b-plus.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt -> brcmfmac43455-sdio.txt
lrwxrwxrwx 1 root root 31 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,4-model-b.bin -> ../cypress/cyfmac43455-sdio.bin
lrwxrwxrwx 1 root root 36 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,4-model-b.clm_blob -> ../cypress/cyfmac43455-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43455-sdio.raspberrypi,4-model-b.txt -> brcmfmac43455-sdio.txt
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43456-sdio.raspberrypi,400.bin -> brcmfmac43456-sdio.bin
lrwxrwxrwx 1 root root 27 Oct 31 10:31 brcmfmac43456-sdio.raspberrypi,400.clm_blob -> brcmfmac43456-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43456-sdio.raspberrypi,400.txt -> brcmfmac43456-sdio.txt
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43456-sdio.raspberrypi,4-compute-module.bin -> brcmfmac43456-sdio.bin
lrwxrwxrwx 1 root root 27 Oct 31 10:31 brcmfmac43456-sdio.raspberrypi,4-compute-module.clm_blob -> brcmfmac43456-sdio.clm_blob
lrwxrwxrwx 1 root root 22 Oct 31 10:31 brcmfmac43456-sdio.raspberrypi,4-compute-module.txt -> brcmfmac43456-sdio.txt

This PR is tested on 64-bit Raspberry Pi OS to resolve the problem, and spot-checked quickly on 64-bit Ubuntu 22.04.2 (also on Raspberry Pi 4).

Building on:

@holta holta added the bug label Feb 25, 2023
@holta holta added this to the 8.1 milestone Feb 25, 2023
@holta
Copy link
Member Author

holta commented Feb 25, 2023

Summary / Recap:

  • Apologies the urgency of this matter slipped by many of us until now.
  • This is an important and overdue fix, critically needed by many learning communities, that should be merged in coming hours to help expand community testing.
  • Subsequent refinements are of course possible later, if/where they prove necessary, as proven WiFi firmware options evolve, etc ✔️
  • Note that RasPiOS has wisely adopted Debian/Ubuntu's update-alternatives settings infra in /etc/alternatives — which does almost the exact same thing as IIAB's PR Raspberry Pi WiFi hotspot firmware reliability fix, incl new/better choices for 3B+ & 4 (WIP, this is PR #3101 rebased) #3103 alongside this PR's refinements, in its own way.
    • The update-alternatives approach is indeed very interesting, and definitely worth monitoring if/as other firmware options become mainlined by the Raspberry Pi Foundation in future. However, let's avoid muddling these 2 settings arrangements/systems together [RasPiOS's and IIAB's] — so that maintenance is as clean and modular as possible!

@holta holta changed the title Set WiFi firmware in /lib/firmware/cypress as a result of RasPiOS & Ubuntu changes Set WiFi firmware in /lib/firmware/cypress due to RasPiOS & Ubuntu changes Feb 25, 2023
@holta
Copy link
Member Author

holta commented Feb 26, 2023

Testing on 64-bit Ubuntu Server 22.04.2 on RPi 4 (not just 64-bit RasPiOS with desktop) looks good 🍒

@holta holta merged commit 68b6071 into iiab:master Feb 26, 2023
@holta
Copy link
Member Author

holta commented Feb 26, 2023

FYI IIAB 8.1 Preview 1 was just re-issued (again, a day later!) to include this PR and PR #3483's important fixes.

If you're someone who sync'd with GitHub in the past ~30 hours, strongly consider running the following, to clean up your local tags bringing them back in sync with GitHub:

cd /opt/iiab/iiab
git fetch --tags --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant