1、下载源码
https://www.sqlite.org/download.html
2、解压并创建install文件夹
tar vxf sqlite-autoconf-3420000.tar.gz
mkdir install
3、配置交叉编译工具链
./configure ac_cv_func_malloc_0_nonnull=yes --host=arm-linux-gnueabihf --enable-static --prefix=$(pwd)/install/
4、编译
make
make install
5、查看编译后的文件
在install文件夹里
file lib*
6、复制编译后的文件到开发板
开发板挂载nfs目录:
mount -t nfs -o nolock,nfsvers=3 192.168.10.100:/home/alientek/linux/nfs /mnt
将install/bin文件夹中的文件sqlite3拷贝到开发板的/bin中:
cp /mnt/sqlite3 /bin
并将install/lib中的文件拷贝到开发板的/lib中:
cp /mnt/lib/lib* /lib
7、验证移植成功
万里之行始于足下!