CentOS 7 安装Broadcom无线网卡驱动

2 篇文章 0 订阅

首先,请确定你是位“拥有 Broadcom BCM43xx 无线网络卡的幸运儿”:

/sbin/lspci | grep Broadcom

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

在  http://www.broadcom.com/support/802.11/linux_sta.php 下载最新的驱动

安装需要的组件:

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 version
Using 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.o
WARNING: modpost: missing MODULE_LICENSE() in /usr/local/src/hybrid-wl/wl.o
see include/linux/module.h for more information
WARNING: /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 references
the function __init wl_pci_probe()
If the reference is valid then annotate the
variable 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 version
Using CFG80211 API
  MODPOST 1 modules
WARNING: modpost: missing MODULE_LICENSE() in /usr/local/src/hybrid-wl/wl.o
see include/linux/module.h for more information
WARNING: /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 references
the function __init wl_pci_probe()
If the reference is valid then annotate the
variable 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.ko
make[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下可用,下载编译即可。

原文地址:http://centoscn.com/image-text/config/2014/0723/3339.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是在CentOS 7安装BCM43142无线网卡驱动的步骤: 1. 确认无线网卡型号:使用以下命令查看无线网卡型号: ```shell lspci | grep Network ``` 如果输出中包含"BCM43142",则确认使用的是博通BCM43142无线网卡。 2. 安装必要的软件包:使用以下命令安装所需的软件包: ```shell sudo yum install -y kernel-devel sudo yum install -y gcc ``` 3. 下载驱动程序:从官方网站下载适用于CentOS 7的BCM43142无线网卡驱动程序。将驱动程序文件保存到本地目录。 4. 解压驱动程序:使用以下命令解压驱动程序文件: ```shell tar -zxvf <驱动程序文件名>.tar.gz ``` 5. 进入驱动程序目录:使用以下命令进入解压后的驱动程序目录: ```shell cd <驱动程序目录> ``` 6. 编译安装驱动程序:使用以下命令编译安装驱动程序: ```shell make sudo make install ``` 7. 加载驱动程序:使用以下命令加载驱动程序: ```shell sudo modprobe <驱动程序模块名> ``` 8. 配置无线网络:使用以下命令配置无线网络连接: ```shell sudo nmcli dev wifi connect <无线网络名称> password <无线网络密码> ``` 将"<无线网络名称>"替换为你要连接的无线网络的名称,将"<无线网络密码>"替换为你要连接的无线网络的密码。 请注意,以上步骤仅适用于CentOS 7,并且需要下载适用于CentOS 7的BCM43142无线网卡驱动程序。如果你使用的是其他操作系统或版本,请参考相应的文档或官方网站获取适用于你的系统的驱动程序和安装说明。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值