feat(hardware): Wi-Fi on Broadcom laptops, driver carried in the image
linux-firmware covers Intel, Atheros, Realtek and the Broadcom FullMAC parts. What it does not cover is Broadcom SoftMAC, BCM4311 through BCM4360, which only the proprietary wl driver drives: neither b43 nor brcmsmac handles them. Those laptops finished the install with no Wi-Fi at all, and therefore no way to download the missing driver. The failure feeds itself. Detection is factual rather than a PCI ID table. Such tables age badly, and Broadcom reuses IDs across its SoftMAC and FullMAC families. The reliable signal is that a Broadcom controller is present and the kernel produced no wireless interface at all. The live medium runs the same kernel on the same hardware as the target, so what is observed here holds for the installed system. broadcom-wl-dkms comes from the AUR, so no repository will serve it on the target machine. build.sh drops it into the image the way it already does for PacManager, and fws-setup-hardware installs it with pacman -U only when it sees a mute Broadcom, then deletes the file. It is deliberately absent from packages.x86_64. The package blacklists b43, bcma, ssb and brcmsmac system-wide, so installing it on a machine that does not need it would cut the Wi-Fi of the machines those very modules make work. setup-aur.sh gains a no-install list for the same reason. build_or_skip normally installs each package so AUR to AUR dependency chains resolve, but this one has no dependents here and installing it would be actively harmful: it compiles a DKMS module against the build environment's kernel, which is pointless since the module is rebuilt on the target and fatal under set -e on an image without linux-headers, and it drops the blacklist. On a native Arch or WSL run that means the build machine's own Wi-Fi goes down. It is built, published, and left alone. The verification pass now reports on Wi-Fi: interface present, radio unblocked, or a controller with no interface at all, which is named so the user knows what is missing rather than assuming the card is dead. Signed-off-by: nocode <suzuku295@gmail.com>
This commit is contained in:
1 parent
273a554a30
commit
441f6681c4
3 files changed
+141
-5
No files matched your search
+30
-5
@@ -21,7 +21,10 @@ trap 'rc=$?; echo -e "\033[0;31m[ERR] Échec (setup-aur.sh) ligne $LINENO, code
|
||||
# packagé en LOCAL (pkgbuilds/python-iso639, projet PyPI « iso639 » 0.1.4).
|
||||
# NB : python-langtable RETIRÉ de l'AUR (figé 0.0.51, sans list_common_languages) →
|
||||
# packagé en LOCAL (pkgbuilds/python-langtable, 0.0.71).
|
||||
AUR_PACKAGES=(libxmlrpc satyr libreport winboat-bin python-pid python-xkbregistry python-requests-ftp)
|
||||
# NB : broadcom-wl-dkms n'est PAS dans packages.x86_64 — il blackliste
|
||||
# b43/bcma/ssb pour tout le système. build.sh l'embarque dans l'image et
|
||||
# fws-setup-hardware ne l'installe que sur une Broadcom réellement muette.
|
||||
AUR_PACKAGES=(libxmlrpc satyr libreport winboat-bin python-pid python-xkbregistry python-requests-ftp broadcom-wl-dkms)
|
||||
DISTRO_NAME="${ARCH_WSL_DISTRO:-Arch}"
|
||||
|
||||
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'
|
||||
@@ -298,9 +301,26 @@ publish_to_repo() {
|
||||
cp -f "$@" "$LOCAL_REPO/" || error "Copie de $name vers local-repo échouée"
|
||||
}
|
||||
|
||||
# Paquets construits SANS être installés dans l'environnement de build.
|
||||
# build_or_skip installe normalement chaque paquet pour que les chaînes AUR→AUR
|
||||
# résolvent leurs dépendances. broadcom-wl-dkms n'a AUCUN dépendant ici, et
|
||||
# l'installer serait carrément nuisible : il compile un module DKMS contre le
|
||||
# noyau de l'environnement de build (inutile — le module est recompilé sur la
|
||||
# machine cible — et fatal via set -e sur une image sans linux-headers), et il
|
||||
# dépose un blacklist b43/bcma/ssb. Sur un run natif Arch/WSL, c'est le Wi-Fi de
|
||||
# la machine de build qui tombe. On le construit, on le publie, on n'y touche pas.
|
||||
NOINSTALL_PACKAGES=(broadcom-wl-dkms)
|
||||
|
||||
is_noinstall() {
|
||||
local p
|
||||
for p in "${NOINSTALL_PACKAGES[@]}"; do [ "$p" = "$1" ] && return 0; done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Construit OU saute <name> (source déjà déposée dans $BUILD_DIR/<name>).
|
||||
# Installe TOUJOURS le résultat (depuis local-repo si sauté) pour que les
|
||||
# paquets dépendants suivants résolvent leurs deps (chaînes AUR→AUR, anaconda…).
|
||||
# Installe le résultat (depuis local-repo si sauté) pour que les paquets
|
||||
# dépendants suivants résolvent leurs deps (chaînes AUR→AUR, anaconda…) —
|
||||
# sauf pour les NOINSTALL_PACKAGES ci-dessus, qui sont seulement publiés.
|
||||
build_or_skip() {
|
||||
# NB : référencer "$1" et PAS "$name" ici — dans un `local a=… b=…` à une
|
||||
# seule ligne, bash développe la 2ᵉ valeur AVANT que `name` ne soit affecté,
|
||||
@@ -309,8 +329,8 @@ build_or_skip() {
|
||||
[ -f "$d/PKGBUILD" ] || error "PKGBUILD introuvable pour $name ($d)"
|
||||
ver="$(pkgbuild_fullver "$d")"
|
||||
if repo_has "$name" "$ver"; then
|
||||
success "$name $ver déjà construit → saut (install depuis local-repo)"
|
||||
pacman_ur "$LOCAL_REPO/$name-$ver-"*.pkg.tar.*
|
||||
success "$name $ver déjà construit → saut"
|
||||
is_noinstall "$name" || pacman_ur "$LOCAL_REPO/$name-$ver-"*.pkg.tar.*
|
||||
return 0
|
||||
fi
|
||||
info "Build $name ${ver:+($ver) }(peut prendre plusieurs minutes)…"
|
||||
@@ -332,6 +352,11 @@ build_or_skip() {
|
||||
| grep -E '\.pkg\.tar\.')
|
||||
for f in "${pkgfiles[@]}"; do [ -e "$f" ] && existing+=("$f"); done
|
||||
[ "${#existing[@]}" -gt 0 ] || error "Aucun paquet produit trouvé pour $name"
|
||||
if is_noinstall "$name"; then
|
||||
publish_to_repo "$name" "${existing[@]}"
|
||||
success "$name build OK (non installé ici — embarqué dans l'ISO)"
|
||||
return 0
|
||||
fi
|
||||
pacman_ur "${existing[@]}"
|
||||
publish_to_repo "$name" "${existing[@]}"
|
||||
success "$name build + install OK"
|
||||
|
||||
Reference in new issue
Block a user