bcm4312 linux命令行,BCM4312 DEBIAN 上安装

查看网卡型号命令:

lspci | grep "Network controller"

Debian

squeeze的基本系统和Ubuntu的不太一样。Ubuntu中已经集成了GCC编译环境(至少在Ubuntu10.04中是这样的),而

Debian squeeze中没有。因此在Debian

squeeze中安装BCM4312网卡驱动,需要先安装GCC编译环境。本文主要参考BCM4312官方文档。

写在这里主要为了方便以后再次安装BCM4312驱动,同时也希望对Debian新手有点帮助。

附:

BCM4312官方驱动和文档地址:

一个32位的,一个64位的,还有一个是官方文档。

※内核版本 3.2.0-4-686-pae

一、安装GCC编译环境

根据官方文档在Ubuntu中的提示,稍微修改了下(linux-headers-generic改为linux-headers-`uname -r` ,添加了个gcc)。其实在Ubuntu是不用自己安装,已经有了这个环境。

代码:

#apt-get install build-dep linux build-essential  linux-headers-`uname -r` gcc(zuofei)

#apt-get install build-essential

#apt-get install linux-headers-`uname -r`

二、编译BCM4312驱动

下载好的驱动hybrid-portsrc_x86_32-v5_100_82_112.tar.gz(32位)或hybrid-

portsrc_x86_64-v5_100_82_112.tar.gz(64位)。以下以64位为例,假设hybrid-

portsrc_x86_64-v5_100_82_112.tar.gz包就在当前目录下。

1、新建一个临时目录bcm4312,把hybrid-portsrc_x86_64-v5_100_82_112.tar.gz解压到该目录下。

代码:

# mkdir bcm4312

# cd bcm4312

#tar xzf ../hybrid-portsrc_x86_64-v5_100_82_112.tar.gz

※内核如果大于等于3.10时需要打个补丁 wl_3.10.patch

patch -p2 < 补丁所在的目录/wl_3.10.patch

下载地址:

2、编译驱动。官方提示make clean为可选,我倒是觉得真没有这个必要,如果该目录以前编译过的话,make clean倒是不要省的好。

代码:

# make

# make clean

(3.2 版本的内核 编译错误;解决办法是修改 src/wl/sys/wl_linux.c 388 行为 .ndo_set_rx_mode = wl_set_multicast_list, 然后重新编译即可。)

三、加载BCM4312驱动

1、删除之前的无线网卡驱动。

查看原系统中的无线网卡驱动,如果有的话,把他们卸载掉,并阻止这些驱动再次加载,我的Debian squeeze只有b43和ssb,没有bcma。

注意:只是这四个里面的,不要阻止wl加载,因为该驱动名称最后也是wl。

引用:

# lsmod | grep "b43\|ssb\|bcma\|wl"

rmmod b43

rmmod ssb

# echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf

# echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf

2、加载新的驱动。

代码:

# modprobe lib80211

#modprobe cfg80211

# insmod wl.ko

过一会后,应该就能发现了。用ifconfig -a或者iwconfig查看下网络或无线网络设备,如果有eth1(eth0或其他eth开头的)说明驱动安装成功。

四、编译BCM4312到启动内核中,不用每次启动都要手动加载BCM4312驱动

1、把wl.ko驱动放到系统模块目录中,方便系统启动时搜索并加载。

代码:

# cp wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless

2、备份原有启动内核,这是为了防止重新生成启动内核失败。

代码:

# cp /boot/initrd.img-`uname -r` /boot/initrd.img-`uname -r`-old

3、更新启动内核。

代码:

# depmod -a

# update-initramfs -u

重启后就能够自动加载

Tips and Tricks on Linux & Mac OS X System Management

Debian Kernels and Tigon TG3 Firmware

If you are updating the kernel on your Debian 5.0 (Lenny) or Debian

6.0 (Squeeze) installation and have a Tigon Gigabit ethernet

controller, such as the one on the , you may receive the following warning messages:

W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3

W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3

W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3

While harmless, these messages may be a bit disconcerting.  Luckily,

an easy, however not widely-documented fix, is present to solve this.

Simply follow the two steps below:

1.) Add the “non-free” repository to the sources.lst file. (Here we

are using Debian Squeeze. Replace “squeeze” with “lenny” if you are

using Debian 5.0 Stable.)

nano -w /etc/apt/sources.list

deb squeeze main contrib non-free

deb-src squeeze main contrib non-free

2.) Update apt-get and install the “firmware-linux-nonfree” package.

apt-get update

apt-get install firmware-linux-nonfree

Now, you should be all set and you can attempt the kernel installation once more.  According to Debian bug report, the Tigon TG3 firmware is not listed in the package

description even though it is present in the package itself and perhaps

why some confusion arose.

Categories: Linux.

By Andrei Matei — June 23, 2010 at 10:45 pm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值