Embedded Linux-migration of Embedded Database SQLite on 2440

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.