系統:centos6.6
驅動:hybrid-portsrc_x86_32-v5_100_82_112.tar.gz
1.下載驅動Broadcom無線網卡驅動
http://www.broadcom.com/support/802.11/linux_sta.php
2.安裝驅動程序
[root@localhost ~]# ls
anaconda-ks.cfg install.log
hybrid-portsrc_x86_32-v5_100_82_112.tar.gz install.log.syslog
//上傳hybrid-portsrc_x86_32-v5_100_82_112.tar.gz到/root文件夾下。
3.[root@localhost ~]# mkdir bcm//創建bcm目錄
4.[root@localhost ~]# mv hybrid-portsrc_x86_32-v5_100_82_112.tar.gz bcm//把hybrid-portsrc移動到bcm目錄
5.[root@localhost ~]# cd bcm//切換到bcm目錄
6.[root@localhost bcm]# tar -zxvf hybrid-portsrc_x86_32-v5_100_82_112.tar.gz//解壓tar.gz包
Makefile
lib/
lib/wlc_hybrid.o_shipped
lib/LICENSE.txt
src/
src/include/
src/include/proto/
src/include/proto/802.11.h
src/include/proto/bcmeth.h
src/include/proto/bcmevent.h
src/include/proto/802.1d.h
src/include/proto/ethernet.h
src/include/proto/ieee80211_radiotap.h
src/include/proto/wpa.h
src/include/pcicfg.h
src/include/osl.h
src/include/packed_section_start.h
src/include/bcmutils.h
src/include/packed_section_end.h
src/include/bcmdefs.h
src/include/bcmendian.h
src/include/typedefs.h
src/include/bcmwifi.h
src/include/bcmcdc.h
src/include/linux_osl.h
src/include/linuxver.h
src/include/wlioctl.h
src/include/epivers.h
src/shared/
src/shared/linux_osl.c
src/wl/
src/wl/sys/
src/wl/sys/wlc_ethereal.h
src/wl/sys/wl_export.h
src/wl/sys/wl_iw.c
src/wl/sys/wl_linux.h
src/wl/sys/wlc_pub.h
src/wl/sys/wl_dbg.h
src/wl/sys/wl_cfg80211.c
src/wl/sys/wl_cfg80211.h
src/wl/sys/wl_linux.c
src/wl/sys/wlc_types.h
src/wl/sys/wl_iw.h
src/wl/sys/wlc_key.h
7.[root@localhost bcm]# ls //顯示當前目錄
hybrid-portsrc_x86_32-v5_100_82_112.tar.gz lib Makefile src
8.[root@localhost bcm]yum -y install gcc make kernel-devel //用yum安裝make gcc kernel-devel包。
9.[root@localhost bcm]# make//make時候出現問題提示找不到目錄stop.
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make: *** /lib/modules/2.6.32-71.el6.i686/build: No such file or directory. Stop.
make: *** [all] Error 2
10.[root@localhost bcm]# rpm -qa|grep kernel//查詢kernel所有包一共有7個包。
dracut-kernel-004-32.el6.noarch
kernel-headers-2.6.32-220.13.1.el6.i686
kernel-debug-2.6.32-220.13.1.el6.i686
kernel-doc-2.6.32-220.13.1.el6.noarch
kernel-2.6.32-71.el6.i686
kernel-devel-2.6.32-220.13.1.el6.i686
kernel-firmware-2.6.32-220.13.1.el6.noarch
kernel-debug-devel-2.6.32-220.13.1.el6.i686
abrt-addon-kerneloops-1.1.13-4.el6.i686
11.[root@localhost bcm]# make//但是還是出現make錯誤
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make: *** /lib/modules/2.6.32-71.el6.i686/build: No such file or directory. Stop.
make: *** [all] Error 2
12.[root@localhost Packages]# rpm -ivh kernel-* --force //重新到光盤更新7個軟件就可以make了
Preparing... ########################################### [100%]
1:kernel-firmware ########################################### [ 14%]
2:kernel ########################################### [ 29%]
3:kernel-debug ########################################### [ 43%]
4:kernel-headers ########################################### [ 57%]
5:kernel-doc ########################################### [ 71%]
6:kernel-devel ########################################### [ 86%]
7:kernel-debug-devel ########################################### [100%]
13.[root@localhost bcm]# make//執行make不在錯誤。
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/kernels/2.6.32-71.el6.i686'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
LD /root/bcm/built-in.o
CC [M] /root/bcm/src/shared/linux_osl.o
CC [M] /root/bcm/src/wl/sys/wl_linux.o
CC [M] /root/bcm/src/wl/sys/wl_iw.o
CC [M] /root/bcm/src/wl/sys/wl_cfg80211.o
LD [M] /root/bcm/wl.o
Building modules, stage 2.
CFG80211 API is prefered for this kernel version
Using CFG80211 API
MODPOST 1 modules
WARNING: modpost: missing MODULE_LICENSE() in /root/bcm/wl.o
see include/linux/module.h for more information
CC /root/bcm/wl.mod.o
LD [M] /root/bcm/wl.ko.unsigned
NO SIGN [M] /root/bcm/wl.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-71.el6.i686'
14.[root@localhost bcm]# ls
built-in.o hybrid-portsrc_x86_32-v5_100_82_112.tar.gz lib Makefile modules.order Module.symvers src wl.ko wl.ko.unsigned wl.mod.c wl.mod.o wl.o
15.[root@localhost bcm]# insmod wl.ko //加載wl.ko模塊提示錯誤
insmod: error inserting 'wl.ko': -1 Unknown symbol in module
16.[root@localhost bcm]# modprobe cfg80211//加載依賴模塊
17.[root@localhost bcm]# modprobe lib80211//加載依賴模塊
18.[root@localhost bcm]# insmod wl.ko//加載wl.ko模塊驅動
19.[root@localhost bcm]# lsmod //查看驅動模塊信息
Module Size Used by
wl 2454438 0 //已經加載
lib80211 4858 1 wl//依賴lib80211
cfg80211 118045 1 wl//依賴cfg80211
rfkill 15252 1 cfg80211
ipv6 264702 12
dm_mirror 11620 0
dm_region_hash 10127 1 dm_mirror
dm_log 8520 2 dm_mirror,dm_region_hash
ppdev 7335 0
parport_pc 19348 0
parport 31019 2 ppdev,parport_pc
snd_ens1371 17049 0
snd_rawmidi 18705 1 snd_ens1371
snd_ac97_codec 95678 1 snd_ens1371
ac97_bus 942 1 snd_ac97_codec
snd_seq 46091 0
snd_seq_device 5354 2 snd_rawmidi,snd_seq
snd_pcm 67225 2 snd_ens1371,snd_ac97_codec
snd_timer 18308 2 snd_seq,snd_pcm
snd 52722 7 snd_ens1371,snd_rawmidi,snd_ac97_codec,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore 6460 1 snd
snd_page_alloc 7080 1 snd_pcm
e1000 95440 0
vmware_balloon 5785 0
i2c_piix4 11098 0
i2c_core 25799 1 i2c_piix4
sg 24778 0
ext4 322814 2
mbcache 5918 1 ext4
jbd2 73876 1 ext4
sr_mod 14187 0
cdrom 34035 1 sr_mod
sd_mod 33344 4
crc_t10dif 1191 1 sd_mod
mptspi 14637 0
mptscsih 30378 1 mptspi
mptbase 84672 2 mptspi,mptscsih
scsi_transport_spi 20340 1 mptspi
ata_generic 2555 0
pata_acpi 2487 0
ata_piix 19016 3
dm_mod 63859 2 dm_mirror,dm_log
20.最後讓系統自動加載驅動/etc/rc.local中加入insmod 全路徑wl.ko即可。
總結:因為用yum來安裝雖然安裝kernel*包成功,但是不能make出現問題,所以手動更新掛載iso文件直接更新7個kernel-*包就可以make了。
本文出自 “有志者事竟成!” 博客,請務必保留此出處http://zh888.blog.51cto.com/1684752/857414