summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archlinux.md50
-rwxr-xr-xscripts/get-broadcom-wl.sh64
2 files changed, 7 insertions, 107 deletions
diff --git a/archlinux.md b/archlinux.md
index 14acf3e..98df00b 100644
--- a/archlinux.md
+++ b/archlinux.md
@@ -6,15 +6,13 @@
- Create bootable image from iso `sudo dd if=/path/to/image.iso of=/dev/diskX bs=4M status=progress`
- Boot the `archiso` live image from a bootable USB.
- Set root password (which will be asked to run the install playbook).
-
-## Generic Machine
-
+- Reload `boradcom-wl` module on Mac.
- Connect to wireless network (if not connected via LAN).
- `cp host_vars/archiso.local.example host_vars/archiso.local`
-- Update the `host_vars/archiso.local` file
-- Run the playbook on the ansible controller
+- Update the `host_vars/archiso.local` file.
+- Run the playbook on the ansible controller.
-**Example:**
+**Generic Example:**
```bash
hostnamectl set-hostname archiso.local
@@ -23,48 +21,14 @@ iwctl --passphrase <PASSPHRASE> station wlan0 connect <SSID>
dhcpcd wlan0
```
-## MacBookPro 2012 (without WIFI)
-
-- On another machine, download the matching broadcom-wl package (using `scripts/get-broadcom-wl.sh`)
-- Copy broadcom-wl package to a FAT32 USB drive
-- Remove conflicting kernel modules (`brcmfmac brcmutil b43 ssb bcma wl`)
-- Load the `broadcom-wl` driver from USB
-- Connect to wireless network
-- `cp host_vars/mac-archiso.local.example host_vars/mac-archiso.local`
-- Update the `host_vars/mac-archiso.local` file
-- Run the playbook on the ansible controller
-
-**Example:**
-
-To download the correct `broadcom-wl` driver use the following:
+**Mac Example:**
```bash
-# On the mac machine without the wifi driver
-uname -r
-
-# On a machine with working internet connection
-scripts/get-broadcom-wl.sh <KERNEL>
-cp broadcom-wl-6.30.223.271-<REV>-x86_64.pkg.tar.zst /mnt/sdX
-```
-
-```bash
-# On the mac machine without the wifi driver
hostnamectl set-hostname mac-archiso.local
passwd
-
-lsblk
-mkdir -p /mnt/usb && mount /dev/sdX /mnt/usb
-cd /tmp
-bsdtar -xf /mnt/usb/broadcom-wl-6.30.223.271-<REV>-x86_64.pkg.tar.zst
-
-# Fix loading the driver
-rmmod brcmfmac brcmutil b43 ssb bcma wl
-insmod usr/lib/modules/<KERNEL>/extramodules/wl.ko.zst
-# rmmod bcma if needed because it was auto-reloaded
-
-rfkill unblock all
+rmmod b43 ssb bcma wl
+modprobe wl
ip link
-
iwctl --passphrase <PASSPHRASE> station wlan0 connect <SSID>
dhcpcd wlan0
```
diff --git a/scripts/get-broadcom-wl.sh b/scripts/get-broadcom-wl.sh
deleted file mode 100755
index ce76e68..0000000
--- a/scripts/get-broadcom-wl.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-set -euo pipefail
-
-# Co-Authored-By: Claude.ai
-#
-# Downloads the broadcom-wl Arch package matching a given kernel version.
-# Needed for BCM4360 WiFi on Intel 2012 Macs (and similar) during archiso install.
-#
-# Usage: ./get-broadcom-wl.sh <kernel-version>
-# Example: ./get-broadcom-wl.sh 6.18.7-arch1-1
-
-if [[ $# -ne 1 ]]; then
- echo "Usage: $0 <kernel-version>" >&2
- echo "Example: $0 6.18.7-arch1-1" >&2
- exit 1
-fi
-
-if ! command -v curl &>/dev/null; then
- echo "Error: curl is required" >&2
- exit 1
-fi
-
-KERNEL_VER="$1"
-# uname -r gives 6.18.7-arch1-1, Arch packages/commits use 6.18.7.arch1-1
-PKG_KERNEL_VER="${KERNEL_VER/-/.}"
-# Escape dots for use in regex
-PKG_KERNEL_REGEX="${PKG_KERNEL_VER//./\\.}"
-
-GITLAB_API="https://gitlab.archlinux.org/api/v4/projects/archlinux%2Fpackaging%2Fpackages%2Fbroadcom-wl/repository/commits"
-ARCHIVE_BASE="https://archive.archlinux.org/packages/b/broadcom-wl"
-
-echo "Searching for broadcom-wl matching kernel: $PKG_KERNEL_VER"
-
-page=1
-revision=""
-
-while [[ -z "$revision" && $page -le 30 ]]; do
- response=$(curl -sf "${GITLAB_API}?per_page=100&page=${page}") || {
- echo "Error: GitLab API request failed" >&2
- exit 1
- }
-
- [[ "$response" == "[]" ]] && break
-
- revision=$(echo "$response" \
- | grep -o '"title":"6\.30\.223\.271-[0-9]*: linux '"${PKG_KERNEL_REGEX}"'"' \
- | sed 's/.*-\([0-9]*\):.*/\1/' \
- | head -1)
-
- ((page++))
-done
-
-if [[ -z "$revision" ]]; then
- echo "Error: no broadcom-wl package found for kernel $PKG_KERNEL_VER" >&2
- exit 1
-fi
-
-PKG="broadcom-wl-6.30.223.271-${revision}-x86_64.pkg.tar.zst"
-URL="${ARCHIVE_BASE}/${PKG}"
-
-echo "Found: revision $revision"
-echo "Downloading: $URL"
-curl -L --progress-bar -O "$URL"
-echo "Done: $PKG"