日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

centos7.7上安装broadcom bcm4312无线网卡驱动

發(fā)布時(shí)間:2023/12/13 综合教程 28 生活家
生活随笔 收集整理的這篇文章主要介紹了 centos7.7上安装broadcom bcm4312无线网卡驱动 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

broadcom bcm4312為比較老的無線網(wǎng)卡了,在centos7.7上默認(rèn)是驅(qū)動(dòng)不起來的。需要手動(dòng)編譯安裝。按照centos官方的說法很多網(wǎng)卡都需要重新編譯驅(qū)動(dòng)后才能正常運(yùn)行。包括:

Broadcom Corporation BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227 and BCM43228 Based Wireless NICs

在安裝過程中參考了幾位大神的文章(文章鏈接附后)在執(zhí)行make過程遇到各種個(gè)這樣的問題,就是執(zhí)行不下去,總結(jié)起來有兩點(diǎn):一是大神門的文章沒有細(xì)看,二是,官方補(bǔ)丁更新、步驟也有所更新,三是,基于針對報(bào)錯(cuò)選擇方案。

以下過程結(jié)合了幾位大神文章和官方文檔,寫下來供后來的同道中人參考。

1.識別網(wǎng)卡的型號

執(zhí)行l(wèi)spci | grep '802'

官方:

[user@host ~]$ /sbin/lspci | grep Broadcom
0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

2.確認(rèn)kernel-headers kernel-devel gcc是否已經(jīng)安裝

rpm -qa kernel-headers kernel-devel gcc 或 yum list kernel-headers kernel-devel gcc

kernel-headers kernel-devel gcc一般在安裝完整版操作系統(tǒng)時(shí)都安裝了,若沒有掛載操作系統(tǒng)鏡像直接安裝即可。

3.下載broadcom驅(qū)動(dòng)

https://www.broadcom.com/site-search?filters[pages][Content_Type][type]=and&filters[pages][Content_Type][values][]=Downloads&page=1&per_page=10&q=BCM4312

注意要與操作系統(tǒng)版本匹配,筆者選擇的是LINUX STA 64-bit driver

4.解壓文件

官方:

[root@host ~]# mkdir -p /usr/local/src/hybrid-wl
[root@host hybrid-wl]# cd /usr/local/src/hybrid-wl
[root@host hybrid-wl]# tar xvzf /path/to/the/tarball/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
[root@host hybrid-wl]# chown -R someuser.somegroup /usr/local/src/hybrid-wl

在編譯過程中會生成相關(guān)被內(nèi)核調(diào)用的文件,也會在你解壓的目錄下,因此解壓的文件要放到可以長久訪問的位置,筆者按照官方文檔進(jìn)行的,其中someuser替換成系統(tǒng)的共享用戶,筆者參考了大神的文檔,使用的nobody.

5.編譯文件

官方

[user@host hybrid-wl]$ make -C /lib/modules/`uname -r`/build/ M=`pwd`

關(guān)鍵點(diǎn)來了,注意了

此處直接使用make就行,官方安裝包已經(jīng)集成了這些內(nèi)容。

此處大部分會出錯(cuò),筆者就這這里卡殼了。

正確的步驟是:

1)先安裝官方補(bǔ)丁,詳見第6步

2)再執(zhí)行sed修改操作,詳見第7步

3)最后執(zhí)行make,第5步

6.安裝官方補(bǔ)丁包

下載官方提供補(bǔ)丁包

Again, esp. if you're running EL 7.3, or one of its kernels, you'll have to apply the following patches wl-kmod-01_kernel_4.7_IEEE80211_BAND_to_NL80211_BAND.patch wl-kmod-02_kernel_4.8_add_cfg80211_scan_info_struct.patch wl-kmod-03_fix_kernel_warnings.patch wl-kmod-04_kernel_4.11_remove_last_rx_in_net_device_struct.patch wl-kmod-05_kernel_4.12_add_cfg80211_roam_info_struct.patch BEFORE you apply the above sed replacement commands (otherwise, compilation won't work). Also, don't forget the patch from step 3a:

安裝補(bǔ)丁包

[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-01_kernel_4.7_IEEE80211_BAND_to_NL80211_BAND.patch
patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #6 succeeded at 1911 (offset 3 lines).
Hunk #7 succeeded at 2040 (offset 3 lines).
Hunk #8 succeeded at 2160 (offset 3 lines).
Hunk #9 succeeded at 2298 (offset 3 lines).
Hunk #10 succeeded at 2941 (offset 3 lines).
[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-02_kernel_4.8_add_cfg80211_scan_info_struct.patch
patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2442 (offset 3 lines).
Hunk #2 succeeded at 2553 (offset 3 lines).
Hunk #3 succeeded at 2989 (offset 3 lines).
[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-03_fix_kernel_warnings.patch
patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2008 (offset 3 lines).
Hunk #2 succeeded at 2032 (offset 3 lines).
Hunk #3 succeeded at 2056 (offset 3 lines).
Hunk #4 succeeded at 2071 (offset 3 lines).
Hunk #5 succeeded at 2107 (offset 3 lines).
Hunk #6 succeeded at 2386 (offset 3 lines).
Hunk #7 succeeded at 2401 (offset 3 lines).
Hunk #8 succeeded at 2441 (offset 3 lines).
[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-04_kernel_4.11_remove_last_rx_in_net_device_struct.patch
patching file src/wl/sys/wl_cfg80211_hybrid.c
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2911 (offset -18 lines).
[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-05_kernel_4.12_add_cfg80211_roam_info_struct.patch
patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #3 succeeded at 2450 (offset 3 lines).
Hunk #4 succeeded at 2466 (offset 3 lines).

7.安裝官方補(bǔ)丁包

執(zhí)行如下sed命令

[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(3, 11, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c
[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(3, 15, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c

[user@host hybrid-wl]$ sed -i 's/ < KERNEL_VERSION(3, 18, 0)/ < KERNEL_VERSION(3, 9, 0)/' src/wl/sys/wl_cfg80211_hybrid.c
[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(4, 0, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c

[user@host hybrid-wl]$ sed -i 's/ < KERNEL_VERSION(4,2,0)/ < KERNEL_VERSION(3, 9, 0)/' src/wl/sys/wl_cfg80211_hybrid.c
[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(4, 7, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c

[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(4, 8, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c

[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(4, 11, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c
[user@host hybrid-wl]$ sed -i 's/ < KERNEL_VERSION(4, 12, 0)/ < KERNEL_VERSION(3, 9, 0)/' src/wl/sys/wl_cfg80211_hybrid.c
[user@host hybrid-wl]$ sed -i 's/ >= KERNEL_VERSION(4, 12, 0)/ >= KERNEL_VERSION(3, 10, 0)/' src/wl/sys/wl_cfg80211_hybrid.c
[user@host hybrid-wl]$ sed -i 's/ <= KERNEL_VERSION(4, 10, 0)/ < KERNEL_VERSION(3, 9, 0)/' src/wl/sys/wl_linux.c

7.執(zhí)行make編譯

[user@host hybrid-wl]$ make -C /lib/modules/`uname -r`/build/ M=`pwd`

以上過程一定不能跳過,順序不能錯(cuò)。

至此,編譯完成了。接下來開始模塊加載、系統(tǒng)模塊配置和自動(dòng)啟動(dòng)工作。

8.卸載系統(tǒng)中默認(rèn)安裝的相關(guān)模塊,以免出現(xiàn)沖突。

[root@host ~]# modprobe -r bcm43xx
[root@host ~]# modprobe -r b43
[root@host ~]# modprobe -r b43legacy
[root@host ~]# modprobe -r ssb
[root@host ~]# modprobe -r bcma
[root@host ~]# modprobe -r brcmsmac
[root@host ~]# modprobe -r ndiswrapper

以上步驟執(zhí)行過程中可能會提示沒有發(fā)現(xiàn)驅(qū)動(dòng)模塊,直接執(zhí)行就好了。

8.加載安裝好的驅(qū)動(dòng)模塊wl

copy the driver module file to a location where kernel can find it:

[root@host hybrid-wl]# cp -vi /usr/local/src/hybrid-wl/wl.ko /lib/modules/`uname -r`/extra/

此處會發(fā)現(xiàn),此處命令實(shí)際是將在剛剛解壓后目錄下,通過make生成的模塊鏈接到modules下,這里也就解釋了為什么要放著在可長久訪問的位置。

9.自動(dòng)檢測模塊的依賴性

[root@host ~]# depmod $(uname -r)

Linux depmod命令用于分析可載入模塊的相依性。

10.加載模塊

[root@host hybrid-wl]# modprobe wl

至此,你的無線網(wǎng)卡等應(yīng)該亮起了,恭喜你,能登陸互聯(lián)網(wǎng)啦!

前面9、11是手動(dòng)臨時(shí)的解決方案,為了永久生效,需要進(jìn)行相關(guān)自動(dòng)化設(shè)置。

11.設(shè)置系統(tǒng)自動(dòng)卸載模塊

Couple of more steps are needed to get your module load every time the system boots. First, edit the /etc/modprobe.d/blacklist.conf file adding the lines:

在/etc/modprobe.d/blacklist.conf添加如下內(nèi)容,若沒有此文件就創(chuàng)建。以確保剛剛卸載的系統(tǒng)默認(rèn)模塊在下次不會啟動(dòng)

blacklist bcm43xx
blacklist b43
blacklist b43legacy
blacklist bcma
blacklist brcmsmac
blacklist ssb
blacklist ndiswrapper

12.設(shè)置系統(tǒng)自動(dòng)加載模塊

By doing so, you're preventing these modules from being loaded into kernel at boot time and conflicting with the wl module. Second, in order to load the wl module into the kernel on boot time, create/edit the file /etc/sysconfig/modules/kmod-wl.modules and copy-paste the following contents into it:

創(chuàng)建/etc/sysconfig/modules/kmod-wl.modules模塊使系統(tǒng)默認(rèn)加載

#!/bin/bash

for M in lib80211 cfg80211 wl; do
    modprobe $M &>/dev/null
done

至此,可以踏實(shí)用的無線了。

以上內(nèi)容摘自

參考鏈接:https://www.cnblogs.com/liangliu/p/6237487.html 在centos7(EL7.3 即 kernel-3.10.0-514.X )上安裝BCM4312無線網(wǎng)卡驅(qū)動(dòng)要注意的問題

官方鏈接:https://wiki.centos.org/HowTos/Laptops/Wireless/Broadcom?action=show Broadcom Corporation BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227 and BCM43228 Based Wireless NICs

以上有不到之處盡請諒解,若有侵權(quán)行為,及時(shí)更正。

總結(jié)

以上是生活随笔為你收集整理的centos7.7上安装broadcom bcm4312无线网卡驱动的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。