CentOS 7 安裝Broadcom無線網卡驅動

來源:互聯網
上載者:User

CentOS 7 安裝Broadcom無線網卡驅動

首先,請確定你是位“擁有 Broadcom BCM43xx 無線網路卡的幸運兒”:

/sbin/lspci | grep Broadcom
0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)

安裝需要的組件:

sudo yum install kernel-headers kernel-devel gcc

接著到這裡下載驅動安裝包. 然後用root賬戶解開安裝包,並修改所有者為普通使用者:

[root@host ~]# mkdir -p /usr/local/src/hybrid-wl
[root@host hybrid-wl]# cd /usr/local/src/hybrid-wl
[root@host hybrid-wl]# tar xvfz /path/to/the/tarball/hybrid-portsrc-x86_64-v5.10.91.9.3.tar.gz(下載檔的名稱和路徑)
[root@host hybrid-wl]# chown -R someuser.somegroup /usr/local/src/hybrid-wl

註:為什麼不隨便將它解壓到一個位置並保留預設的擁有者?

原因是上面的做法會把驅動模組的原始碼保留在系統上 —— 在你放置它們的位置 —— 好讓你可以隨時按需要建立驅動程式(譬如:你將核心升了級 —— 因為驅動模組永遠根據某個核心來編譯),還有,就是你可以用無特權的使用者來編譯!

然後make,但是我報錯了:

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make: *** /lib/modules/3.10.0-123.el7.x86_64/build: 沒有那個檔案或目錄。 停止。
make: *** [all] 錯誤 2

其實把更新裝完重啟以下電腦就解決了,如果問題沒解決的話:

然後我檢查那個檔案夾,發現是一個壞掉的串連,修正它:
cd /lib/modules/3.10.0-123.el7.x86_64
ln -fs /usr/src/kernels/3.10.0-123.4.2.el7.x86_64 build

再make看看

cd /usr/local/src/hybrid-wl
make

理想的輸出應該是這樣:

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`make[1]: 進入目錄“/usr/src/kernels/3.10.0-123.4.2.el7.x86_64”CFG80211 API is prefered for this kernel versionUsing CFG80211 API  CC [M]  /usr/local/src/hybrid-wl/src/shared/linux_osl.o  CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_linux.o  CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_iw.o  CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.o  LD [M]  /usr/local/src/hybrid-wl/wl.oWARNING: modpost: missing MODULE_LICENSE() in /usr/local/src/hybrid-wl/wl.osee include/linux/module.h for more informationWARNING: /usr/local/src/hybrid-wl/wl.o(.data+0x150f40): Section mismatch in reference from the variable wl_pci_driver to the function .init.text:wl_pci_probe()The variable wl_pci_driver referencesthe function __init wl_pci_probe()If the reference is valid then annotate thevariable with __init* or __refdata (see linux/init.h) or name the variable:*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console  Building modules, stage 2.CFG80211 API is prefered for this kernel versionUsing CFG80211 API  MODPOST 1 modulesWARNING: modpost: missing MODULE_LICENSE() in /usr/local/src/hybrid-wl/wl.osee include/linux/module.h for more informationWARNING: /usr/local/src/hybrid-wl/wl.o(.data+0x150f40): Section mismatch in reference from the variable wl_pci_driver to the function .init.text:wl_pci_probe()The variable wl_pci_driver referencesthe function __init wl_pci_probe()If the reference is valid then annotate thevariable with __init* or __refdata (see linux/init.h) or name the variable:*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console  CC      /usr/local/src/hybrid-wl/wl.mod.o  LD [M]  /usr/local/src/hybrid-wl/wl.komake[1]: 離開目錄“/usr/src/kernels/3.10.0-123.4.2.el7.x86_64”
裝入驅動程式

當你成功地編譯了驅動模組後,你便可以將它裝入核心中,並設定在開機時自動裝入這個驅動程式(要這樣做,你必須利用 root 的許可權)。當然,做這一切之先,你必須從核心刪除現在的無線驅動模組(假如有的話):

[root@host ~]# rmmod bcm43xx
[root@host ~]# rmmod b43
[root@host ~]# rmmod b43legacy
[root@host ~]# rmmod ndiswrapper

然後裝入驅動:

make install
depmod `uname -r
modprobe wl

OK!最後貼張圖:

參考這裡,centos的官方指南,http://wiki.centos.org/zh/HowTos/Laptops/Wireless/Broadcom,注意新的驅動程式在centOS7下可用,下載編譯即可。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.