步骤一:http://www.sqlite.org/download.html 下载Linux版本的源码:
步骤二:创建新建文件夹sqlite forlinx@ubuntu:~$ mkdir sqlite forlinx@ubuntu:~$ cd sqlite |
步骤三:将下载好的压缩包解压到该目录 forlinx@ubuntu:~/sqlite$ ls sqlite-autoconf-3390100.tar.gz forlinx@ubuntu:~/sqlite$ tar -vxf sqlite-autoconf-3390100.tar.gz forlinx@ubuntu:~/sqlite$ ls sqlite-autoconf-3390100 sqlite-autoconf-3390100.tar.gz |
步骤四:新建install文件夹,用于存放后来生产的lib库函数和可执行文件 forlinx@ubuntu:~/sqlite$ cd sqlite-autoconf-3390100 forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ mkdir install |
步骤五:进入install目录,获取绝对路径 forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ cd install forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install$ pwd /home/forlinx/sqlite/sqlite-autoconf-3390100/install |
步骤六:使用configure配置文件 forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ . /opt/fsl-imx-xwayland/4.14-sumo/envir onment-setup-aarch64-poky-linux forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ ./configure --prefix=/home/forlinx/sqlite/ sqlite-autoconf-3390100/install --host=arm-linux |
--prefix指定源码交叉编译后生成文件的路径,刚才新建的install文件夹 --host指定软件运行环境为arm-linux 步骤七:make 、make install forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ make forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ make install forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100$ cd install forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install$ ls bin include lib share |
步骤八:拷贝文件到开发板 forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install$ cd bin forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install/bin$ cp sqlite3 ../lib/ forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install/bin$ cd ../lib/ forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install/lib$ ls libsqlite3.a libsqlite3.la libsqlite3.so libsqlite3.so.0 libsqlite3.so.0.8.6 pkgconfig sqlite3 forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install/lib$ tar -zcvf sqlite3.tar.gz libsqlite.so libs qlite3.so.0 libsqlite3.so.0.8.6 sqlite3 forlinx@ubuntu:~/sqlite/sqlite-autoconf-3390100/install/lib$ cp sqlite.tar.gz /media/forlinx/BOOT/ |
步骤九: 进入开发板,将压缩包拷贝到开发板并解压,并将libsqlite3.so libsqlite3.so.0.8.6 libsqlite3.so.0 放到/lib/路径下,将sqlite3 放到/bin/路径下 测试移植成功与否:直接输入sqlite3 即可 |