linux 无线网卡

来源:互联网 发布:tdgsm是什么卡的网络 编辑:程序博客网 时间:2024/05/20 06:26

https://wiki.centos.org/zh/HowTos/Laptops/Wireless/Broadcom?highlight=%2528Broadcom%2529#head-284e5baf6e5cf13111e289e9ef42fd30916e6164


以 Broadcom Corporation BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227 和 BCM43228 为基础的无线网络卡

<!> CentOS 对这些芯片组并没有原生的支持。

这页的英文版本现时由 Miloš Blažević 维护。

注:此指南主要针对 EL 6 和 EL 7。假如你采用 EL 5、6 或 7,你可不进行编译,而选择创建兼容 kABI 的 RPM 驱动程序组件,它们在内核升级后仍可重用。进一步数据可参考 ELRepo kmod-wl 页面。另外,有报告指此驱动程序不支持所有芯片组,因此烦请你反馈对 Broadcom 无线产品的经验,好让此指南能保持更新及不断改善。

注:基于这个 Broadcam 驱动程序的极度限制性条款,ELRepo 软件库的开发者放弃以 rpm 组件来提供它 —— 因此这份文件被创建的目的是要提供一个全面的驱动程序安装说明。

注:此指南以 CentOS 6 为基础,并以 Broadcom BCM4313(Vendor/DeviceID 14e4:4727)作测试之用。旧版本的 Wiki 针对 CentOS 5,并利用 Broadcom BCM4311/4312 芯片进行测试。

注:请留意编译驱动程序的测试只局限于 CentOS 6.7 附带的最新版 2.6.32-573.7.1.el6.x86_64 内核和 wl 驱动程序 6.30.223.271(最新)版本。此外,下面某些部份,例如附录一,及编译 RHEL 7 驱动程序可能只适用于较旧版的驱动程序,及较旧版(早于 CentOS 6.7)的内核。

Contents

  1. 以 Broadcom Corporation BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227 和 BCM43228 为基础的无线网络卡
    1. 第 1 步:辨认无线网络芯片及安装时依赖的组件
    2. 第 2 步:下载并解压 Broadcom 驱动程序的压缩档
    3. 第 3 步上:编译 Broadcom 驱动模块 (在 EL6 和 EL7 上)
    4. 第 3 步下:编译 Broadcom 驱动模块 (EL7需要的部分细节)
    5. 第 4 步上:将驱动模块装入内核中
    6. 第 4 步下:在开机时将驱动模块装入内核中
    7. 附录一:已获(用户)测试和汇报为可用的 Broadcom 芯片型号

若要安装以 Broadcom BCM4311、BCM4312、BCM4313、BCM4321、BCM4322、BCM43224、BCM43225、BCM43227 或 BCM43228 为基础的无线网络卡,请遵照以下的步骤:

第 1 步:辨认无线网络芯片及安装时依赖的组件


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

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

辨认完无线网络芯片型号之后,请确定你不会欠缺编译及安装时所需的组件:

[root@host]# yum install kernel-headers kernel-devel gcc

当然,假若你要为 Xen 内核(kernel-xen)编译驱动程序,你必须安装 kernel-xen-devel 而不是 kernel-devel。

第 2 步:下载并解压 Broadcom 驱动程序的压缩档

请从 Broadcom 的官方网站下载 Broadcom BCM43xx 的 linux 驱动程序压缩档到你的机器并将它解压到 /usr/local/src/hybrid-wl,请随你所需将这个目录的拥有者改为无特权的用户:

[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-v35_64-nodebug-pcoem-6_30_223_271.tar.gz[root@host hybrid-wl]# chown -R someuser.somegroup /usr/local/src/hybrid-wl 

注:为什么不随便将它解压到一个位置并保留缺省的拥有者?
原因是上面的做法会把驱动模块的源代码保留在系统上 —— 在你放置它们的位置 —— 好让你可以随时按需要创建驱动程序(譬如:你将内核升了级 —— 因为驱动模块永远根据某个内核来编译),还有,就是你可以用无特权的用户来编译!

第 3 步上:编译 Broadcom 驱动模块 (在 EL6 和 EL7 上)


驱动模块可以这样编译:

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

请留意引号(即反引号)。

编译现有的驱动程序(6.30.223.271 版)时,你差不多肯定会获得一个错误信息,而不是一个编译好的驱动模块(实际上,本作者仍未遇过这个信息以外的情况)。这则信息的内容随着内核和操作系统版本而变化,但是在 CentOS 6 上它大致上是:

make: Entering directory `/usr/src/kernels/2.6.32-573.7.1.el6.x86_64'CFG80211 API is prefered for this kernel versionUsing CFG80211 API  LD /usr/local/src/hybrid-wl/built-in.o  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/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:83: warning: ‘enum tx_power_setting’ declared inside parameter list/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:83: warning: its scope is only this definition or declaration, <snip>/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_cfg80211_join_ibss’:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:730: error: ‘struct cfg80211_ibss_params’ has no member named ‘channel’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: At top level:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1096: warning: ‘enum tx_power_setting’ declared inside parameter list/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1096: error: parameter 2 (‘type’) has incomplete type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_cfg80211_set_tx_power’:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1107: error: ‘TX_POWER_AUTOMATIC’ undeclared (first use in this <snip>/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1107: error: (Each undeclared identifier is reported only once/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1107: error: for each function it appears in.)/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1109: error: ‘TX_POWER_LIMITED’ undeclared (first use in this function)/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1115: error: ‘TX_POWER_FIXED’ undeclared (first use in this function)/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: At top level:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1774: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1779: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1780: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1781: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1782: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1783: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1784: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1789: warning: initialization from incompatible pointer type/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_inform_single_bss’:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1984: error: too few arguments to function <snip>/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2023: warning: passing argument 1 of ‘cfg80211_put_bss’ from <snip>include/net/cfg80211.h:3380: note: expected ‘struct wiphy *’ but argument is of type ‘struct cfg80211_bss *’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2023: error: too few arguments to function ‘cfg80211_put_bss’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_update_bss_info’:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2276: error: ‘struct cfg80211_bss’ has no member named <snip>/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2277: error: ‘struct cfg80211_bss’ has no member named <snip>/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2283: warning: passing argument 1 of ‘cfg80211_put_bss’ from <snip>include/net/cfg80211.h:3380: note: expected ‘struct wiphy *’ but argument is of type ‘struct cfg80211_bss *’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2283: error: too few arguments to function ‘cfg80211_put_bss’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_bss_roaming_done’:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2322: warning: passing argument 2 of ‘cfg80211_roamed’ from <snip>include/net/cfg80211.h:3726: note: expected ‘struct ieee80211_channel *’ but argument is of type ‘u8 *’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2322: warning: passing argument 4 of ‘cfg80211_roamed’ makes <snip>include/net/cfg80211.h:3726: note: expected ‘const u8 *’ but argument is of type ‘s32’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2322: warning: passing argument 5 of ‘cfg80211_roamed’ makes <snip>include/net/cfg80211.h:3726: note: expected ‘size_t’ but argument is of type ‘u8 *’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2322: warning: passing argument 6 of ‘cfg80211_roamed’ makes <snip>include/net/cfg80211.h:3726: note: expected ‘const u8 *’ but argument is of type ‘s32’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2322: error: too few arguments to function ‘cfg80211_roamed’/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_update_wowl’:/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2791: warning: unused variable ‘wdev’make[1]: *** [/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.o] Error 1make: *** [_module_/usr/local/src/hybrid-wl] Error 2make: Leaving directory `/usr/src/kernels/2.6.32-573.7.1.el6.x86_64'

注意: 在 EL6 和 EL7 上这里的指令并不相同。对于 EL6 来说,你只需要遵照第 3 步上,但是对于 EL7,你需要同时应用第 3 步上 和第 3 步下 的修正,并且编译它们,就像步骤里(3 上)演示的一样。所以,对于EL7来说,可以跳过 'sed' 命令。

驱动程序由于 wl_cfg80211_hybrid.c 档内检查内核版本的 if-then-else 句式而不能编译。我们须要执行下列两个指令来进行修正:

[user@host hybrid-wl]$ sed -i 's/[ >][>=] KERNEL_VERSION(2, 6, 3.)/>= KERNEL_VERSION(2, 6, 32)/' src/wl/sys/wl_cfg80211_hybrid.c[user@host hybrid-wl]$ sed -i 's/[ >][>=] KERNEL_VERSION(3, ., .)/>= KERNEL_VERSION(2, 6, 32)/' src/wl/sys/wl_cfg80211_hybrid.c[user@host hybrid-wl]$ sed -i 's/[ >][>=] KERNEL_VERSION(3, 11, .)/>= KERNEL_VERSION(2, 6, 32)/' src/wl/sys/wl_cfg80211_hybrid.c[user@host hybrid-wl]$ sed -i 's/< KERNEL_VERSION(3, 18, .)/< KERNEL_VERSION(2, 6, 30)/' src/wl/sys/wl_cfg80211_hybrid.c[user@host hybrid-wl]$ sed -i 's/[ >][>=] KERNEL_VERSION(3, 15, .)/>= KERNEL_VERSION(2, 6, 32)/' src/wl/sys/wl_cfg80211_hybrid.c

不过,这些 'sed' 替换命令仍未能确保驱动程序可以正常编译。我们还须要在编译驱动程序前应用 wl-kmod-fix-ioctl-handling.patch 这个修正。请将它下载至 /usr/local/src 然后执行下列指令来修正驱动程序的源代码:

[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-fix-ioctl-handling.patchpatching file src/wl/sys/wl_cfg80211_hybrid.cHunk #1 succeeded at 1467 (offset 17 lines).patching file src/wl/sys/wl_linux.cHunk #1 succeeded at 1659 (offset 8 lines).

现在,请尝试再次编译驱动模块:

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

编译器的输出大致上是这样:

make: Entering directory `/usr/src/kernels/2.6.32-573.7.1.el6.x86_64'CFG80211 API is prefered for this kernel versionUsing CFG80211 API  LD /usr/local/src/hybrid-wl/built-in.o  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/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1802: warning: initialization from incompatible pointer type  LD [M] /usr/local/src/hybrid-wl/wl.o  Building modules, stage 2.CFG80211 API is prefered for this kernel versionUsing CFG80211 API  MODPOST 1 modules  CC /usr/local/src/hybrid-wl/wl.mod.o  LD [M] /usr/local/src/hybrid-wl/wl.ko.unsigned  NO SIGN [M] /usr/local/src/hybrid-wl/wl.komake: Leaving directory `/usr/src/kernels/2.6.32-573.7.1.el6.x86_64'

一旦这个模块被建成,你便可以删除不必要的符号:

[user@host hybrid-wl]$ strip --strip-debug wl.ko

你会发现驱动模块的文件尺寸会缩小(由 8.2MB 降至 7.2MB)。而且,你的驱动模块仍能正常运作 ;)

第 3 步下:编译 Broadcom 驱动模块 (EL7需要的部分细节)

如果你运行的是 EL7,那么不需要运行前面步骤的 'sed' 命令。不过你需要应用这个额外的修正:wl-kmod-rhel7_1.patch(连同第 3 步上 的那个修正一起)

[user@host hybrid-wl]$ patch -p1 < ../wl-kmod-rhel7_1.patchpatching file src/wl/sys/wl_cfg80211_hybrid.cHunk #1 succeeded at 1801 (offset -3 lines).Hunk #2 succeeded at 1867 (offset -3 lines).Hunk #3 succeeded at 2071 (offset -3 lines).Hunk #4 succeeded at 2804 (offset -3 lines).

当应用了这个修正之后,接着按照第 3 步上 的剩余步骤 - 编译驱动程序和删除侦错符号。只有应用这两个修正才可以编译驱动模块,就像所说的那样起作用。

第 4 步上:将驱动模块装入内核中

当你成功地编译了驱动模块后,你便可以将它装入内核中,并最终设置开机时自动装入此驱动程序(要这样做,你必须利用 root 的权限)。当然,做这一切之先,你必须从内核删除现在的无线驱动模块(假如有的话):

[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

请将驱动模块的文件复制到一个可以让内核找到它的地方:

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

这样做是为了与其它已经/将会从 kmod 组件安装的外置模块(例如:fuse、ntfs-3g、等)保持一贯性。

按著,请执行:

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

以便能创建一个模块的互赖性清单。现在我们装入驱动模块:

[root@host hybrid-wl]# insmod wl.ko

假如这一步失败了(有不少这样的报告,但是作者本身还没有遇到过这类问题),并伴有如下提示信息:

insmod: error inserting 'wl.ko': -1 Unknown symbol in module

首先尝试创建模块依赖:

[root@host ~]# depmod `uname -r`

然后装入驱动模块:

[root@host hybrid-wl]# modprobe wl

要是没有错误信息,驱动程序已被装入及随时可用。假如你只有无线驱动程序应用 ndiswrapper 内核模块,你可将它删除 —— 但这并非必须的。

第 4 步下:在开机时将驱动模块装入内核中

你仍须额外数个步骤才能在开机时自动装入模块。首先,编辑 /etc/modprobe.d/blacklist 这个文件并加入以下内容:

blacklist bcm43xxblacklist b43blacklist b43legacyblacklist bcmablacklist brcmsmacblacklist ssbblacklist ndiswrapper

通过这样做,你可以防止这些模块在开机时被装入内核中,与 wl 模块产生冲突。另外,若要在开机时装入 wl 模块,请创建/编辑/etc/sysconfig/modules/kmod-wl.modules 并把以下内容剪贴到其中:

#!/bin/bashfor M in lib80211 cfg80211 wl; do    modprobe $M &>/dev/nulldone

现在你的驱动应该在每次开机时都会被装入(当然除了在你安装了新内核之后,到时你必须依照以上步骤将它重新编译)。

附录一:已获(用户)测试和汇报为可用的 Broadcom 芯片型号

测试芯片

EL 版本

内核

结构

发行商编号:设备编号

驱动程序版本

BCM4311

CentOS 7.1

3.10.0-229.el7

x86_64

不详

6_30_223_248

BCM4312

CentOS 6.6

不详

不详

不详

6_30_223_248

BCM4313

CentOS 6.6

2.6.32-504.16.2.el6

x86_64

14e4:4727

6_30_223_248

BCM4321

CentOS 7.1

3.10.0-229.el7

x86_64

14e4:4328

6_30_223_248

BCM4322

CentOS 7.1

3.10.0-229.7.2.el7

x86_64

14e4:432b

6_30_223_248

BCM43142

CentOS 6.6

不详

不详

14e4:4365(未确定)

6_30_223_248

BCM43224

BCM43225

BCM43227

BCM43228

CentOS 7.1

3.10.0-229.4.2.el7

x86_64

14e4:4359

6_30_223_248

BCM4352

CentOS 7.1

3.10.0-229.7.2.el7

x86_64

14e4:43b1

6_30_223_248

注意: 这个驱动程序不能横跨内核升级(意即当你更新内核后用新内核开机,你必须重做以上步骤)。正因为这个原因,你要将压缩档的内容放置在 /usr/local/src/hybrid-wl 内,并更改目录及内容的拥有者。

注:成功安装驱动程序后,无联机网的新手经常会汇报 Error for wireless request "Set Encode" (8B2A): SET failed on device... 等问题。最简便的解决方法就是 设置 NetworkManager 守护服务替换 network 守护服务来管理你的网络连接。这个问题曾经在 CentOS 5 上出现,但在 CentOS 6 已再没有出现(或被汇报)。

Translation of revision 42

zh/HowTos/Laptops/Wireless/Broadcom (2015-10-24 14:09:56由TimothyLee编辑)



http://elrepo.org/tiki/wl-kmod

wl-kmod

Source RPMs for Broadcom drivers

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, BCM4331, BCM4352, BCM4360, 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 the closed-source tarball from Broadcom for your architecture (i.e., 32-bit vs 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 from our no-source SRPM. If you are already familiar with using rpmbuild to build packages, then this process should only take you 5-10 minutes to complete.


Kmod-wl Usability Across EL Point Releases (or ″Why doesn′t my wireless work after the last point release update?″):


If you are only interested in building kmod-wl for the latest kernel, then you do not really need to read this section, but it would not hurt to understand the underlying issues.

The EL6 and EL7 kmod-wl binaries are typically only functional within a range of EL point releases (e.g., 6.7, 7.2) due to changes in the wireless stack-related kernel API of the EL 6 and EL 7 kernels. RHEL backports (external link) components of recent kernels so that more modern kernel features and security fixes are available to the user. These backports become most notable when a new point release becomes available.

Our kmods continue to work after updating the kernel as long as the Kernel Application Binary Interface (kABI) remains unchanged with respect to our packages. EL point releases sometime break this compatibility. For the kmod-wl package, we make changes to the wl-kmod srpm to accommodate these changes. One down side is that the newly built kmod-wl only works within the newest RHEL point release after a wl-kmod srpm update. To maintain backward compatibility of the wl-kmod srpm, we craft it to build slightly different kmod-wl packages depending on the point release kernel used to build it.

If your interest is to only use the newest kernel, then you can just boot to the newest kernel and follow the instructions (below) to build a usable kmod-wl. However, if you need to continue using an older kernel, then you can use the updated wl-kmod srpm to build a kmod-wl package that works with the older kernel.

How to do that: If you build kmod-wl from the updated srpm after booting the latest kernel, then you can save that kmod-wl for use with the latest kernel. Likewise, you can build kmod-wl from the updated srpm after booting an older point release kernel and then save that kmod-wl for use with the older point release kernel. (For users familiar with using rpmbuild, you can also use the " --define 'kversion TARGET-KVERSION ' " option to avoid booting different kernels.) Unfortunately, you can only have one of those kmod-wl packages installed at a time, so save both kmod-wl packages, but only install one of them. Note that they have exactly the same version (i.e., their rpm names are identical), so save them in separate folders.

For example, you can build kmod-wl under an EL 7.1 kernel and use it with EL 7.1 kernels, but it will not function when you boot an EL 7.0 kernel. Likewise, you can build kmod-wl under an EL 7.0 kernel and use it with EL 7.0 kernels, but it will not function when you boot an EL 7.1 kernel.

If you need a kmod-wl package that works within one of the following ranges, then boot a kernel in that range and build/install kmod-wl as described below.

   Supported EL 6 Point Release Ranges: (1) 6.3 - 6.4, (2) 6.5 - 6.6, (3) 6.7

   Supported EL 7 Point Release Ranges: (1) 7.0, (2) 7.1, (3) 7.2


Build and install kmod-wl for EL5/6/7

   Please note:

     If your current kmod-wl package works with an older kernel and wireless networking is your only Internet access method,
     then boot the older kernel and download the new srpm and Broadcom source before proceeding.


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)

       EL 6.4 - 6.6 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

       The above modification is not needed for EL 6.7 or later.


   1c) EL7:

     # yum group install 'Development Tools'

     # yum install redhat-lsb kernel-abi-whitelists

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

       EL 7.0 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

       The above modification is not needed for EL 7.1 or later.




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_271-1.el5.elrepo.nosrc.rpm (external link)

   For EL6: http://elrepo.org/linux/elrepo/el6/SRPMS/wl-kmod-6_30_223_271-2.el6.elrepo.nosrc.rpm (external link)

   For EL7: http://elrepo.org/linux/elrepo/el7/SRPMS/wl-kmod-6_30_223_271-2.el7.elrepo.nosrc.rpm (external link)



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


   from:   http://www.broadcom.com/support/?gid=1 (external link) (scroll down to "Linux® STA 32-bit (or 64-bit) drivers")

   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.)



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

       Please note: It is recommended, but is not critical, that you uninstall any older version of kmod-wl (i.e., rpm -e kmod-wl) before installing the new kmod-wl package.



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

   8c) EL7:

     # modprobe wl



9) Store kmod-wl*rpm for safe keeping


10) Optional - Remove the build tree:


   $ rm -rf ~/rpmbuild




Page last modified on Monday 18 of January, 2016 16:09:06 MST


The ELRepo Project would like to thank Red Hat for their support of the Open Source Community.
The ELRepo Project Terms and Conditions
| Theme: Eatlon


0 0