嵌入式Linux下3G模块的驱动和应用.docx

上传人:b****5 文档编号:3841340 上传时间:2022-11-25 格式:DOCX 页数:19 大小:20.56KB
下载 相关 举报
嵌入式Linux下3G模块的驱动和应用.docx_第1页
第1页 / 共19页
嵌入式Linux下3G模块的驱动和应用.docx_第2页
第2页 / 共19页
嵌入式Linux下3G模块的驱动和应用.docx_第3页
第3页 / 共19页
嵌入式Linux下3G模块的驱动和应用.docx_第4页
第4页 / 共19页
嵌入式Linux下3G模块的驱动和应用.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

嵌入式Linux下3G模块的驱动和应用.docx

《嵌入式Linux下3G模块的驱动和应用.docx》由会员分享,可在线阅读,更多相关《嵌入式Linux下3G模块的驱动和应用.docx(19页珍藏版)》请在冰豆网上搜索。

嵌入式Linux下3G模块的驱动和应用.docx

嵌入式Linux下3G模块的驱动和应用

嵌入式Linux下3G模块的驱动和应用

1、            开发资源

1.1、硬件资源:

ZTE-mf637u(中国联通)

ZTE-mu351(中国移动)

 

1.2、软件资源:

1.2.1、usb-modeswitch-1.1.3

  libusb-0.1.12.tar.gz

  usb-modeswitch-1.1.3.tar.bz2

 

1.2.2、ppp-2.4.4

  libpcap-0.9.8.tar.gz

  ppp-2.4.4.tar.gz

 

1.2.3、wvdial

1.2.3.1、wvdial-1.54.0(arm-linux-gcc3.4.1)

zlib-1.2.5.tar.bz2

  openssl-0.9.7g.tar.gz

  openssl-0.9.7g-fix_manpages-1.patch

wvstreams-4.0.1.tar.bz2

wvstreams-4.0.1-tcl84-1.patch

  wvdial-1.54.0.tar.gz

1.2.3.2、wvdial_1.60.4(arm-linux-gcc4.2.2)

zlib-1.2.5.tar.bz2

  openssl-0.9.8n.tar.gz

  openssl-0.9.8n-fix_manpages-1.patch

  wvstreams-4.6.1.tar.gz

  wvdial_1.60.4.tar.gz

 

2、            Linux开发环境

2.1、主机环境

2.1.1、主机linux系统

  FedoraCore6

 

2.1.2、主机编译环境

2.1.2.1、gcc-v

Usingbuilt-inspecs.

Target:

i386-redhat-linux

Configuredwith:

../configure--prefix=/usr--mandir=/usr/share/man--infodir=/usr/share/info--enable-shared--enable-threads=posix--enable-checking=release--with-system-zlib--enable-__cxa_atexit--disable-libunwind-exceptions--enable-libgcj-multifile--enable-languages=c,c++,objc,obj-c++,java,fortran,ada--enable-java-awt=gtk--disable-dssi--enable-plugin--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre--with-cpu=generic--host=i386-redhat-linux

Threadmodel:

posix

gccversion4.1.120061011(RedHat4.1.1-30)

 

2.1.2.2、/usr/local/arm/3.4.1/bin/arm-linux-gcc-v

Readingspecsfrom/usr/local/arm/3.4.1/lib/gcc/arm-linux/3.4.1/specs

Configuredwith:

/work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/configure--target=arm-linux--host=i686-host_pc-linux-gnu--prefix=/usr/local/arm/3.4.1--with-headers=/usr/local/arm/3.4.1/arm-linux/include--with-local-prefix=/usr/local/arm/3.4.1/arm-linux--disable-nls--enable-threads=posix--enable-symvers=gnu--enable-__cxa_atexit--enable-languages=c,c++--enable-shared--enable-c99--enable-long-long

Threadmodel:

posix

gccversion3.4.1

 

2.1.2.3、/usr/local/arm/4.2.2/usr/bin/arm-linux-gcc-v

Usingbuilt-inspecs.

Target:

arm-unknown-linux-gnueabi

Configuredwith:

/home/scsuh/workplace/coffee/buildroot-20071011/toolchain_build_arm/gcc-4.2.2/configure--prefix=/usr--build=i386-pc-linux-gnu--host=i386-pc-linux-gnu--target=arm-unknown-linux-gnueabi--enable-languages=c,c++--with-sysroot=/usr/local/arm/4.2.2-eabi/--with-build-time-tools=/usr/local/arm/4.2.2-eabi//usr/arm-unknown-linux-gnueabi/bin--disable-__cxa_atexit--enable-target-optspace--with-gnu-ld--enable-shared--with-gmp=/usr/local/arm/4.2.2-eabi//gmp--with-mpfr=/usr/local/arm/4.2.2-eabi//mpfr--disable-nls--enable-threads--disable-multilib--disable-largefile--with-arch=armv4t--with-float=soft--enable-cxx-flags=-msoft-float

Threadmodel:

posix

gccversion4.2.2

 

2.2、开发板环境

2.2.1、CES-6410开发平台

  SamsungS3C6410X,ARM1176JZF-S

  128MB, MobileDDRSDRAM

  USBHOST:

一个USBHOST接口,USB2.0全速(12Mbits/s)

 

3、            Linux应用软件的编译

3.1、usb-modeswitch-1.1.3

[root@localhostcdma]#tarxzflibusb-0.1.12.tar.gz

[root@localhostcdma]#cplibusb-0.1.12libusb-0.1.12-arm

[root@localhostcdma]#cdlibusb-0.1.12-arm

[root@localhostlibusb-0.1.12-arm]#./configure--prefix=/works/cdma/install--host=arm-linuxCC=arm-linux-gccCXX=arm-linux-g++

[root@localhostlibusb-0.1.12-arm]#make

[root@localhostlibusb-0.1.12-arm]#makeinstall

[root@localhostlibusb-0.1.12-arm]#cd..

 

[root@localhostcdma]#tarxjfusb-modeswitch-1.1.3.tar.bz2

[root@localhostcdma]#cpusb-modeswitch-1.1.3usb-modeswitch-1.1.3-arm

[root@localhostcdma]#cdusb-modeswitch-1.1.3-arm

[root@localhostusb-modeswitch-1.1.3-arm]#

修改Makefile

CC         =gcc

改为

CC         =arm-linux-gcc

CFLAGS     +=-Wall-lusb

改为

CFLAGS     +=-Wall-lusb-I/works/cdma/install/include-L/works/cdma/install/lib

修改usb_modeswitch.c

//                   readConfigFile("/etc/usb_modeswitch.setup");

改为

                     readConfigFile("/etc/usb_modeswitch.setup");

[root@localhostusb-modeswitch-1.1.3-arm]#make

[root@localhostusb-modeswitch-1.1.3-arm]#makeinstall

[root@localhostusb-modeswitch-1.1.3-arm]#cd..

[root@localhostcdma]#

 

3.2、ppp-2.4.4

[root@localhostcdma]#tarxzflibpcap-0.9.8.tar.gz

[root@localhostcdma]#cplibpcap-0.9.8libpcap-0.9.8-arm

[root@localhostlibpcap-0.9.8-arm]#./configure--prefix=/works/cdma/install--host=arm-linux--with-pcap

make:

***Noruletomaketarget`pcap-yes.o',neededby`libpcap.a'. Stop.

修改Makefile

PSRC= pcap-yes.c

改为

PSRC= pcap-linux.c

[root@localhostlibpcap-0.9.8-arm]#make

[root@localhostlibpcap-0.9.8-arm]#makeinstall

[root@localhostlibpcap-0.9.8-arm]#cd..

 

[root@localhostcdma]#tarxzvfppp-2.4.4.tar.gz

[root@localhostcdma]#cdppp-2.4.4

[root@localhostppp-2.4.4]#./configure--host=arm-linux

vipppd/Makefile

 

LIBS   +=-lpcap

CFLAGS +=-DPPP_FILTER

改为

LIBS   +=-lpcap-L../../libpcap-0.9.8

CFLAGS +=-DPPP_FILTER-I../../libpcap-0.9.8

 

[root@localhostppp-2.4.4]#makeCC=arm-linux-gcc

 

3.3、wvdial

3.3.1、wvdial-1.54.0

[root@localhostwvdial-1.54.0]#exportPATH=/usr/local/arm/3.4.1/bin:

$PATH

[root@localhostwvdial-1.54.0]#tarxjfzlib-1.2.5.tar.bz2

[root@localhostwvdial-1.54.0]#cdzlib-1.2.5

[root@localhostzlib-1.2.5]#./configure--prefix=/works/wvdial-1.54.0/install

修改Makefile

CC=arm-linux-gcc

CPP=arm-linux-gcc-E

AR=arm-linux-arrc

RANLIB=arm-linux-ranlib

[root@localhostzlib-1.2.5]#make

[root@localhostzlib-1.2.5]#makeinstall

 

[root@localhostwvdial-1.54.0]#tarxzfopenssl-0.9.7g.tar.gz

[root@localhostwvdial-1.54.0]#cdopenssl-0.9.7g

[root@localhostopenssl-0.9.7g]#patch-Np1-i../openssl-0.9.7g-fix_manpages-1.patch

[root@localhostopenssl-0.9.7g]#./Configure--prefix=/works/wvdial-1.54.0/installos/compiler:

arm-linux-gcc

[root@localhostopenssl-0.9.7g]#make

[root@localhostopenssl-0.9.7g]#makeinstall

[root@localhostopenssl-0.9.7g]#cd..

 

[root@localhostwvdial-1.54.0]#tarxjfwvstreams-4.0.1.tar.bz2

[root@localhostwvdial-1.54.0]#cdwvstreams-4.0.1

[root@localhostwvstreams-4.0.1]#patch-Np1-i../wvstreams-4.0.1-tcl84-1.patch

修改configure

with_openssl=no

改为

with_openssl=yes

(有两处)

[root@localhostwvstreams-4.0.1]#./configure--prefix=/works/wvdial-1.54.0/install--host=arm-linuxCFLAGS=-I/works/cdma/install/includeLDFLAGS=-L/works/cdma/install/lib/--with-zlib=/works/cdma/zlib-1.2.5--with-openssl=/works/cdma/openssl-0.9.8n--without-dbus--with-pam=no--with-tcl=no--with-qt=no

[root@localhostwvstreams-4.0.1]#make

linkinglibwvutils.so...

/usr/lib/libz.so:

couldnotreadsymbols:

Invalidoperation

collect2:

ldreturned1exitstatus

make:

***[libwvutils.so]Error1

[root@localhostwvstreams-4.0.1]#arm-linux-gcc-L./xplc-L/works/cdma/install/lib/-L./xplc -L.-g -Wl,-soname,libwvutils.so.4.0-shared-olibwvutils.soutils/strcrypt.outils/verstring.outils/wvaudioencoder.outils/wvbase64.outils/wvbdbhash.outils/wvcrash.outils/wvdiriter.outils/wvgzip.outils/wvhashtable.outils/wvhex.outils/wvmagiccircle.outils/wvmatrix.outils/wvqdbmhash.outils/wvrateadjust.outils/wvserialize.outils/wvshmzone.outils/wvstringtable.outils/wvsubproc.outils/wvtest.outils/wvwordwrap.olibwvbase.so     -lsupc++-lgcc_eh

[root@localhostwvstreams-4.0.1]#make

[root@localhostwvstreams-4.0.1]#viwvrules.mk

XX_LIBS:

=$(XX_LIBS)$(shell$(CC)-lsupc++-lgcc_eh2>&1|grep-q"undefinedreference"&&echo"-lsupc++-lgcc_eh")

改为

XX_LIBS:

=$(XX_LIBS)$(shell$(CC)-lsupc++-lgcc_eh2>&1|grep-q"undefinedreference"&&echo"-lz-lcrypt-lsupc++-lgcc_eh")

[root@localhostwvstreams-4.0.1]#make

compilingcrypto/wvtripledes.o...

crypto/wvtripledes.cc:

Inmemberfunction`virtualbool

  WvTripleDESEncoder:

:

_encode(WvBuf&,WvBuf&,bool)':

crypto/wvtripledes.cc:

108:

error:

cannotconvert`constunsignedchar*'to`

  unsignedchar(*)[8]'forargument`1'to`voidDES_ecb3_encrypt(unsigned

  char(*)[8],unsignedchar(*)[8],DES_key_schedule*,DES_key_schedule*,

  DES_key_schedule*,int)'

make:

***[crypto/wvtripledes.o]Error1

解决方法:

crypto/wvtripledes.cc

修改

#ifOPENSSL_VERSION_NUMBER>=0x0090705FL

改为

#if0

 

compilingcrypto/wvx509.o...

crypto/wvx509.cc:

Inmemberfunction`WvStringWvX509Mgr:

:

get_extension(int)':

crypto/wvx509.cc:

1168:

error:

invalidconversionfrom`unsignedchar**'to`

  constunsignedchar**'

crypto/wvx509.cc:

1171:

error:

invalidconversionfrom`unsignedchar**'to`

  constunsignedchar**'

make:

***[crypto/wvx509.o]Error1

解决方法:

crypto/wvx509.cc

                   if(method->it)

                       ext_data=ASN1_item_d2i(NULL,&ext->value->data,

                                               ext->value->length,

                                               ASN1_ITEM_ptr(method->it));

                   else

                       ext_data=method->d2i(NULL,&ext->value->data,

                                             ext->value->length);

改为

                   if(method->it)

                       ext_data=ASN1_item_d2i(NULL,(constunsignedchar**)&ext->value->data,

                                               ext->value->length,

                                               ASN1_ITEM_ptr(method->it));

                   else

                       ext_data=method->d2i(NULL,(constunsignedchar**)&ext->value->data,

                                             ext->value->length);

 

compilingstreams/wvpam.o...

streams/wvpam.cc:

Inmemberfunction`boolWvPam:

:

authenticate(const

  WvFastString&,constWvFastString&,constWvFastString&)':

streams/wvpam.cc:

71:

error:

`fail'undeclared(firstusethisfunction)

streams/wvpam.cc:

71:

error:

(Eachundeclaredidentifierisreportedonlyonce

  foreachfunctionitappearsin.)

make:

***[streams/wvpam.o]Error1

解决方法:

   returnfail;

改为

   returnfalse;

 

[root@localhostwvstreams-4.0.1]#makeinstall

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 数学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1