Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 核心升級後使用 Shell Script 自動化編譯安裝無線網卡驅動

編輯:關於 Linux

核心升級導致無線網卡驅動失效,需重新編譯。將編譯過程封裝為 Shell Script 可一鍵完成,避免重複手動操作。

自動化腳本範例 (NetcardCompiler.sh)

#!/bin/bash
cd ~/Compile/hybrid-v35_64-nodebug-pcoem-6_30_223_141
make clean
make API=WEXT
if [ -f 'wl.ko' ]; then
  cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless
else
  echo 'Compile failed!'
  exit
fi
modprobe lib80211
modprobe lib80211_crypt_tkip
insmod wl.ko
depmod -ae
echo modprobe wl >> /etc/rc.local

使用說明

  • 驅動源碼預先解壓至固定目錄,勿刪除以便重複編譯。
  • 腳本自動清理、編譯、複製模組、載入相依模組、更新模組相依關係、寫入開機自啟。
  • 核心升級後直接執行此腳本即可恢復無線網卡功能。
Copyright © Windows教程網 All Rights Reserved