添加如下内核选项:(因为mini2440默认内核没有添加该功能,所以需要重新配置内核) -> Device Drivers x -> Network device support x -> Network device support (NETDEVICES [=y]) <*> PPP (point-to-point protocol) support [*] PPP multilink support (EXPERIMENTAL) [*] PPP filtering <*> PPP support for async serial ports <*> PPP support for sync tty ports <*> PPP Deflate compression <*> PPP BSD-Compress compression <*> PPP MPPE compression (encryption) (EXPERIMENTAL) <*> PPP over Ethernet (EXPERIMENTAL)
· 增加内核支持USB转Serial驱动
-> Device Drivers x -> USB support x -> USB Serial Converter support x -> USB Serial Converter support (USB_SERIAL [=y]) [*]USB Generic Serial DriverUSB driver for GSM and CDMA modems
> Device Drivers > USB support
make ARCH=arm menuconfig配置USB驱动: <*> USB Mass Storage support
[*] USB Mass Storage verbose debug
<*> Realtek Card Reader support
[*] Realtek Card Reader autosuspend support
<*> Datafab Compact Flash Reader support◇ USB驱动> Device Drivers > USB support
<*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
MUSB Mode Selection (Dual Role mode) --->
<*> Platform Glue Layer (TI DSPS platforms) --->
MUSB DMA mode (Disable DMA (always use PIO)) --->
<*> USB Serial Converter support --->
[*] USBGeneric Serial Driver
<*> USBdriver for GSM and CDMA modems
· 修改内核:
编译3G模块的驱动option.ko:配置内核时3G驱动对应的选项“USB
driver for GSM and CDMA modems”需编译成模块,才能在后面转换时生成ttyUSB0、ttyUSB1、ttyUSB2。 修改usb的3G驱动文件 driver//usb/serial/option.c在其中加入3G卡片的HUAWEI_VENDOR_ID
0x12D1和HUAWEI_PRODUCT_EC1260 0x1446。直接找到对应位置添加即可。无需添加别的代码,编译成模块。注意此处的应该生成三个模块,option.ko . usb_wwan.ko,及usbserial.ko文件。
A. 解压并进入libusb-1.0.9目录,建立子目录install用于存放最后生存的库文件与头文件。 [y@-Inspiron-5437:~/3G/libusb-1.0.9]# mkdir install B. 配置并生成Makefile文件 y@-Inspiron-5437:~/3G/libusb-1.0.9]#./configure --build=i686-linux --host=arm-linux --prefix=/home/y/3G/libusb-1.0.9/install C. [y@-Inspiron-5437:~/3G/libusb-1.0.9]#make D. [y@-Inspiron-5437:~/3G/libusb-1.0.9]# make install
与上面编译libusb的方法类似: A.[y@-Inspiron-5437:~/3G/libusb-compat-0.1.5]#.mkdir install B . [y@-Inspiron-5437:~/3G/libusb-compat-0.1.5]#./configure --build=i686-linux --host=arm-linux --prefix=/home/y/3G/libusb-compat-0.1.5/install C. [y@-Inspiron-5437:~/3G/libusb-compat-0.1.5]#make D. [y@-Inspiron-5437:~/3G/libusb-compat-0.1.5]#make install
4. 交叉编译usb_modeswitch
A.修改Makefile文件 修改STRIP和CC选项为: STRIP = arm-linux-strip (注意:这行在Makefie中没用,直接添加即可) CC = arm-linux-gcc B.可以将上面的libusb和libusb-compat的库和头文件拷贝到交叉编译器的lib和include目录下 (注意:libusb和libusb-compat的库和头文件位于上面新建的install下,交叉编译其所有找到安装ARM-Linux-工具的目录下)
C. make