嵌入式Linux下3G模块的驱动和应用Word格式.docx
- 文档编号:16747585
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:19
- 大小:20.56KB
嵌入式Linux下3G模块的驱动和应用Word格式.docx
《嵌入式Linux下3G模块的驱动和应用Word格式.docx》由会员分享,可在线阅读,更多相关《嵌入式Linux下3G模块的驱动和应用Word格式.docx(19页珍藏版)》请在冰豆网上搜索。
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
/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
gccversion3.4.1
2.1.2.3、/usr/local/arm/4.2.2/usr/bin/arm-linux-gcc-v
arm-unknown-linux-gnueabi
/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
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
改为
=arm-linux-gcc
CFLAGS
+=-Wall-lusb
+=-Wall-lusb-I/works/cdma/install/include-L/works/cdma/install/lib
修改usb_modeswitch.c
//
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.
PSRC=
pcap-yes.c
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
+=-DPPP_FILTER
+=-lpcap-L../../libpcap-0.9.8
+=-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
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
***[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]#viwvrules.mk
XX_LIBS:
=$(XX_LIBS)$(shell$(CC)-lsupc++-lgcc_eh2>
&
1|grep-q"
undefinedreference"
&
echo"
-lsupc++-lgcc_eh"
)
-lz-lcrypt-lsupc++-lgcc_eh"
compilingcrypto/wvtripledes.o...
crypto/wvtripledes.cc:
Inmemberfunction`virtualbool
WvTripleDESEncoder:
:
_encode(WvBuf&
WvBuf&
bool)'
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)'
***[crypto/wvtripledes.o]Error1
解决方法:
crypto/wvtripledes.cc
修改
#ifOPENSSL_VERSION_NUMBER>
=0x0090705FL
#if0
compilingcrypto/wvx509.o...
crypto/wvx509.cc:
Inmemberfunction`WvStringWvX509Mgr:
get_extension(int)'
1168:
invalidconversionfrom`unsignedchar**'
constunsignedchar**'
1171:
***[crypto/wvx509.o]Error1
crypto/wvx509.cc
if(method->
it)
ext_data=ASN1_item_d2i(NULL,&
ext->
value->
data,
ext->
length,
ASN1_ITEM_ptr(method->
it));
else
ext_data=method->
d2i(NULL,&
length);
ext_data=ASN1_item_d2i(NULL,(constunsignedchar**)&
d2i(NULL,(constunsignedchar**)&
compilingstreams/wvpam.o...
streams/wvpam.cc:
Inmemberfunction`boolWvPam:
authenticate(const
WvFastString&
constWvFastString&
)'
71:
`fail'
undeclared(firstusethisfunction)
(Eachundeclaredidentifierisreportedonlyonce
foreachfunctionitappearsin.)
***[streams/wvpam.o]Error1
returnfail;
returnfalse;
[root@localhostwvstreams-4.0.1]#makeinstall
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 嵌入式 Linux 3G 模块 驱动 应用
![提示](https://static.bdocx.com/images/bang_tan.gif)