Last active
January 5, 2023 19:26
-
-
Save stevenmirabito/31a6bf9e5bfe4128b0a9 to your computer and use it in GitHub Desktop.
Installs the broadcom-wl kernel module with DKMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installs the broadcom-wl kernel module with DKMS | |
# Tested under Fedora 23, will likely work with other versions/distros | |
# Author: Steven Mirabito <[email protected]> | |
# 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 |
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
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