开发环境:
· 硬件平台:pv210开发板
· 主机环境:Ubuntu10.04
· Linux内核:Linux-2.6.35
· 无线USB网卡 腾达 型号:W311M
· WIFI方案:RT5370 1、解压RT5370驱动源码
解压 tar –jvxf DPO_RT5572_LinuxSTA_2.6.1.3_20121022.tar.bz2
或者解压 tar xvf ralink_sta_linux_v2.5.03.tar.bz2
$ cd ralink_sta_linux_v2.5.03 4.#vi os/linux/usb_main_dev.c
//编辑 usb_main_dev.c
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL"); //添加此行 修改驱动源码根目录下的Makefile
注掉26行:PLATFORM=PC
解开45 行:PLATFORM=SMDK
修改244行和255行:
LINUX_SRC=/usr/local/arm/linux-2.6.35(内核源码目录) //你自己的内核
CROSS_COMPILE=arm-none-linux-gnueabi- 修改源代码文件;
i. 修改include/rtmp_def.h默认设备节点的定义,修改第1476行和1477行”ra”为”wlan” 修改/os/linux/config.mk,使其支持WPA_Supplicant。修改56行和60行为’y’; $ make clean
$ make [size=+1]出现的问题: 1、缺少头文件bulid.h:
把linux虚拟机里的文件拷贝到相应的目录下。 2、RtmpOSFileOpen(): Error 2 opening /etc/Wireless/RT2870STA/RT2870STA.dat
rtusb init rt2870 ---> === pAd = f4943000, size = 518280 ===
<-- RTMPAllocTxRxRingMemory, Status=0
<-- RTMPAllocAdapterBlock, Status=0
usbcore: registered new interface driver rt2870
(Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
RTMP_TimerListAdd: add timer obj f498ab00!
RTMP_TimerListAdd: add timer obj f498ab48!
RTMP_TimerListAdd: add timer obj f498ab90!
RTMP_TimerListAdd: add timer obj f498aab8!
RTMP_TimerListAdd: add timer obj f498a9e0!
RTMP_TimerListAdd: add timer obj f498aa28!
RTMP_TimerListAdd: add timer obj f49555b4!
RTMP_TimerListAdd: add timer obj f4944d40!
RTMP_TimerListAdd: add timer obj f4944d90!
RTMP_TimerListAdd: add timer obj f49556a0!
RTMP_TimerListAdd: add timer obj f4955524!
RTMP_TimerListAdd: add timer obj f4955654!
-->RTUSBVenderReset
<--RTUSBVenderReset RtmpOSFileOpen(): Error 2 opening /etc/Wireless/RT2870STA/RT2870STA.dat
Open file "/etc/Wireless/RT2870STA/RT2870STA.dat" failed! 1. Phy Mode = 0
ERROR!!! RTMPReadParametersHook failed, Status[=0x00000001]
!!! rt28xx Initialized fail !!! 把源码的RT2870STA.dat 拷贝到自己建的文件夹RT2870STA里,
路径:/etc/Wireless/RT2870STA/RT2870STA.dat
这个地方定义在./include/os/rt_linux.h(可以对名字更该,要和arm根目录下的路径一致)
|