歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> Netgear WG511在Linux下的驅動安裝

Netgear WG511在Linux下的驅動安裝

日期:2017/2/27 14:26:31   编辑:更多Linux
  前兩天看到新聞,wifi聯盟終於光顧中國,中國政府也欣然准備把2004年搞成wireless年,在全國各地先開 200個hotspot。雖然wifi明年的結果多半會像去年的VPN今年的10g一樣最終高層一頭熱,但是有新技術總是 好的。再加上這兩天個人感覺rp很好,於是重新收拾東東,准備搞搞我那個破wg511在Linux下的驅動。     說起這個wg511真是讓人有恨又愛,當年我對市場上幾乎全部的wlan nic分析過一遍之後,最終選定了這塊 prism gt芯片的netgear wg511,就是看中了prism2/2.5的超強擴展功能。隨直到後來才發現 -- 原來 硬件這東東也不是越新越好。 prism gt就是太新了,導致軟件兼容性太差,不但不支持*BSD和Linux,竟 然連windows下偶的最愛AiroPeek 也不支持......     這個情況直到昨天晚上改變。     這兩天我果然rp很好,竟然意外的發現了讓AiroPeek支持原本不支持的wifi card的方法,稱著好rp還在的 時候,乘勝追擊,順便把Linux驅動也給調好。   硬件:   ===========================   * Intersil Prism GT/Duette/Indigo 芯片組的PCI/PCMCIA卡     目前已知下列型號是成功的   * 3com OfficeConnect 11g Wireless LAN PC Card 3CRWE154G72 Cardbus   * D-Link Air Plus Xtreme G A1 DWL-g650 A1 Cardbus   * Netgear WG511 WG511 Cardbus   * SMC2802W - EZ Connect g 2.4GHz 54 Mbps Wireless PCI Card SMC2802W PCI   * SMC2835W EZ Connect g 2.4GHz 54 Mbps Wireless Cardbus Adapter SMC2835 Cardbus   * Z-Com XG-900 XG-900 PCI     軟件:   ===========================   * Linux內核源代碼,版本2.4.23p9 或 2.6.0test*   --必須要2.4.23p8以上版本,因為prism54驅動需要一個內核新特性 firmware hotplug   --我試了2.6,但是很不穩定,在我的本本上還是不能正常引導,因此推薦2.4.23p9   --目前沒有完整版本,需要 2.4.22 Release 和 2.4.23p9 patch   --FTP://ftp.kernel.org/pub/linux/kernel/     * Intersil Prism 38** Firmware   --http://prism54.org/firmware/isl3890     * 其他   Linux Wireless Utils 用於管理無線網絡設備   Linux Firmware Utils 用於管理firmware hotplug   gnu 開發工具套件,這個應該都有了吧     * compiler/binutils for kernel compilation   * wireless-tools   * firmware utilities (see bellow for distribution notes)   * Kernel requirements:     好了,東西准備完之後,下面開始准備新內核。     內核與驅動   ===========================   1)解壓縮源代碼樹   # cd /usr/src/linux   # tar xjvf linux-2.4.22.tar.bz2   # bunzip2 prism54-cvs20031103.tar.bz2   # bunzip2 patch-2.4.23-pre9.bz2   //選擇你自己習慣的方式展開源代碼樹到任意一個位置     2)打補丁   # cd linux-2.4.22   # patch -p1 <../patch-2.4.23-pre9   # patch -p1 <../prism54-cvs20031103   //先打你所需要的其他2.4.22補丁,例如我就打了xfs補丁;然後按順序升級2.4.23p*,最後   //加上prism54的最新cvs patch     3)編譯內核   # make xconfig (或make menUConfig 或 make config)     要啟用Prism54驅動,內核中至少需要打開如下屬性:   * 開發代碼支持   * PCI/PCMCIA/CardBus 總線支持   * Kernel Lib -> Firmware Hotplug支持   //這個是2.4.23p9的新特性   * Network -> Wireless -> Prism GT支持   //驅動,需要前幾項的依賴性關系     配置順序如下   v2.4: Network device support --->   Wireless LAN (non-hamradio) --->   Intersil Prism GT/Duette/Indigo PCI/PCMCIA   v2.6: Device Drivers --->   Networking support --->   Wireless LAN (non-hamradio) --->   Intersil Prism GT/Duette/Indigo PCI/PCMCIA     -----------------------------------------------------------   v2.6:   CONFIG_EXPERIMENTAL: y   CONFIG_CLEAN_COMPILE: n   CONFIG_STANDALONE: n   Code maturity level options --->   Prompt for development and/or incomplete code/drivers   Select only drivers expected to compile cleanly   Select only drivers that don't need compile-time external firmware     -----------------------------------------------------------   v2.4   CONFIG_EXPERIMENTAL: y   Code maturity level options --->   Prompt for development and/or incomplete code/drivers     CONFIG_FW_LOADER: (m or y)   Library routines --->   Hotplug firmware loading support (EXPERIMENTAL)   -----------------------------------------------------------     4)編譯內核和驅動   # make dep && make bzImage && make modules && make install && make modules_install     //這只是理想狀態下的編譯命令,實際過程中依賴於你的經驗和內核了解程度與配置依賴關系   //可能出現各種情況編譯不通過的;大多數情況是因為內核模塊依賴順序不正確,例如如果你   //沒有打開char->input core的話,編譯usb->hid模塊就會出錯。   //用耐心及智慧,來解決遇到的一切問題。我編譯這個驅動時可是試過了2.4.20 - 2.6所有   //版本內核,歷時18小時時間和nn遍編譯調整才成功的。   //   //如果你實在沒耐心的話,可以嘗試一下 make -i參數,忽略不成功的動作繼續進行下去。   //或者使用如下命令僅編譯本模塊   //make -C <內核源碼目錄> SUBDIRS=drivers/net/wireless/prism54 V=1 modules     5)准備附加程序   運行這個驅動需要isl3890 firmware和 firmware hotplug 的支持。     # mkdir -p /usr/lib/hotplug/firmware   # cd /usr/lib/hotplug/firmware   # wget http://prism54.org/firmware/isl3890   #   # cd /etc/hotplugs   # wget http://prism54.org/~hvr/firmware.agent     6)調整你的lilo&grub   默認情況下,make install & modules_install成功的話,會自動在你的引導配置文件中加入 新內核的引導行,如果沒有的話,那麼就手工添加一下吧。   lilo需要重新lilo -s安裝,grub則即刻就可以生效。   全部設置完成之後,重新啟動。   7)加載驅動   # insmod /lib/modules/`uname -a`/kernel/lib/firmware_class.o   # insmod /lib/modules/`uname -a`/kernel/driver/net/wireless/prism54/prism54.o   # iwconfig -a   # ifconfig -a     如果你的rp夠好的話,那麼謝天謝地,你又成功的扮演了一次小白鼠的角色。   如果出現任何錯誤的話,返回第三條重來,直到成功或退出。   如果返回第三條的話,別忘了make clean之後再make xconfig。




Copyright © Linux教程網 All Rights Reserved