欢迎来到天天文库
浏览记录
ID:11527011
大小:57.50 KB
页数:6页
时间:2018-07-12
《华为3g网卡e1750在omap3530上移植》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、一、环境1、 开发板内核:linux-2.6.28-omap2、 3G卡片:华为E1750二、相关工具1 usb-modeswitch-1.0.2.tar.bz2usb_modeswitch这个工具来进行3G模式转换2libusb-0.1.12.tar.gzlibusb提供给usb_modeswitch一套系统API三、交叉编译1.交叉编译libusb解压并进入libusb-0.1.12目录,建立子目录install用于存放最后生存的库文件与头文件。[root@libusb-0.1.12]#
2、mkdirinstall配置并生成Makefile文件[root@libusb-0.1.12]#./configure--build=i686-linux--host=arm-none-linux-gnueabi--prefix=/home/libusb-0.1.12/install[root@libusb-0.1.12]#make[root@libusb-0.1.12]#makeinstall(我的交叉编译器是arm-none-linux-gnueabi,你的可能是arm-linux)2.交叉编译usb
3、_modeswitch(1)修改Makefile文件CC=arm-none-linux-gnueabi(2)将libusb里的库头文件拷到交叉编译器的include和lib目录下(3)make(4)修改usb_modeswitch-1.0.2目录下的usb_modeswitch.conf文件#HuaweiE1750DefaultVendor=0x12d1DefaultProduct=0x1446 TargetVendor=0x12d1TargetProduct=0x1001 #onlyforreferen
4、ceand0.xversionsMessageEndpoint=0x01MessageContent="55534243123456780000000000000011060000000000000000000000000000"HuaweiMode=03.将上面生成的libusb动态库拷贝到文件系统的库目录下,将上面生成的usb_modeswitch可执行程序和usb_modeswitch.setup拷贝到文件系统/usr/sbin和/etc目录下。四、交叉编译3G卡片驱动在2.6.28内核源码中驱动/
5、driver/usb/serial/option.c中加入3G卡片的ID信息:#defineHUAWEI_PRODUCT_E17500x1446Makemenuconfig选上编译这个文件的选项修改文件drivers/usb/storage/unusual_devs.h,去掉对移植网卡ID的屏蔽,关于此官方是这样说的:KernelrelatedissuesInsomenewerkernels,certaindevicefamilies(someOption,someHuawei,someZTEasment
6、ionedabove)getaspecialtreatmentintheusb-storagecodetoenableswitchingrightaway.YouwouldnotneedUSB_ModeSwitchanymoreforthesespecificdvices;ontheotherhandyouhavenochoiceofaccessingthe"CD-ROM"partofyourdevice.Plus,therewerecaseswhenthespecialtreatmentbroughtn
7、oresultsandfurthermorepreventedUSB_ModeSwitchtoworkproperlyafterwards(happenedwithZTEdevices,error"-2").Incaseoftrouble,lookinto"unusual_devs.h"inthe"drivers/usb/storage"folderofyourkernelsource.IfyourdefaultID(vendorandproductIDofthestoragepart)canbefoun
8、dthereandyougeterrorswhenrunningUSB_ModeSwitch,tryfirsttoblacklist"usb-storage".Ifthathelps,youshouldconsiderrebuildingyourkernelwiththeentryin"unusual_devs.h"deactivated.Theonlythingthatwillhappenisthatusb-storagew
此文档下载收益归作者所有