参考: http://www.linuxidc.com/Linux/2011-08/41507.htm
http://www.qianshoublog.com/post/6988.html
环境:
操作系统 : fedora 18
内核版本 : 3.6.10
网卡 : Broadcom BCM4312
驱动下载地址: www.broadcom.com/support/802.11/linux_sta.php
error: asm/system.h: No such file or directory
compilation terminated.
make[2]: *** [/var/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/var/hybrid_wl] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.5.3-1.fc17.x86_64'
make: *** [all] Error 2
在驱动的解压缩文件夹下查找find ./ -name wl_linux.c
路径为./src/wl/sys/wl_linux.c
# vi wl_linux.c
找到#include <asm/system.h>删除掉这一行
找到.ndo_set_multicast_list 把它改为.ndo_set_rx_mode
退出保存,然后继续 make成功
先上官网:www.broadcom.com/support/802.11/linux_sta.php下载对应版本的驱动,因为我安装的系统是64位的,我下载了:64-bitdriver 5.100.82.38还要下载补丁:Patchfor compilation problem with kernel versions > 2.6.375.100.82.3。下载后我的到两个文件,分别是:hybrid-portsrc_x86_64-v5_100_82_38.tar.gz和5_100_82_38.patch。我把这两个文件保存在Fedora 15的主目录下。
下面开始安装:
先进入下载目录,即我的主目录
#cd /home/dauser
新建目录
#mkdir hybird_wl
# mvhybrid-portsrc_x86_64-v5_100_82_38.tar.gz hybird_wl/
# cdhybird_wl/
# tar xzfhybrid-portsrc_x86_64-v5_100_82_38.tar.gz
# mvhybrid-portsrc_x86_64-v5_100_82_38.tar.gz ../
然后打补丁
#cd /home/dauser
# mv 5_100_82_38.patch hybird_wl/
# cd /home/dauser/hybird_wl
# patch -p0 < 5_100_82_38显示“patchingfile src/wl/sys/wl_linux.c”
# make clean
显示“
KBUILD_NOPEDANTIC=1make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]:进入目录“/usr/src/kernels/2.6.38.6-26.rc1.fc15.x86_64”
make[1]:离开目录“/usr/src/kernels/2.6.38.6-26.rc1.fc15.x86_64””
#make
显示“KBUILD_NOPEDANTIC=1make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]:进入目录“/usr/src/kernels/2.6.38.6-26.rc1.fc15.x86_64”
LD/home/dauser/hybird_wl/built-in.o
CC [M]/home/dauser/hybird_wl/src/shared/linux_osl.o
CC [M]/home/dauser/hybird_wl/src/wl/sys/wl_linux.o
CC [M]/home/dauser/hybird_wl/src/wl/sys/wl_iw.o
/home/dauser/hybird_wl/src/wl/sys/wl_iw.c:在函数‘dev_wlc_bufvar_get’中:
/home/dauser/hybird_wl/src/wl/sys/wl_iw.c:173:7:警告:variable‘len’ set but not used[-Wunused-but-set-variable]
/home/dauser/hybird_wl/src/wl/sys/wl_iw.c:在函数‘wl_iw_set_pmksa’中:
/home/dauser/hybird_wl/src/wl/sys/wl_iw.c:1918:9:警告:variable‘k’ set but not used [-Wunused-but-set-variable]
LD [M]/home/dauser/hybird_wl/wl.o
Building modules, stage2.
MODPOST 1 modules
WARNING: modpost: missingMODULE_LICENSE() in /home/dauser/hybird_wl/wl.o
seeinclude/linux/module.h for more information
CC/home/dauser/hybird_wl/wl.mod.o
LD [M]/home/dauser/hybird_wl/wl.ko
make[1]:离开目录“/usr/src/kernels/2.6.38.6-26.rc1.fc15.x86_64””
然后就简单了
#cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/wl.ko
#cd /lib/modules/`uname -r`/kernel/net/wireless/
# depmod
#modprobe wl
删除其它驱动
#lsmod | grep "b43\|ssb\|wl"显示
wl2554168 0
lib80211 5071 1 wl
b43 282277 0
mac80211234498 1 b43
cfg80211 135850 2 b43,mac80211
ssb 469171 b43
mmc_core 71680 3 b43,ssb,sdhci
# rmmod b43
#rmmod ssb
# rmmod wl
再
#echo "blacklist ssb" >>/etc/modprobe.d/blacklist.conf
# echo "blacklist b43">> /etc/modprobe.d/blacklist.conf
# modprobe lib80211
# insmod wl.ko
重启,看看你的无线网络灯亮了没?呵呵。安装完成!原创,转载请标明