一、主题:移植Python-3.6.9到ARM开发板上,例如RK3399,J5等平台。
二、步骤:
1、下载源码
2、编译步骤
1641 ./configure --host=aarch64-linux-gnu --build=armv7 --prefix=$PWD/../python_install --enable-ipv6 --enable-shared ac_cv_file__dev_ptmx="yes" ac_cv_file__dev_ptc="no" 1642 make 1643 ls 1644 file python 1645 make install 1646 cd .. 1647 cp -rf python_install /media/sf_vmshare/ 1648 cd python_install 1649 ls 1650 history 33 charlie@ubuntu18046:~/work/python/python_install$ file ./bin/python3.6 ./bin/python3.6: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=5af8fda7cb554f943ae11bae93c7d799018d5c7d, for GNU/Linux 3.7.0, with debug_info, not stripped charlie@ubuntu18046:~/work/python/python_install$
主要是 :./configure;make;make install
./configure ARCH=arm64 --build=x86_64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --enable-ipv6 --enable-shared ac_cv_file__dev_ptmx="yes" ac_cv_file__dev_ptc="no"
–host是交叉编译工具链,–build表示编译出来的程序运行的处理器,–prefix表示安装目录。
三、移植开发板测试
四、/usr/bin
相关库,可执行程序,设置好环境变量。即可使用python,不用绝对路径了。
联系客服