歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Gentoo 安裝之intel無線網卡篇

Gentoo 安裝之intel無線網卡篇

日期:2017/2/28 15:54:27   编辑:Linux教程

最近裝gentoo還是遇到了很多困難。特別是無線網卡比較讓人頭疼。因為我這裡只有無線的環境,無線網絡無法驅動的話gentoo相當於就是個殘廢,上 不了網後面的基本上就免談了。廢話說到這裡。我看了很多的資料,終於找到一個驅動無線網卡的方法。放在這裡,相當於是做個筆記。
gentoo wiki上推薦了一個叫做iwlwifi的東東,好像是叫做intel wireless wifi。就是intel為了他自己的無線網卡開發的的一個開源驅動,適用於Intel PRO/Wireless 3945ABG/BG或者更新型號的intel無線網卡。這個驅動在2.6.24以後的內核中已經被包含進來了。如果你安裝的發行版本是gentoo,並 且網卡是intel 3945abg/4956agn的話,那麼你就接著看下面的內容吧。

相關閱讀:

Gentoo 安裝之intel無線網卡篇 http://www.linuxidc.com/Linux/2012-03/56744.htm

Gentoo 安裝之intel Core2 CPU篇 http://www.linuxidc.com/Linux/2012-03/56745.htm

Gentoo 安裝之intel GMA顯卡篇 http://www.linuxidc.com/Linux/2012-03/56745.htm

首先是編譯內核中需要主意的事項。

1.打開"mac80211"無線網絡堆棧和加密選項(Cryptographic)的WEP,WAP和WPA2支持。

Linux Kernel Configuration:
Networking --->
[*] Networking support
Wireless --->
[*] Improved wireless configuration API
[*] nl80211 new netlink interface support
<*> Generic IEEE 802.11 Networking Stack (mac80211)
[*] Cryptographic API --->
--- Cryptographic API
<*> Cryptographic algorithm manager
<*> SHA1 digest algorithm
<*> SHA224 and SHA256 digest algorithm
<*> ECB support
<*> CBC support
<*> PCBC support
<*> AES cipher algorithms
<*> ARC4 cipher algorithm
<*> Michael MIC keyed digest algorithm
2.確認你已經在kernel中打開了"General Setup"的"Prompt for development and/or incomplete code/drivers"選項。否則你在kernel的配置中無法配置iwlwifi drivers選項。
Linux Kernel Configuration:
General Setup --->
[*] Prompt for development and/or incomplete code/drivers
3.等會你將為你的intel無線網卡安裝對應的microcode.你可以通過portage來安裝。iwlwifi驅動會在啟動的時候裝載這個micorcode。為了讓它能正常工作起來,我們需要啟用內核的firmware_loader支持:
Linux Kernel Configuration:
Device Drivers --->
Generic Driver Options --->
[*] Userspace firmware loading support

注意
:在後面的步驟中,強烈建議你把驅動編譯為模塊,因為驅動需要通過文件系統來加載網卡的固件。如果你把驅動編譯到內核中,那麼他將無法加載無線網卡的固件因為文件系統在內核加載之後才會被掛載上。

4.後面的設置對於2.6.25和2.6.26的內核就不一樣了,需要分別設置
1)for linux kernel 2.6.25
如果你的無線網卡是Intel PRO/Wireless 3945AGB/BG,那麼啟用iwl3945的驅動.
Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
[*] Enable Wireless QoS in iwl3945 driver
[*] Enable Spectrum Measurement in iwl3945 drivers
或者你的無線網卡是Intel Wireless WiFi 4965AGN,那麼啟用iwl4965的驅動.
Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Intel Wireless WiFi 4965AGN
[*] Enable Wireless QoS in iwl4965 driver
[*] Enable 802.11n HT features in iwl4965 driver
[*] Enable Spectrum Measurement in iwl4965 driver
[*] Enable Sensitivity Calibration in iwl4965 driver

2)for linux kernel >>= 2.6.26
如果你的無線網卡是Intel PRO/Wireless 3945AGB/BG,那麼啟用iwl3945的驅動.
Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<*> Intel Wireless Wifi Core
[*] IWLWIFI RF kill support
< > Intel Wireless WiFi 4965AGN
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
[*] Enable Spectrum Measurement in iwl3945 drivers
或者你的無線網卡是Intel Wireless WiFi 4965AGN,那麼啟用iwl4965的驅動.
Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<*> Intel Wireless Wifi Core
[*] IWLWIFI RF kill support
<M> Intel Wireless WiFi 4965AGN
[*] Enable 802.11n HT features in iwl4965 driver
[*] Enable Spectrum Measurement in iwl4965 driver
[*] Enable Sensitivity Calibration in iwl4965 driver
< > Intel PRO/Wireless 3945ABG/BG Network Connection
2.6.26以後的內核中加入了對網卡LED信號燈的支持,但是你需要知道的是當網卡通信的時候LED會不停地閃爍。
Linux Kernel Configuration:
Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
[*] Wireless LAN (IEEE 802.11)
<M> Intel PRO/Wireless 3945ABG/BG Network Connection
[*] Enable LEDS features in iwl3945 driver

內核的設置到此為止,下面是軟件的了,你需要安裝microcode文件

當上面的內容都完成之後你需要為你的無線網卡安裝對應的固件來保證網卡正常工作。下面是一個關於micorcode的簡單(並不完整)的描述。是從iwl3945-ucode包中自帶的文件README.iwlwifi-3945-ucode中提取出來的:
Note: Quote: README.iwlwifi-3945-ucode

The file iwlwifi-3945.ucode provided in this package is required to be present on your system in order for the Intel PRO/Wireless 3945ABG/BG Network Connection Adapter driver for Linux (iwlwifi-3945) to be able to operate on your system.

On adapter initialization, and at varying times during the uptime of the adapter, the microcode is loaded into the RAM on the network adapter. The microcode provides the low level MAC features including radio control and high precision timing events (backoff, transmit, etc.) while also providing varying levels of packet filtering which can be used to keep the host from having to handle packets that are not of interest given the current operating mode of the device.安裝microcode只需要簡單的emerge net-wireless/iwl3945-ucode就可以了
emerge -av net-wireless/iwl3945-ucode或者你的網卡是4956abn,那麼emerge net-wireless/iwl4965-ucode
emerge -av net-wireless/iwl4965-ucode 注意: 在2.6.27或者更新的內核中你需要安裝iwl4956-ucode的第二個版本(version 228.57.2.21)
強烈建議你詳細閱讀microcode自帶的README文件,它能告訴你很多如何設置這個設備的有用信息。一般來說你可以在/usr/share/doc/iwl3945-ucode-*/或者/usr/share/doc/iwl4956-ucode-*/發現他們。前面的星號是代表你包的版本。

iwlwifi的優點:其實新無線網絡堆棧是個必然趨勢,而且傳輸速度更快了。

Reference:gentoo-wiki(iwlwifi)
Copyright © Linux教程網 All Rights Reserved