SQLite-3.3.13在ARM2410s 开发板上的移植
2010-04-23 19:20
288 查看
SQLite-3.3.13在ARM2410s 开发板上的移植
Compile SQLite using the cross-compiler such as arm-linux-gcc
first, get sqlite-3.3.13.tar.gz from www.sqlite.org unzip it,
#tar -zxvf sqlite-3.3.13.tar.gz
change into the sqlite-3.3.13 directory
cd sqlite-3.3.13
make a new directory such as 'build' under sqlite-3.3.13 directory,
open the configure-script using your favorite text-editor ,such as:
#vi configure
I recomamnd that you make a copy of configure before editing the configure file
cp configure configure.old
and edit the configure.
Comment out the following commands by putting a '#' in front of them(looks like):
#if test "$cross_compiling" = "yes"; then
# { { echo "$as_me:$LINENO:: error: unable to find a compiler for building build tools" >&5
#echo "$as_me: error: unable to find a compiler for building build tools" >&2;}
# { (exit 1); exit 1; }; }
#fi
. . .
#else
# test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
. . .
#else
# test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
Save the configure script, change into the build directory you created and call the edited configure script from the sqlite
directory by using the following option:
../sqlite/configure --disable-tcl --host=arm-linux
After that configure should have created a Makefile and a libtool script in your build directory.
Open the Makefile using your favorite text editor and find the following lines:
BCC = arm-linux-gcc -g -O2
change to
BCC = gcc -g -O2
The reason for these changes is that the created files have to be executed on the PC during the compilation, so we have to
compile them with the standard gcc and not the arm-linux-gcc.
if you want compile static library version of sqlite3(only one execute file for distribution) on ARM, edit Makefile ,
find
sqlite3$(TEXE): $(TOP)/src/shell.c .libs/libsqlite3.la sqlite3.h
change to
sqlite3$(TEXE): $(TOP)/src/shell.c .libs/libsqlite3.a sqlite3.h
find
-o $@ $(TOP)/src/shell.c .libs/libsqlite3.la
change to
-o $@ $(TOP)/src/shell.c .libs/libsqlite3.a
save and quit editor
run 'make' command to create the sqlite3 execute file, after a successful compile,Now you should find a hiden “.libs”
directory in your build directory containing sqlite shared object files, like libsqlite.so or static libray files like
libsqlite3.a .
run 'arm-linux-strip sqlite3' to decrease the execute file size.
upload the sqlite3 to target ARM9 board by any FTP client and make it executive:
on ARM9 board with terminal or telnet ,run
chmod 775 sqlite3
and then run sqlite3 like this
sqlite3 ex2
,if you see the following messages:
SQLite version 3.3.13 Enter ".help" for instructions
sqlite>
Compile SQLite using the cross-compiler such as arm-linux-gcc
first, get sqlite-3.3.13.tar.gz from www.sqlite.org unzip it,
#tar -zxvf sqlite-3.3.13.tar.gz
change into the sqlite-3.3.13 directory
cd sqlite-3.3.13
make a new directory such as 'build' under sqlite-3.3.13 directory,
open the configure-script using your favorite text-editor ,such as:
#vi configure
I recomamnd that you make a copy of configure before editing the configure file
cp configure configure.old
and edit the configure.
Comment out the following commands by putting a '#' in front of them(looks like):
#if test "$cross_compiling" = "yes"; then
# { { echo "$as_me:$LINENO:: error: unable to find a compiler for building build tools" >&5
#echo "$as_me: error: unable to find a compiler for building build tools" >&2;}
# { (exit 1); exit 1; }; }
#fi
. . .
#else
# test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
. . .
#else
# test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
Save the configure script, change into the build directory you created and call the edited configure script from the sqlite
directory by using the following option:
../sqlite/configure --disable-tcl --host=arm-linux
After that configure should have created a Makefile and a libtool script in your build directory.
Open the Makefile using your favorite text editor and find the following lines:
BCC = arm-linux-gcc -g -O2
change to
BCC = gcc -g -O2
The reason for these changes is that the created files have to be executed on the PC during the compilation, so we have to
compile them with the standard gcc and not the arm-linux-gcc.
if you want compile static library version of sqlite3(only one execute file for distribution) on ARM, edit Makefile ,
find
sqlite3$(TEXE): $(TOP)/src/shell.c .libs/libsqlite3.la sqlite3.h
change to
sqlite3$(TEXE): $(TOP)/src/shell.c .libs/libsqlite3.a sqlite3.h
find
-o $@ $(TOP)/src/shell.c .libs/libsqlite3.la
change to
-o $@ $(TOP)/src/shell.c .libs/libsqlite3.a
save and quit editor
run 'make' command to create the sqlite3 execute file, after a successful compile,Now you should find a hiden “.libs”
directory in your build directory containing sqlite shared object files, like libsqlite.so or static libray files like
libsqlite3.a .
run 'arm-linux-strip sqlite3' to decrease the execute file size.
upload the sqlite3 to target ARM9 board by any FTP client and make it executive:
on ARM9 board with terminal or telnet ,run
chmod 775 sqlite3
and then run sqlite3 like this
sqlite3 ex2
,if you see the following messages:
SQLite version 3.3.13 Enter ".help" for instructions
sqlite>
相关文章推荐
- 嵌入式arm210开发板移植sqlite
- loongson 1B 开发板移植sqlite3.6.20
- SQLite移植到arm
- SQlite在PC和ARM上的编译移植
- s3c2440 arm+linux 开发板移植rt3070驱动笔记
- sqlite移植到arm(二)
- linux sqlite3 arm平台移植
- 移植alsa_lib到ARM210开发板
- Linux中,SQLITE移植到开发板实现
- 基于loongson1b开发板(mips架构)移植apache+sqlite3+php5
- 移植SQLite到开发板
- 成功移植SQLite3到ARM Linux开发板
- MPlayer在ARM上的移植(S5PV210开发板)
- sqlite3移植到arm-linux
- u-boot移植第二弹——移植2012.10u-boot到RealARM210 cortex-A8开发板
- u-boot移植第三弹——移植2013.10u-boot到RealARM210 cortex-A8开发板(支持moviNAND_Fusing_Tool_v2.0)
- sqlite移植到arm(一)
- SQlite在PC和ARM上的编译移植
- ubuntu14.04安装arm版QT4.8.6(QtEmbedded-4.8.6-arm)并移植到开发板beagleboard-xm
- sqlite 移植到arm平台 和测试