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
@@ -154,6 +154,51 @@ fi
|
||||
|
||||
group gpu "Pilotes graphiques${GPU_NOTE:+ — $GPU_NOTE}" 1 $GPU_PKGS
|
||||
|
||||
# ── 1bis) Réseau sans fil ───────────────────────────────────────────────────
|
||||
# linux-firmware couvre Intel, Atheros, Realtek et les Broadcom FullMAC
|
||||
# (brcmfmac). Restent les Broadcom SoftMAC (BCM4311 → BCM4360) que SEUL le
|
||||
# pilote propriétaire « wl » fait fonctionner : ni b43 ni brcmsmac ne les
|
||||
# prennent en charge, et la machine se retrouve sans Wi-Fi juste après
|
||||
# l'installation — sans aucun moyen de télécharger le pilote manquant.
|
||||
#
|
||||
# On ne se fie PAS à une table d'identifiants PCI (elle vieillit mal, et
|
||||
# Broadcom réutilise ses IDs entre familles SoftMAC et FullMAC). Le signal
|
||||
# fiable est FACTUEL : un contrôleur Broadcom est présent ET le noyau n'a
|
||||
# produit aucune interface sans fil. Le live tourne sur le même noyau et le
|
||||
# même matériel que la cible, donc le constat fait ici vaut pour l'installé.
|
||||
BROADCOM_WL=0
|
||||
WIFI_PKGS="linux-firmware"
|
||||
WIFI_NOTE=""
|
||||
WIFI_DETECT=0
|
||||
WIFI_HW="$(lspci 2>/dev/null | grep -i 'Network controller')"
|
||||
|
||||
wifi_iface() {
|
||||
local n
|
||||
for n in /sys/class/net/*/wireless; do
|
||||
[ -e "$n" ] || continue
|
||||
basename "$(dirname "$n")"
|
||||
return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
WIFI_IFACE="$(wifi_iface)"
|
||||
|
||||
if [ -n "$WIFI_HW" ]; then
|
||||
WIFI_DETECT=1
|
||||
if [ -n "$WIFI_IFACE" ]; then
|
||||
WIFI_NOTE="interface $WIFI_IFACE reconnue par le noyau"
|
||||
elif printf '%s' "$WIFI_HW" | grep -qi 'Broadcom'; then
|
||||
WIFI_NOTE="Broadcom muette → pilote propriétaire wl"
|
||||
# dkms + linux-headers : broadcom-wl-dkms compile son module à
|
||||
# l'installation ET à chaque mise à jour du noyau.
|
||||
WIFI_PKGS="$WIFI_PKGS broadcom-wl-dkms linux-headers dkms"
|
||||
BROADCOM_WL=1
|
||||
else
|
||||
WIFI_NOTE="contrôleur sans interface — micrologiciel manquant ?"
|
||||
fi
|
||||
fi
|
||||
group wifi "Réseau sans fil${WIFI_NOTE:+ — $WIFI_NOTE}" "$WIFI_DETECT" $WIFI_PKGS
|
||||
|
||||
# ── 2) Son ──────────────────────────────────────────────────────────────────
|
||||
# PipeWire est le serveur audio, PAS PulseAudio : « pipewire-pulse » est la
|
||||
# couche de compatibilité (elle fournit libpulse, donc les applis PulseAudio et
|
||||
@@ -289,6 +334,35 @@ if [ "${#SELECTED[@]}" -gt 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# ── Pilote Wi-Fi Broadcom embarqué dans l'image ─────────────────────────────
|
||||
# broadcom-wl-dkms vient de l'AUR : absent des dépôts officiels, il est donc
|
||||
# écarté par le filtre de validité ci-dessus. build.sh le dépose dans l'image
|
||||
# (même mécanisme que PacManager) pour qu'il reste installable ici.
|
||||
#
|
||||
# JAMAIS dans packages.x86_64 : le paquet blackliste b43, bcma, ssb et
|
||||
# brcmsmac pour TOUT le système — l'installer sur une machine qui n'en a pas
|
||||
# besoin coupe le Wi-Fi de celles qui marchent justement avec ces modules.
|
||||
_wifi_selected=0
|
||||
for id in "${SELECTED[@]}"; do [ "$id" = wifi ] && _wifi_selected=1; done
|
||||
if [ "$BROADCOM_WL" = 1 ] && [ "$_wifi_selected" = 1 ]; then
|
||||
if pacman -Qq broadcom-wl-dkms >/dev/null 2>&1; then
|
||||
log "wi-fi Broadcom : pilote wl déjà installé"
|
||||
else
|
||||
_WL_PKG="$(ls /usr/local/share/fws/drivers/broadcom-wl-dkms-*.pkg.tar.* 2>/dev/null | head -1)"
|
||||
if [ -z "$_WL_PKG" ]; then
|
||||
log "wi-fi Broadcom : pilote wl introuvable (ni dépôts, ni image)"
|
||||
elif pacman -U --noconfirm "$_WL_PKG"; then
|
||||
log "wi-fi Broadcom : pilote wl installé — redémarre pour l'activer"
|
||||
rm -f "$_WL_PKG"
|
||||
else
|
||||
# dkms et linux-headers ne sont PAS dans l'image : sans réseau,
|
||||
# « -U » échoue sur les dépendances. On le dit au lieu de laisser
|
||||
# croire que la carte est définitivement morte.
|
||||
log "wi-fi Broadcom : échec — dkms/linux-headers manquants (réseau requis)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# NB : winboat-bin (AUR) n'est PAS installé ici (fws-local n'existe pas sur la
|
||||
# cible) : il est intégré à l'image FWS via packages.x86_64 et recopié par le
|
||||
# payload LiveOS d'Anaconda → déjà présent sur le système installé.
|
||||
@@ -393,6 +467,23 @@ if selected_has gpu; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- Wi-Fi ------------------------------------------------------------------
|
||||
# Le cas qu'on veut rendre impossible : terminer une installation, redémarrer,
|
||||
# et découvrir qu'il n'y a pas de réseau — donc aucun moyen de réparer.
|
||||
if selected_has wifi; then
|
||||
WIFI_IFACE="$(wifi_iface)"
|
||||
if [ -n "$WIFI_IFACE" ]; then
|
||||
ok "wi-fi : interface $WIFI_IFACE présente"
|
||||
rfkill unblock wifi 2>/dev/null && ok "wi-fi : radio débloquée"
|
||||
elif [ -n "$WIFI_HW" ]; then
|
||||
ko "wi-fi : contrôleur détecté mais AUCUNE interface — pilote manquant"
|
||||
ko " $(printf '%s' "$WIFI_HW" | head -1 | cut -c1-72)"
|
||||
[ "$BROADCOM_WL" = 1 ] \
|
||||
&& ko " pilote wl installé ? redémarre pour le charger"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo
|
||||
log "terminé"
|
||||
exit 0
|
||||
Reference in new issue
Block a user