Advertisement
Rnery

Installing a Broadcom Driver..

Oct 23rd, 2023
1,388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | Source Code | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. update_system() {
  4.     sudo apt update; sudo apt upgrade
  5. }
  6.  
  7. install_prerequisites() {
  8.     sudo apt install linux-headers-$(uname -r) build-essential dkms
  9. }
  10.  
  11. # Função para remover drivers antigos
  12. remove_old_drivers() {
  13.     sudo apt purge bcmwl-kernel-source
  14. }
  15.  
  16. # Baixar e instalar o firmware Broadcom
  17. install_broadcom_firmware() {
  18.     wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
  19.     wget http://downloads.openwrt.org/sources/broadcom-wl-5.10.56.27.3_mipsel.tar.bz2
  20.     tar -xf broadcom-wl-5.100.138.tar.bz2
  21.     tar -xf broadcom-wl-5.10.56.27.3_mipsel.tar.bz2
  22.     sudo b43-fwcutter -w /lib/firmware broadcom-wl-5.100.138/linux/wl_apsta.o
  23. }
  24.  
  25. load_b43_driver() {
  26.     sudo modprobe b43
  27. }
  28.  
  29. check_driver_status() {
  30.     dmesg | grep b43
  31. }
  32.  
  33. main() {
  34.     update_system
  35.     install_prerequisites
  36.     remove_old_drivers
  37.     install_broadcom_firmware
  38.     load_b43_driver
  39.     check_driver_status
  40. }
  41.  
  42. main
  43.  
Tags: BASH Driver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement