1、下载源码
http://download.qt.io/archive/qt/5.9/5.9.7/single/
2、解压
tar -xvf qt-everywhere-opensource-src-5.9.7.tar.xz
3、进入源码目录
将目录qt-everywhere-opensource-src-5.9.7/qtbase/mkspecs下的文件夹“linux-arm-gnueabi-g++”
复制一份并改名为:linux-aarch64-himix100-g++
打开改名后的文件夹下面的文件“qmake.conf”,将“arm-linux-gnueabi”全部替换为“aarch64-himix100-linux”,如下图所示:
4、回到源码根目录下执行
不带tslib
./configure -release -opensource -confirm-license -xplatform linux-aarch64-himix100-g++ -prefix /opt/qt5.9.7_hi3559av100 -no-opengl -no-iconv
带tslib
./configure -release -opensource -confirm-license -xplatform linux-aarch64-himix100-g++ -prefix /opt/qt5.9.7_hi3559av100_tslib -sql-sqlite -no-opengl -tslib -I/opt/tslib_hi3559av100/include -L/opt/tslib_hi3559av100/lib
5、编译
make && make install
编译大于需要2个小时
6、嵌入式端
将文件夹"/opt/qt5.9.7_hi3559av100"复制到nfs目录下面,设置环境变量
不带tslib
export LD_LIBRARY_PATH=/lib:/usr/lib:/nfsroot/qt5.9.7_hi3559av100/lib:/nfsroot/qt5.9.7_hi3559av100/plugins/imageformats
export QT_QPA_PLATFORM_PLUGIN_PATH=/nfsroot/qt5.9.7_hi3559av100/plugins
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_QPA_FONTDIR=/nfsroot/qt5.9.7_hi3559av100/fonts
带tslib
然后打开海思的vo和hifb,可以参考本人修改的sample_hifb.c
https://download.csdn.net/download/year12/11368095
然后运行Qt的例程,位于examples文件夹内
来源:CSDN
作者:year12
链接:https://blog.csdn.net/year12/article/details/96170989