arm-linux移植MT7601Uusb无线网卡(小度wifi,360随身WIFI 2代)

时间:2014-05-04 18:50:16   收藏:0   阅读:653

前段时间移植过RT3070,RT5370

http://blog.csdn.net/ofaith12345/article/details/24138399

发现各种arm移植都大同小异,所以就不要纠结与2440,6410,也不用纠结linux,或者android

1.编译内核,方法如移植RT5370,此处不多言

2.下载linux驱动,免得大家到处找,这里有

http://download.csdn.net/detail/ofaith12345/7290109

3.解压

# tar jxf D-PO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2

改个容易记的名

# mv DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/MT7601U

4.改Makefile

# gedit Makefile

注释line 30

#PLATFORM = PC

取消注释line 49

PLATFORM = SMDK

找到line 275

ifeq ($(PLATFORM),SMDK)
LINUX_SRC = /home/bhushan/itcenter/may28/linux-2.6-samsung
CROSS_COMPILE = /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-

改为

ifeq ($(PLATFORM),SMDK)
LINUX_SRC = /home/adream/work/android-kernel/linux-2.6.36-android
CROSS_COMPILE = arm-linux-

LINUX_SRC 为步骤1中编译后内核的路径

CROSS_COMPILE为编译链,有时不行就加上绝对路径吧

保存关闭

5.修改 include/rtmp_def.h

# gedit include/rtmp_def.h

找到line 1604,将

#define INF_MAIN_DEV_NAME		"ra"
#define INF_MBSSID_DEV_NAME		"ra"

改成

#define INF_MAIN_DEV_NAME		"wlan"
#define INF_MBSSID_DEV_NAME		"wlan"

6.修改支持USB设备ID

先不要插上小度

# lsusb

再插上

# lsusb

对比发现,多了一个设备

Bus 002 Device 006: ID 2955:1001

修改支持ID

# gedit common/rtusb_dev_id.c

找到line 42

#ifdef MT7601U
	{USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */
	{USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */
添加刚才的ID,其实全加上也可以,一般就这几种ID

#ifdef MT7601U
	{USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */
	{USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */
	{USB_DEVICE(0x2955,0x0001)}, /* XiaoDu Wifi */
	{USB_DEVICE(0x2955,0x1001)}, /* XiaoDu Wifi */
	{USB_DEVICE(0x148f,0x760b)}, /* 360 Wifi */
#endif /* MT7601U */

7.编译,我电脑是双核,用4线程编译可以快点

# make -j 4

8.压缩驱动

# arm-linux-strip -S os/linux/mt7601Usta.ko
9.复制到ARM板上

# cp RT2870STA.dat os/linux/mt7601Usta.ko /media/FRIENDLYARM/MT7601U/
# cp /sdcard/MT7601U/mt7601Usta.ko /system/lib/modules/2.6.36-FriendlyARM/

上面路径是在android上的,如果是linux没有system路径

# mkdir –p /etc/Wireless/RT2870STA/

# cp /sdcard/MT7601U/RT2870STA.dat /etc/Wireless/RT2870STA/
10.载入驱动

# depmod
# modprobe mt7601Usta

11.可以上网了,但这里有个有个严重问题还没解决~
       串口不停有信息返回,停不下来,后续解决~











arm-linux移植MT7601Uusb无线网卡(小度wifi,360随身WIFI 2代),布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!