嵌入式Linux USB WIFI驱动的移植

本文详细介绍了如何在飞思卡尔MX258开发板上,基于Linux2.6.31内核,移植RT2860 USB WIFI模组的驱动。内容包括USB HOST接口测试、驱动下载、编译、配置、加载和卸载,以及无线网络工具的安装和使用,最后通过wpa_supplicant连接WIFI。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

硬件平台:飞思卡尔MX258开发板

操作系统:Linux2.6.31

WIFI    RT2860 USB WIFI模组

交叉编译环境:gcc version 4.1.2

 

调试步骤:

第一步:测试USB HOST接口

menuconfig中将USB HOST设置为内核模式:

 

重新编译内核后启动开发板,插入U盘并挂载:

mount /dev/sda1 /tmp

ls /tmp

可以看到U盘已经正常挂载,测试USB HOST OK!

第二步:网上下载雷凌最新的USB驱动,

2011_0107_RT3070_RT3370_Linux_STA_v2[1].5.0.1_DPO.tar.bz2

拷备到Linux目录并解压:

tar  jxf  2011_0107_RT3070_RT3370_Linux_STA_v2[1].5.0.1_DPO.tar.bz2

由于上面名字很长,可以修改为简短的名字:

mv  2011_0107_RT3070_RT3370_Linux_STA_v2[1].5.0.1_DPO  RT3070_Linux_STA

第三步:进入RT3070_Linux_STA目录,看到有一个README_STA_usb文件,里面介绍了如何加载该驱动:

=======================================================================

Build Instructions: 

====================

 

1> $tar -xvzf DPB_RT2870_Linux_STA_x.x.x.x.tgz

    go to "./DPB_RT2870_Linux_STA_x.x.x.x" directory.

   

2> In Makefile

          set the "MODE = STA" in Makefile and chose the TARGET to Linux by set "TARGET = LINUX"

          define the linux kernel source include file path LINUX_SRC

          modify to meet your need.

 

3> In os/linux/config.mk

         define the GCC and LD of the target machine

         define the compiler flags CFLAGS

         modify to meet your need.

         ** Build for being controlled by NetworkManager or wpa_supplicant wext functions

            Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.

            => #>cd wpa_supplicant-x.x

            => #>./wpa_supplicant -Dwext -ira0 -c wpa_supplicant.conf -d

         ** Build for being controlled by WpaSupplicant with Ralink Driver

            Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n'.

            => #>cd wpa_supplicant-0.5.7

            => #>./wpa_supplicant -Dralink -ira0 -c wpa_supplicant.conf -d

 

4> $make

         # compile driver source code

         # To fix "error: too few arguments to function ˉiwe_stream_add_event"

           => $patch -i os/linux/sta_ioctl.c.patch os/linux/sta_ioctl.c

 

5> $cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat

   

6> load driver, go to "os/linux/" directory.

    #[kernel 2.4]

    #    $/sbin/insmod rt2870sta.o

    #    $/sbin/ifconfig ra0

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值