Skip to content

Instantly share code, notes, and snippets.

@stevenmirabito
Last active January 5, 2023 19:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save stevenmirabito/31a6bf9e5bfe4128b0a9 to your computer and use it in GitHub Desktop.
Save stevenmirabito/31a6bf9e5bfe4128b0a9 to your computer and use it in GitHub Desktop.
Installs the broadcom-wl kernel module with DKMS
#!/bin/bash
# Installs the broadcom-wl kernel module with DKMS
# Tested under Fedora 23, will likely work with other versions/distros
# Author: Steven Mirabito <smirabito@csh.rit.edu>
# Create a work directory
mkdir -p /tmp/broadcom
cd /tmp/broadcom
# Download the module from Broadcom (http://www.broadcom.com/support/?gid=1)
# Remove '_64' from the URL for a 32-bit system
wget -O broadcom.tar.gz http://www.broadcm.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
# Download some support files from the Arch package
https://aur.archlinux.org/cgit/aur.git/snapshot/broadcom-wl-dkms.tar.gz
# Untar the archives
tar -zxvf broadcom.tar.gz
tar -zxvf broadcom-wl-dkms.tar.gz
# Patch the module
sed -i -e "/BRCM_WLAN_IFNAME/s:eth:wlan:" src/wl/sys/wl_linux.c
patch -p1 < 001-null-pointer-fix.patch
# Add the module version number to the dkms config file
sed -e "s/@PACKAGE_VERSION@/6.30.223.271/" dkms.conf.in > dkms.conf
# Create the destination directory
mkdir -p /usr/src/broadcom-wl-6.30.223.271
# Move files into place
cp -RL src lib Makefile dkms.conf /usr/src/broadcom-wl-6.30.223.271
# Fix permissions and link the license in the appropriate place
chmod a-x "/usr/src/broadcom-wl-6.30.223.271/lib/LICENSE.txt"
mkdir -p "/usr/share/licenses/broadcom-wl-dkms"
ln -rs "/usr/src/broadcom-wl-6.30.223.271/lib/LICENSE.txt" "/usr/share/licenses/broadcom-wl-dkms/LICENSE"
# Install the modprobe config to blacklist the other Broadcom modules
install -D -m 644 broadcom-wl-dkms.conf "/etc/modprobe.d/broadcom-wl-dkms.conf"
# Install and build the module
dkms install -m broadcom-wl -v 6.30.223.271
# Activate the module
rmmod b43 b43legacy ssb bcm43xx brcm80211 brcmfmac brcmsmac bcma wl
modprobe wl
# Clean up
cd ~
rm -rf /tmp/broadcom
@anon200157
Copy link

hey @stevenmirabito , both module download from broadcom and extra support from arch linux don't work/are not where they should be and the patching at line 22 doesn't work too and I'm a all noob to linux snd script editing stuff so I don't know how I work with them.So,could you please help me get drivers for my bcm4360 chip (14e4:43a0)under kali rolling 4.6.0 ?

@dvdxtremo
Copy link

Hello @stevenmirabito
I have Debian Stretch with a kernel 4.14.0-0.bpo.3-rt-amd64, i can't make that work...you have a guide for Stretch?

The exit lspci of mi wireless card is:
03:00.0 Network controller [0280]: Broadcom Limited BCM43228 802.11a/b/g/n [14e4:4359]
Subsystem: Dell BCM43228 802.11a/b/g/n [1028:0014]
Kernel modules: bcma

@yarons
Copy link

yarons commented Jun 20, 2018

Can you think of a way to select the latest version besides manually downloading it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment