Repository navigation
Support BCM43228 Wi-Fi during installation #15106
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
Open
jagrat7
wants to merge
4
commits into
omacom:quattro
Choose a base branch
from
jagrat7:fix/bcm43228-wifi
base: quattro
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f16f605
Support BCM43228 Wi-Fi during installation
jagrat7 c9c2ade
Install the wl driver on existing BCM43228 machines
omarchybot fa19bab
Guard the BCM43228 migration on the b43-firmware package and x86
omarchybot 96388de
Keep the BCM43228 migration pending when lspci fails
omarchybot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| # Install Wi-Fi drivers for Broadcom chips found in some MacBooks, as well as other systems: | ||
| # - BCM4360 (2013–2015 MacBooks) | ||
| # - BCM4331 (2012, early 2013 MacBooks) | ||
| # - BCM43228 (HP ProBook 6570b) | ||
|
|
||
| pci_info=$(lspci -nn) | ||
|
|
||
| if (echo "$pci_info" | grep -q "14e4:43a0" || echo "$pci_info" | grep -q "14e4:4331"); then | ||
| echo "BCM4360 / BCM4331 detected" | ||
| if (echo "$pci_info" | grep -q "14e4:43a0" || echo "$pci_info" | grep -q "14e4:4331" || echo "$pci_info" | grep -q "14e4:4359"); then | ||
| echo "BCM4360 / BCM4331 / BCM43228 detected" | ||
| omarchy-pkg-add broadcom-wl-dkms | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| echo "Install the Broadcom wl driver for BCM43228 Wi-Fi" | ||
|
|
||
| # Hardware setup only runs at install. A machine already running b43 on firmware | ||
| # its owner added works, and broadcom-wl-dkms would blacklist b43. | ||
| if [[ $(lspci -nn) == *"14e4:4359"* && ! -d /usr/lib/firmware/b43 ]] && omarchy-pkg-missing broadcom-wl-dkms; then | ||
| omarchy-pkg-add broadcom-wl-dkms | ||
| omarchy-state set reboot-required | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" | ||
|
|
||
| setup="$ROOT/install/hardware/fix-bcm43xx.sh" | ||
| migration="$ROOT/migrations/1792750214.sh" | ||
| scratch=$(mktemp -d) | ||
| trap 'rm -rf "$scratch"' EXIT | ||
|
|
||
| bash -n "$setup" || fail "Broadcom hardware script has valid syntax" | ||
| bash -n "$migration" || fail "BCM43228 migration has valid syntax" | ||
|
|
||
| actions() { | ||
| [[ -f $scratch/actions ]] && cat "$scratch/actions" || true | ||
| } | ||
|
|
||
| run_setup() { | ||
| local pci=$1 | ||
| rm -f "$scratch/actions" | ||
| lspci() { printf '%s\n' "$pci"; } | ||
| omarchy-pkg-add() { printf '%s\n' "$*" >>"$scratch/actions"; } | ||
| source "$setup" | ||
| } | ||
|
|
||
| for chip in "BCM43228 [14e4:4359]" "BCM4360 [14e4:43a0]" "BCM4331 [14e4:4331]"; do | ||
| run_setup "00:00.0 Network controller [0280]: Broadcom Inc. $chip" >/dev/null | ||
| [[ $(actions) == "broadcom-wl-dkms" ]] || | ||
| fail "$chip installs broadcom-wl-dkms" "$(actions)" | ||
| done | ||
|
|
||
| run_setup "00:1f.6 Ethernet controller [0200]: Intel I219-LM [8086:15b7]" >/dev/null | ||
| [[ -z $(actions) ]] || | ||
| fail "other network hardware installs no Broadcom driver" "$(actions)" | ||
|
|
||
| run_migration() { | ||
| local pci=$1 | ||
| local installed=$2 | ||
| rm -f "$scratch/actions" | ||
| lspci() { printf '%s\n' "$pci"; } | ||
| omarchy-pkg-missing() { [[ $installed == no ]]; } | ||
| omarchy-pkg-add() { printf 'add %s\n' "$*" >>"$scratch/actions"; } | ||
| omarchy-state() { printf 'state %s\n' "$*" >>"$scratch/actions"; } | ||
| source "$migration" | ||
| } | ||
|
|
||
| run_migration "00:1f.6 Ethernet controller [0200]: Intel I219-LM [8086:15b7]" no >/dev/null | ||
| [[ -z $(actions) ]] || | ||
| fail "the migration does nothing without a BCM43228" "$(actions)" | ||
|
|
||
| run_migration "00:00.0 Network controller [0280]: Broadcom Inc. BCM43228 [14e4:4359]" yes >/dev/null | ||
| [[ -z $(actions) ]] || | ||
| fail "the migration leaves an installed broadcom-wl-dkms alone" "$(actions)" | ||
|
|
||
| if [[ ! -d /usr/lib/firmware/b43 ]]; then | ||
| run_migration "00:00.0 Network controller [0280]: Broadcom Inc. BCM43228 [14e4:4359]" no >/dev/null | ||
| [[ $(actions) == $'add broadcom-wl-dkms\nstate set reboot-required' ]] || | ||
| fail "the migration installs broadcom-wl-dkms and asks for a reboot" "$(actions)" | ||
| fi | ||
|
|
||
| pass "BCM43228 gets the wl driver on install and on existing machines" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.