移植支援 Atheros AR9331 SoC 的 compat-wireless driver (ath9k)

Bycodeant

移植支援 Atheros AR9331 SoC 的 compat-wireless driver (ath9k)

 Atheros AR9331是一顆SoC,CPU跟WiFi chip已經整合在一起了,

在移植compat-wireless無線驅動的過程中,需要下面的步驟:

1.    進入compat-wireless-2012-04-17的目錄下,由於預設的配置文件中,並沒有啟用對本論文所採用硬體的支援,因此首先必須修改 config.mk 檔案,開啟對Atheros AR9331 SoC的支援,修改配置如下:

export CONFIG_ATH9K_AHB=y #開啟對Atheros AR9331 SoC的支援 

2.    修改完成後,執行下列指令進行編譯,其中$(KERNEL_DIR)為Linux內核原始碼(Source Code)的所在路徑:

make ARCH=mips CROSS_COMPILE=mips-linux- KLIB=$(KERNEL_DIR) KLIB_BUILD=$(KERNEL_DIR) 

3.    編譯完成後可得下列的內核模組:

./compat/compat.ko  
./drivers/net/wireless/ath/ath.ko 
./drivers/net/wireless/ath/ath9k/ath9k.ko 
./drivers/net/wireless/ath/ath9k/ath9k_common.ko 
./drivers/net/wireless/ath/ath9k/ath9k_hw.ko 
./net/mac80211/mac80211.ko  
./net/wireless/cfg80211.ko

4.    因為編譯出來的內核模組有相依性,因此載入順序及指令如下:

insmod compat.ko 
insmod cfg80211.ko 
insmod mac80211.ko 
insmod ath.ko 
insmod ath9k_hw.ko 
insmod ath9k_common.ko 
insmod ath9k.ko

About the author

codeant administrator

Leave a Reply