一、环境介绍
1、主机环境:redhat
2、交叉编译器:arm-linux-gcc-4.3.2
3、软件包:sqlite-autoconf-3080701 .tar.gz
4、目标板:TQ2440
二、移植步骤
1、下载源码
地址:http://www.sqlite.org/download.html
2、解压
#tar xzvf sqlite-autoconf-3080701 .tar.gz
3、配置:
#cd sqlite-autoconf-3080701
#./configure --prefix=/usr/sqlite3 --host=arm-linux
4、编译
#make
若出现错误:arm-none-linux-gnueabi-gcc: 3.8.7.1": No such file or directory
修改Makefile中168行的 -DPACKAGE_STRING=\"sqlite\ 3.8.7.1\" 把3.8.7.1前面的空格去掉
重新编译
5、安装
#make install
会在/usr/sqlite3目录下生成bin、lib、include和share目录。
6、去掉调试信息(可选)
文件编译后会产生许多调试信息,下载到开发板将会占用较多存储器。为减小Flash占用去掉不必要的调试信息。在SQLite3目录下执行如下命令:
#arm-linux-strip bin/*
#arm-linux-strip lib/*
去掉调试信息后文件大小减小许多。
7、移植
//将SQLite3目录复制到根文件系统的/usr目录下
结束