核心升級問題-無線網卡

無線網卡安裝舊文:Broadcom 802.11 BCM43227 驅動程式安裝步驟

無線網卡通常在核心升級後都必需重新產生並載入模組(驅動程式),此次由 3.3.4-5 升級至 3.6.10-2 後,使用舊的方法產生無線模組時發生了一些問題,在編譯的過程中找不到 asm/system.h 檔案,導致編譯失敗。

使用舊方式產生模組發生編譯的過程中找不到 asm/system.h 檔案問題 # yum install -y kernel-devel kernel-headers
# yum groupinstall "Development tools"
# make
 KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
 make[1]: Entering directory `/usr/src/kernels/3.6.10-2.fc17.x86_64'
 Wireless Extension is the only possible API for this kernel version
 Using Wireless Extension API
  LD /root/wireless/built-in.o
  CC [M] /root/wireless/src/shared/linux_osl.o
  CC [M] /root/wireless/src/wl/sys/wl_linux.o
 /root/wireless/src/wl/sys/wl_linux.c:43:24: fatal error:asm/system.h:No such file or directory compilation
 terminated.

 make[2]: *** [/root/wireless/src/wl/sys/wl_linux.o] Error 1
 make[1]: *** [_module_/root/wireless] Error 2
 make[1]: Leaving directory `/usr/src/kernels/3.6.10-2.fc17.x86_64'
 make: *** [all] Error 2

system.h 的核心版本為 3.3.4-5.fc17.x86_64,沒有目前核心版本(3.6.10-2.fc17.x86_64)的 system.h # find / -name system.h
 /usr/src/kernels/3.3.4-5.fc17.x86_64/include/asm-generic/system.h
 /usr/src/kernels/3.3.4-5.fc17.x86_64/arch/x86/include/asm/system.h

# ll /usr/src/kernels/$(uname -r)/arch/x86/include/asm/system.h
 ls: cannot access /usr/src/kernels/3.6.10-2.fc17.x86_64/arch/x86/include/asm/system.h: No such file or directory

解決方法請依照以下步驟操作: # find / -name wl_linux.c
 /root/broadcom/src/wl/sys/wl_linux.c
# vim /root/broadcom/src/wl/sys/wl_linux.c
 #include   // 移除此行設定
 .ndo_set_rx_mode = wl_set_multicast_list,  // 找到字串.ndo_set_multicast_list 改成.ndo_set_rx_mode

# make
 KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
 make[1]: Entering directory `/usr/src/kernels/3.6.10-2.fc17.x86_64'
 Wireless Extension is the only possible API for this kernel version
  Using Wireless Extension API
  CC [M] /root/broadcom/src/wl/sys/wl_linux.o
  CC [M] /root/broadcom/src/wl/sys/wl_iw.o
  CC [M] /root/broadcom/src/wl/sys/wl_cfg80211.o
  LD [M] /root/broadcom/wl.o
  Building modules, stage 2.
 Wireless Extension is the only possible API for this kernel version
 Using Wireless Extension API
  MODPOST 1 modules
 WARNING: modpost: missing MODULE_LICENSE() in /root/broadcom/wl.o
 see include/linux/module.h for more information
  CC /root/broadcom/wl.mod.o
  LD [M] /root/broadcom/wl.ko  // 編譯成功
 make[1]: Leaving directory `/usr/src/kernels/3.6.10-2.fc17.x86_64'

# ll wl.ko
 -rw-r--r--. 1 root root 4256993 12 月 25 23:33 wl.ko
# cp wl.ko /lib/modules/$(uname -r)/kernel/net/wireless
# depmod
# modprobe wl
# reboot

沒有留言:

張貼留言