xajh32y 发表于 2015-10-1 10:48:57

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

  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)

  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: *** Error 1
  
  make: *** Error 2
  
  make: Leaving directory `/usr/src/kernels/2.6.32-431.el6.x86_64′
  
  make: *** Error 2
  
  注意:添加编译参数 make API=WEXT
  
  OK!
  
  make API=WEXT
  CC /home/xxx/packages/driver/wl.mod.o
  LD /home/xxx/packages/driver/wl.ko.unsigned
  NO SIGN /home/xxx/packages/driver/wl.ko
  make: 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

   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]
查看完整版本: [转载]Centos6.5 WIFI无线网卡BCM43142驱动安装