设为首页 收藏本站
查看: 2499|回复: 0

[经验分享] [转载]Centos6.5 WIFI无线网卡BCM43142驱动安装

[复制链接]

尚未签到

发表于 2015-10-1 10:48:57 | 显示全部楼层 |阅读模式
  FROM:http://www.gejoin.com/archives/1533
  设备型号:DELL V2420
  Broadcom 网卡型号:BCM43142
  lspci|grep Broadcom
  07:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)
DSC0000.png
  1.确定自己的网卡驱动
  https://lug.ustc.edu.cn/sites/opensuse-guide/wlan.php
  http://www.broadcom.com/support/802.11/linux_sta.php
  载网卡驱动:hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
  2.解压编译网卡驱动:
  解压出目录lib src和 Makefile文件,执行:
  make
  这样会编译报错:
  
  /home/xxx/packages/driver/src/wl/sys/wl_cfg80211_hybrid.c:2122: error: too few arguments to function ‘cfg80211_roamed’
  
  make[2]: *** [/home/xxx/packages/driver/src/wl/sys/wl_cfg80211_hybrid.o] Error 1
  
  make[1]: *** [_module_/home/xxx/packages/driver] Error 2
  
  make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.el6.x86_64′
  
  make: *** [all] Error 2
  
  注意:添加编译参数 make API=WEXT
  
  OK!
  
  make API=WEXT
  CC /home/xxx/packages/driver/wl.mod.o
  LD [M] /home/xxx/packages/driver/wl.ko.unsigned
  NO SIGN [M] /home/xxx/packages/driver/wl.ko
  make[1]: Leaving directory `/usr/src/kernels/2.6.32-431.el6.x86_64′
  3.安装
  # make install
  install -D -m 755 wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
  4.加载新的驱动程序
  # modprobe lib80211
  # insmod wl.ko
  5.重新启动网络服务
  # service network restart
  Shutting down interface p5p1: Device state: 3 (disconnected)
  [ OK ]
  Shutting down loopback interface: [ OK ]
  Bringing up loopback interface: [ OK ]
  参考来源,从这里看到编译参数,谢谢!:http://weiruoyu.blog.iyunv.com/951650/1193257
  -------------------------------------------------------------------------------------------------------
  经过实践,上述方法不是太好使,新方法正在寻找。
  ---------------------------------------------------------------------------------------------------------------------------
  终于找到新方法了,发现这个是好使的,真牛叉.
  链接如下:http://elrepo.org/tiki/wl-kmod
  原文如下:
  Please note: The current Broadcom closed-source Linux drivers when built according to the instructions provided here have provided functional wireless capability to some users, but have failed for other users.

Broadcom Corp. provides closed-source IEEE 802.11a/b/g/n Linux drivers for use with Broadcom's BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM4352, BCM43142, BCM43224, BCM43225, BCM43227 and BCM43228 wireless chipsets. We (ELRepo) cannot create and redistribute binary RPMS for these drivers due to the Broadcom licensing restrictions (i.e., liability issues). However, we do make available no-source SRPMS (.nosrc.rpm) which contain the framework required to build the binaries,but lack the proprietary code and are not subject to Broadcom's licensing restrictions.

These no-source SRPMS can be used by the end user to build kABI-compatible binary drivers for local use. These kABI-compatible binaries should be usable after future kernel updates, so there is no need to recompile them for each new kernel. Please note that the nosrc.rpm package does not build kmod-wl for kernel-xen and kmod-wl cannot be built on a system running kernel-xen.

To build a kmod-wl binary, you will need to (1) configure a build tree, (2) download the wl-kmod*nosrc.rpm for your EL release, (3) download theclosed-source tarball from Broadcom for your architecture (i.e., 32-bitvs 64-bit) into the build tree and (4) initiate the kmod-wl build. For convenience, the kernel development package for the running kernel will be used in the build process, as opposed to our normal policy of building against an older kernel development package.

The kmod-wl package can be built on any system running the same EL release/architecture as the target system. If you are building on the target system and lack network connectivity, then the downloads can be made onto a USB flash drive and copied onto your system.

Below are the detailed instructions on how to build the binary packages.If you are already familiar with using rpmbuild to build packages, thenthis process should only take you 5-10 minutes to complete.



Build and install kmod-wl for EL5/6/7 (Note: This page is currently being modified and instructions may be incomplete)
  
1) Install needed tools/packages:




   1a) EL5:

     # yum groupinstall 'Development Tools'

     # yum install redhat-lsb

     * Install appropriate kernel*devel

       - For 32-bit:     # yum install kernel-devel-$(uname -r|sed 's/PAE//') kernel-PAE-devel-$(uname -r|sed 's/PAE//')

       - For 64-bit:     # yum install kernel-devel-$(uname -r)

   1b) EL6:

     # yum groupinstall 'Development Tools'

     # yum install redhat-lsb kernel-abi-whitelists

     # yum install kernel-devel-$(uname -r)

       EL6 Note: Due to a bug in redhat-rpm-config-9.0.3-42.el6, a modification is required to fix the
       kabi-whitelist target in /usr/lib/rpm/redhat/find-requires.ksyms before you build kmod-wl.

       Please run as root (as a single copy/paste):

       [[ $(rpm -q redhat-rpm-config|grep 9.0.3-42|wc -l) -gt 0 ]] && sed -i \
       's@/lib/modules/kabi/kabi_whitelist@/lib/modules/kabi-current/kabi_whitelist@g' \
       /usr/lib/rpm/redhat/find-requires.ksyms

   1c) EL7:

     # yum group install 'Development Tools'

     # yum install redhat-lsb kernel-abi-whitelists

     # yum install kernel-devel-$(uname -r)

       EL7 Note: Due to a bug in redhat-rpm-config-9.1.0-63.el7, a modification is required to fix the
       kabi-whitelist target in /usr/lib/rpm/redhat/find-requires.ksyms before you build kmod-wl.

       Please run as root (as a single copy/paste):

       [[ $(rpm -q redhat-rpm-config|grep 9.1.0-63|wc -l) -gt 0 ]] && sed -i \
       's@/lib/modules/kabi/kabi_whitelist@/lib/modules/kabi-rhel70/kabi_whitelist@g' \
       /usr/lib/rpm/redhat/find-requires.ksyms

  

2) As a regular user (not as root), configure a build tree and minimal .rpmmacros:




   $ mkdir -p ~/rpmbuild/{BUILD,RPMS,SPECS,SOURCES,SRPMS}

    $ echo -e "%_topdir $(echo $HOME)/rpmbuild\n%dist .el$(lsb_release -s -r|cut -d"." -f1).local" >> ~/.rpmmacros

  

3) Download wl-kmod*nosrc.rpm




   For EL5: http://elrepo.org/linux/elrepo/el5/SRPMS/wl-kmod-6_30_223_248-1.el5.elrepo.nosrc.rpm DSC0001.gif

   For EL6: http://elrepo.org/linux/elrepo/el6/SRPMS/wl-kmod-6_30_223_248-2.el6.elrepo.nosrc.rpm

   For EL7: http://elrepo.org/linux/elrepo/el7/SRPMS/wl-kmod-6_30_223_248-2.el7.elrepo.nosrc.rpm

  

4) Download the Broadcom driver matching your architecture (i.e., 32-bit vs 64-bit):




   from:   http://www.broadcom.com/support/802.11/linux_sta.php

   to:      ~/rpmbuild/SOURCES/

  

5) Build kmod-wl as a regular user (not as root):




    $ rpmbuild --rebuild --target=`uname -m` --define 'packager <your-name>' /<path-to-nosrc.rpm>/wl-kmod*nosrc.rpm
   ...
    Wrote: /home/<user>/rpmbuild/RPMS/x86_64/kmod-wl-<version>.x86_64.rpm
   ...
   + exit 0

     (Note: The rpmbuild option --target=`uname -m` is only required for EL5 32-bit builds.)

  




    Note: The above build may not yield a fully functional binary driver for certain older Broadcom hardware under EL 6.  

   If an EL 6 driver built using the above instructions does not appear to be fully functional, then try building it using the Wireless Extensions API:

    $ rpmbuild --rebuild --define 'packager <your-name>' --define 'apiwext 1' /<path-to-nosrc.rpm>/wl-kmod*el6.elrepo.nosrc.rpm

   Assuming you have already installed a faulty kmod-wl, then be sure touninstall it (i.e., # rpm -e kmod-wl) before installing the new kmod-wl.

  

6) If ndiswrapper is installed and is no longer needed, then remove it:




     # yum remove \*ndiswrapper\*

  

7) Install kmod-wl:




    # rpm -Uvh /path-to-rpm/kmod-wl*rpm

   OR

    # yum --nogpgcheck localinstall /path-to-rpm/kmod-wl*rpm

  

8) Reboot or to start wireless now:




   8a) EL5:

     * Works immediately after installation without intervention

   8b) EL6:

     # modprobe -r b43 b43legacy ssb wl lib80211
     # modprobe -r bcma (Note: needed for EL 6.4 and later)
     # modprobe lib80211_crypt_tkip
     # modprobe wl

  

9) Store kmod-wl*rpm for safe keeping


10) Optional - Remove the build tree:


   $ rm -rf ~/rpmbuild

  ---------------------------------------------------------------------------------------------------------------------------------------
  在实际使用中,我遇到的问题是无线网时不时的断了; 重启网络各种不好使,按照网上的方法禁用netmanager也不行; 但是重启电脑就好使了.
  这有点费劲,后来发现右键网络小图标,有个Enable Networking,勾掉,再打上,网络就Okay了.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-121242-1-1.html 上篇帖子: 安卓使用广播来监控Wifi状态 下篇帖子: arduino wifi扩展版/模块(中文版介绍)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表