I. Development Environment:
Mini2440,
Linux_2.6.32.2 kernel,
Ubuntu 9.10,
Arm-linux-gcc-4.3.2
Download the sqlitesource code sqlite-3.6.22.tar.gz
2. Migration steps
1. decompress the database source file and enter the decompressed directory, as shown below:
Tar-zxvf sqlite-3.6.22.tar.gz cd sqlite-3.6.22
2. Create a directory build and enter the directory for cross-compilation in this directory, as shown below:
Mkdir build
Cd build
3. Run the configure script in the sqlite-3.6.22 In the build directory to generate the Makefile file, as shown below:
../Configure -- host = arm-linux -- prefix =/root/sqlite-3.6.22/build/target
The option host specifies the path after the prefix option is compiled and installed by using the arm cross compiler. You can set it as needed.
4. Run the make and make install commands as follows:
Make
Make install
After compilation and installation, three target folders are generated in the/root/sqlite-3.6.22/build/target directory:
Bin, include, lib,
Then, download the files in bin to the/usr/bin directory of the Development Board,
Download all files under lib to the/usr/lib directory of the Development Board. I
The nclude directory is the header file of the C language API of sqlite, which is used for programming.
5. Test the transplanted sqlite database on the Development Board. Log on to the Linux System of the Development Board and run:
Sqlite3 demo. db
Sqlite3 is a command line access program for sqlite. demo. db is the name of the new database and must be suffixed with db. The following figure shows that the migration is successful.