fedora 12下点亮thinkpad r61i无线网卡灯
文章分类:操作系统
早就在我的thinkpad下装了fedora12,一直使用之今,但有一个问题一直没有解
决,无线网卡灯一直是灰的
我的无线网卡的详细信息如下:
Java 代码
1. 03:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)
2. Subsystem: Atheros Communications Inc. Device [168c:0034]
3. Flags: bus master, fast devsel, latency 0, IRQ 17
4. Memory at df3f0000 (64-bit, non-prefetchable) [size=64K]
5. Capabilities:
6. Kernel driver in use: ath5k
7. Kernel modules: ath5k
03:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)
Subsystem: Atheros Communications Inc. Device [168c:0034]
Flags: bus master, fast devsel, latency 0, IRQ 17
Memory at df3f0000 (64-bit, non-prefetchable) [size=64K]
Capabilities:
Kernel driver in use: ath5k
Kernel modules: ath5k
今天无意中竟然发现针对这个问题有一个补丁
http://patchwork.kernel.org/patch/58038/
于是立马把补丁下载下来保存为
Wifi-led-does-not-work-on-Acer-Aspire-One-D250-ath5k- driver.patch
怎么打这个补丁呢?今天仔细研究了一下fedora的打包编译过程,其实还是比较简
单的
1.按照http://fedoraproject.org/wiki/Docs/CustomKernel的说明,先准备一个
编译当前内核的环 境
Java 代码
1. sudo yum install yum-utils rpmdevtools
2. rpmdev-setuptree
3. yumdownloader --source kernel
4. sudo yum-builddep kernel-.src.rpm
5. rpm -Uvh kernel-.src.rpm
sudo yum install yum-utils rpmdevtools
rpmdev-setuptree
yumdownloader --source kernel
sudo yum-builddep kernel-.src.rpm
rpm -Uvh kernel-.src.rpm
2.将Wifi-led-does-not-work-on-Acer-Aspire-One-D250-ath5k-driver.patch 放
到~/rpmbuild/SOURCES目录下,并修改~/rpmbuild/SPECS/kernel.spec
在一堆声明补丁的最后加上这个补丁的声明
Java 代码
1. Patch58038: Wifi-led-does-not-work-on-Acer-Aspire-One-D250-ath5k-driver.patch
Patch58038: Wifi-led-does-not-work-on-Acer-Aspire-One-D250-ath5k-driver.patch
在一堆应用补丁的最后加上这个补丁的应用声明
Java 代码
1. ApplyPatch Wifi-led-does-not-work-on-Acer-Aspire-One-D250-ath5k-driver.patch
ApplyPatch Wifi-led-does-not-work-on-Acer-Aspire-One-D250-ath5k-driver.patch
3.准备ath5k模块的编译环境,并进入该模块编译目录,修改Makefile文件后单独编
译此模块
Java 代码
1. cd ~/rpmbuild/SPECS
2. rpmbuild -bp --target $(uname -m) kernel.spec
3. cd ~/rpmbuild/BUILD/kernel-2.6.31/linux-2.6.31.i686/drivers/net/wireless/ath/ath5k
cd ~/rpmbuild/SPECS
rpmbuild -bp --target $(uname -m) kernel.spec
cd ~/rpmbuild/BUILD/kernel-2.6.31/linux-2.6.31.i686/drivers/net/wireless/ath/ath5k
在Makefile文件最后加上
Java 代码
1. KDIR := /lib/modules/$(shell uname -r)/build
2. PWD := $(shell pwd)
3. default:
4. $(MAKE) -C $(KDIR) M=$(PWD) modules
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KDIR) M=$(PWD) modules
最后命令行输入
Java 代码
1. make CONFIG_ATH5K=m
make CONFIG_ATH5K=m
等待执行结束,即可得到ath5k.ko
4.用新的ath5k.ko替换原来的ath5k.ko
Java 代码
1. sudo cp ath5k.ko /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/ath/ath5k/
2. sudo depmod -a
3. sudo rmmod ath5k
4. sudo modprobe ath5k
sudo cp ath5k.ko /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/ath/ath5k/
sudo depmod -a
sudo rmmod ath5k
sudo modprobe ath5k
此时无线网卡灯应该就可以亮起来了,如还是不行重启试一下
此过程其实就是修正已编译好的ath5k模块,不必重新编译内核,在此记录备忘
PS:希望此补丁尽快进入内核源码,这样也不用我每次自己修正atk5k模块了
没有评论:
发表评论