rt3070 usb無線網絡卡驅動移植
阿新 • • 發佈:2019-01-31
核心配置:
Networking --->
<*> Generic IEEE 802.11 Networking Stack
Device Drivers --->
Generic Driver Options --->
<*> Userspace firmware loading support
Network device support --->
Wireless LAN (non-hamradio) --->
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
USB support --->
<*> Support for Host-side USB
[*] USB device filesystem
<*> Inventra Highspeed Dual Role Controller (TI, ...)
Driver Mode (USB Host) --->
(X) USB Host
( ) USB Peripheral (gadget stack)
( ) Both host and peripheral: USB OTG (On The Go) Device
[*] USB Monitor
RT28xx_MODE = STA
TARGET = LINUX
CHIPSET = 5370 #這裡不用改為3070,如果改為3070,在使用insmod載入模組的時候會提示找不到外部符號RT33xx_Init
OSABL = NO
RT28xx_DIR = $(shell pwd)
PLATFORM = DM6446
ifeq ($(PLATFORM),DM6446)
LINUX_SRC = /ipnc_dev/Application/src/ipnc_psp/ti-davinci #根據實際情況修改核心原始碼目錄
endif
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/config.mk修改:
# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y這裡一定要配置為y,否則無法使用wpa_supplicant進行配置
L765:
CFLAGS := -nostdinc -iwithprefix include -D__KERNEL__ -I$(RT28xx_DIR)/include -I$(LINUX_SRC)/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fno-omit-frame-pointer -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mlittle-endian -mabi=aapcs-linux -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -Wdeclaration-after-statement -c -o $(WFLAGS)
將編譯選項-mabi=apcs-gnu修改為-mabi=aapcs-linux或直接去掉
更多參考請看文件README_STA_usb
make進行編譯
複製os/linux/rt5370sta.ko到目標檔案系統
Networking --->
<*> Generic IEEE 802.11 Networking Stack
Device Drivers --->
Generic Driver Options --->
<*> Userspace firmware loading support
Network device support --->
Wireless LAN (non-hamradio) --->
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
USB support --->
<*> Support for Host-side USB
[*] USB device filesystem
<*> Inventra Highspeed Dual Role Controller (TI, ...)
Driver Mode (USB Host) --->
(X) USB Host
( ) USB Peripheral (gadget stack)
( ) Both host and peripheral: USB OTG (On The Go) Device
[*] USB Monitor
下面是驅動移植相關修改:
驅動我已經上傳到:
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/Makefile修改:RT28xx_MODE = STA
TARGET = LINUX
CHIPSET = 5370 #這裡不用改為3070,如果改為3070,在使用insmod載入模組的時候會提示找不到外部符號RT33xx_Init
OSABL = NO
RT28xx_DIR = $(shell pwd)
PLATFORM = DM6446
ifeq ($(PLATFORM),DM6446)
LINUX_SRC = /ipnc_dev/Application/src/ipnc_psp/ti-davinci #根據實際情況修改核心原始碼目錄
endif
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/config.mk修改:
# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y這裡一定要配置為y,否則無法使用wpa_supplicant進行配置
L765:
CFLAGS := -nostdinc -iwithprefix include -D__KERNEL__ -I$(RT28xx_DIR)/include -I$(LINUX_SRC)/include -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fno-omit-frame-pointer -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mlittle-endian -mabi=aapcs-linux -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -Wdeclaration-after-statement -c -o $(WFLAGS)
將編譯選項-mabi=apcs-gnu修改為-mabi=aapcs-linux或直接去掉
更多參考請看文件README_STA_usb
make進行編譯
複製os/linux/rt5370sta.ko到目標檔案系統
複製RT2870STA.dat到目標檔案系統/etc/Wireless/RT2870STA/
insmod rt5370sta.ko
ifconfig ra0 up
使用wpa_supplicant即可對無線網路進行配置