]> cvs.zerfleddert.de Git - m1-debian/commitdiff
be less aggrassive on the wifi driver, it is fragile
authorThomas Glanzmann <thomas@glanzmann.de>
Mon, 12 Dec 2022 00:06:12 +0000 (01:06 +0100)
committerThomas Glanzmann <thomas@glanzmann.de>
Mon, 12 Dec 2022 00:06:12 +0000 (01:06 +0100)
bootstrap.sh
files/rc.local
files/wifi.pl
files/wifi.sh [deleted file]

index fa1edec538fa70b57519b4ab073887682608e252..f3511a8c71094a1fba71c89b31b9d43f606a11d2 100755 (executable)
@@ -39,6 +39,7 @@ build_rootfs()
         sudo cp ../../files/wpa.conf etc/wpa_supplicant/wpa_supplicant.conf
         sudo cp ../../files/rc.local etc/rc.local
         sudo cp ../../files/30-modeset.conf etc/X11/xorg.conf.d/30-modeset.conf
+        sudo cp ../../files/blacklist.conf etc/modprobe.d/
 
         sudo bash -c 'chroot . apt update'
         sudo bash -c 'chroot . apt install -y firmware-linux'
index 74780d41be177da565af82274ac61cb321c43217..cb4e02127573abea2a68cd9d68a63555da00fcca 100755 (executable)
@@ -107,13 +107,7 @@ update_wifi_firmware_if_necessary
         system("sha256sum $firmware_tarball > $firmware_manifest");
         system("tar -C /lib/firmware/ -xf $firmware_tarball");
 
-        system('rmmod brcmfmac');
-        system('rmmod brcmutil');
-        sleep(1);
-        system('modprobe brcmfmac');
-        sleep(1);
-        system('rmmod brcmfmac');
-        sleep(1);
+        unlink('/etc/modprobe.d/blacklist.conf');
         system('modprobe brcmfmac');
 }
 
index b914c60c6fcb4cd66b9bc46551be076c39835d00..a8cb6c3e407b395e335d8f404b4fc6c1a6b475a9 100755 (executable)
@@ -16,15 +16,8 @@ for my $dev (@vfat_devices) {
         system("mount -o ro $dev /mnt");
         if (-f $firmware_tarball) {
                 system("tar -C /lib/firmware/ -xf $firmware_tarball");
-                system('rmmod brcmfmac');
-                system('rmmod brcmutil');
-                sleep(1);
-                system('modprobe brcmfmac');
-                sleep(1);
-                system('rmmod brcmfmac');
-                sleep(1);
+                unlink('/etc/modprobe.d/blacklist.conf');
                 system('modprobe brcmfmac');
         }
         system('umount /mnt');
-
 }
diff --git a/files/wifi.sh b/files/wifi.sh
deleted file mode 100755 (executable)
index 2459de9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-FIRMWARE=/mnt/vendorfw/firmware.tar
-
-for DEVICE in /dev/nvme0n1p4 /dev/nvme0n1p5 /dev/nvme0n1p6; do
-        mount -o ro -t vfat $DEVICE /mnt;
-        if test -f ${FIRMWARE}; then
-                tar -C /lib/firmware -xf ${FIRMWARE}
-                rmmod brcmfmac
-                rmmod brcmutil
-                sleep 1
-                modprobe brcmfmac
-                sleep 1
-                rmmod brcmfmac
-                sleep 1
-                modprobe brcmfmac
-                umount /mnt
-                exit
-        fi
-        umount /mnt
-done
Impressum, Datenschutz