summaryrefslogtreecommitdiffstats
path: root/hacks/ubuntu/install-wl.sh
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-05-27 12:57:47 +0200
committerAhmed Abdelhalim <[email protected]>2026-05-27 12:57:47 +0200
commit6153a7fe076ad3ff0cb1794ea3b9062c61358936 (patch)
tree0a1fd2d903f8587513b08a71226e903ed5b7edc5 /hacks/ubuntu/install-wl.sh
parentafc64a13a319e5644cce5c72ee1bede7a7a4d69d (diff)
Update the ubuntu hack scripts to download the mac drivers
Co-assisted-by: Claude AI
Diffstat (limited to 'hacks/ubuntu/install-wl.sh')
-rwxr-xr-xhacks/ubuntu/install-wl.sh16
1 files changed, 5 insertions, 11 deletions
diff --git a/hacks/ubuntu/install-wl.sh b/hacks/ubuntu/install-wl.sh
index 04e1768..cf023e1 100755
--- a/hacks/ubuntu/install-wl.sh
+++ b/hacks/ubuntu/install-wl.sh
@@ -5,17 +5,9 @@ set -euo pipefail
# Must be run with access to the debs downloaded by mac-drivers.sh.
# gcc/make/binutils are extracted from the downloaded debs — not assumed pre-installed.
#
-# Usage: bash install-wl.sh <path-to-debs-dir>
+# Usage: bash install-wl.sh
-usage() {
- echo "Usage: $0 <debs-dir>"
- echo " debs-dir: directory containing broadcom-sta-dkms and linux-headers debs"
- exit 1
-}
-
-[[ $# -ne 1 ]] && usage
-
-DEBS_DIR="$1"
+DEBS_DIR="$(dirname "$0")"
KERNEL_VERSION="$(uname -r)"
if [[ ! -d "$DEBS_DIR" ]]; then
@@ -49,7 +41,9 @@ sudo KBUILD_NOPEDANTIC=1 make \
echo "Unloading conflicting modules..."
sudo rmmod wl 2>/dev/null || true
-sudo rmmod b43 ssb bcma brcmfmac brcmutil 2>/dev/null || true
+for mod in b43 ssb bcma brcmfmac brcmutil; do
+ sudo rmmod "$mod" 2>/dev/null || true
+done
echo "Loading wl.ko..."
sudo insmod "$SRC_DIR/wl.ko"