rui

rui

0个粉丝

2

问答

0

专栏

0

资料

rui  发布于  2015-08-05 14:42:12
采纳率 0%
2个问答
5266

关于3518E平台移植rt5370WiFi的问题

 
本帖最后由 rui 于 2015-8-5 14:51 编辑

我在3518E上面移植RT5370WiFi 时出现了一些问题,过程和问题如下:
我们的移植工作先从配置kernel开始,
1.配置内核
Networking support==>Wireless 下80211相关配置选上
Device Drivers==>Network deivce support==>Wireless LAN==> <*>   Ralink driver support  --->全选
Device Drivers==>USB support下EHCI HCD support、OHCI HCD support 、USB Wireless Device Management support

2. 移植rt5370驱动
a.解压源码
2011_0719_RT3070_RT3370_RT5370_RT5372_RT2070_Linux_STA_V2.5.0.3_DPO.bz2

b.修改顶层Makefile
修改平台为Hi3518E: #PLATFORM = PC PLATFORM = HI3518E
添加平台内核路径及编译工具
ifeq ($(PLATFORM),HI_3518E)
LINUX_SRC = /opt/Hi3518_SDK_V1.0.8.1/osdrv/kernel/linux-3.0.y
CROSS_COMPILE = arm-hisiv100nptl-linux-
export ARCH=arm
endif
c.修改配置文件 修改os/linux/config.mk
使能wpa supplicant # Support Wpa_Supplicant HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network MagangeHAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
d.添加平台
ifeq ($(PLATFORM),HI_3518E)
#WFLAGS += -DRT_BIG_ENDIAN
Endif
将CFLAGS修改为EXTRA_CFLAGS
ifeq ($(PLATFORM),HI_3518E)
        EXTRA_CFLAGS := -v -D__KERNEL__ -DMODULE -I$(LINUX_SRC)/include -I$(RT28xx_DIR)/include -mbig-endian -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale -malignment-traps -msoft-float $(WFLAGS)
        EXTRA_CFLAGS := -v $(WFLAGS) -I$(RT28xx_DIR)/include
        export CFLAGS        
endif

e.编译 make clean;make –j 4 编译OK
f.部署到开发板
将os/linux/rt5370sta.ko放入开发板ko目录下 将RT2870STA.dat放入开发板/etc/Wireless/RT2870STA/目录下
f.加载5370驱动 #insmod rt5370sta.ko
rtusb init rt2870 --->
=== pAd = c4ea4000, size = 510192 ===
<-- RTMPAllocTxRxRingMemory, Status=0
<-- RTMPAllocAdapterBlock, Status=0
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x1000,pAd->Flags=0x0
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x1000,pAd->Flags=0x0
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x1000,pAd->Flags=0x0
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x580,pAd->Flags=0x0
usbcore: registered new interface driver rt2870
g.查看模块是否存在
#
# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 002: ID 148f:5370
#
# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:01:02:03:04:10  
          inet addr:192.168.0.85  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::201:2ff:fe03:410/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43098 errors:0 dropped:3 overruns:0 frame:0
          TX packets:14146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3986865 (3.8 MiB)  TX bytes:1023671 (999.6 KiB)
          Interrupt:12

lo        Link encap:Local Loopback  
          LOOPBACK  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra0       Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
有ra0 说明已经识别,我们启用该模块
Ifconfig – ra0 up
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x1000,pAd->Flags=0x0
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x9, Idx=0x34,pAd->Flags=0x0
(Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc]
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=IN, Req=0x7, Idx=0x1000,pAd->Flags=0x0
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3000,pAd->Flags=0x0
        Request Value=0xffff!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3002,pAd->Flags=0x0
        Request Value=0x02ff!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3004,pAd->Flags=0x0
        Request Value=0x2810!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3006,pAd->Flags=0x0
        Request Value=0x1002!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3008,pAd->Flags=0x0
        Request Value=0x023b!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x300a,pAd->Flags=0x0
        Request Value=0x8610!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x300c,pAd->Flags=0x0
        Request Value=0x1602!
#
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x300e,pAd->Flags=0x0
        Request Value=0x024e!
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3010,pAd->Flags=0x0
        Request Value=0x4f16!
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3012,pAd->Flags=0x0
        Request Value=0x1702!
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3014,pAd->Flags=0x0
        Request Value=0x0233!
#
RTUSB_VendorRequest failed(-110),TxFlags=0x0, ReqType=OUT, Req=0x2, Idx=0x3016,pAd->Flags=0x0
        Request Value=0x3817!

就会持续打印以上信息,该问题困扰我好几天了,这个问题是不是我配置内核后者修改驱动源码时出问题导致的还是其他原因,请大牛协助定位下,谢谢!
我来回答
回答3个
时间排序
认可量排序

rui

0个粉丝

2

问答

0

专栏

0

资料

rui 2015-08-05 17:57:19
认可0
搞定了 原来海思加载KO的时候关闭了供电导致的,#关闭USB PHY的总电源:0x20050080 [12]bit配置为0 himm 0x20050080 0x000121a8  #关闭USB PHY的模拟电源:0x20050084 [22]bit配置为1 himm 0x20050084 0x005d2188改为#关闭USB PHY的总电源:0x20050080 [12]bit配置为0 himm 0x20050080 0x000131a8  #关闭USB PHY的模拟电源:0x20050084 [22]bit配置为1 himm 0x20050084 0x001d2188

灰太狼

0个粉丝

0

问答

0

专栏

0

资料

灰太狼 2015-08-07 11:30:30
认可0
向楼主学习了

liaihua1997

0个粉丝

0

问答

0

专栏

0

资料

liaihua1997 2015-08-07 15:17:57
认可0
呵呵,利害,
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区