海思3536:交叉编译Qt4.8.4
来源:互联网 发布:js 字符串寻找子串 编辑:程序博客网 时间:2024/06/07 18:27
一、交叉编译qt
1、下载Qt源码包qt-everywhere-opensource-src-4.8.4.tar.gz;
2、解压Qt源码包tar -xvfzqt-everywhere-opensource-src-4.8.4.tar.gz
3、创建qmake.conf
3.1在qt-everywhere-opensource-src-4.8.4/mkspecs/qws/下创建linux-hisiv400-g++;
3.2将qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-g++/下内容拷贝到3.1新建的文件夹中;
3.3 修改qmake.conf,如下
# 设置交叉编译工具链:
# 本项目使用的交叉编译工具是 arm-hisiv400-linux-g++
#
QMAKE_CC = arm-hisiv400-linux-gcc
QMAKE_CXX = arm-hisiv400-linux-g++
QMAKE_LINK = arm-hisiv400-linux-g++
QMAKE_LINK_SHLIB = arm-hisiv400-linux-g++
QMAKE_AR = arm-hisiv400-linux-ar cqs
QMAKE_OBJCOPY =arm-hisiv400-linux-objcopy
QMAKE_STRIP =arm-hisiv400-linux-strip
4、配置Qt编译选项
4..1 编译源码方式:
查看嵌入式QTE命令:./configure –embedded –help
通过进行裁剪得到下边配置参数:
进入Qt解压目录,执行如下命令(红色字体:根据自己的平台配置):
./configure -prefix /usr/local/Qt-4.8.4-arm -platform qws/linux-x86-g++-embedded arm -xplatform /qws/linux-hisiv400-g++ -stl -qt-mouse-pc -release -no-fast-qt-gfx-transformed -shared -no-largefile -no-system-proxies -no-exceptions-no-accessibility -no-sql-QDB2-no-sql-QIBASE -no-sql-QMYSQL -no-sql-QOCI -no-sql-QODBC -no-sql-QPSQL -no-sql-QSQLITE2-no-sql-QSQLITE -no-sql-QSYMSQL -no-sql-QTDS -no-armfpa -no-qt3support-no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-svg -no-webkit -no-javascript-jit -no-script -no-scripttools -no-declarative -no-declarative-debug -no-mmx -no-3dnow-no-sse -no-sse2 -qt-zlib -qt-libpng-no-libmng -no-libjpeg -no-opengl -no-openssl -no-nis -no-cups -iconv -pch -no-separate-debug-info -no-dbus -depths16,18,24,32 -little-endian -no-glib -nomake part -reduce-relocations -no-gtkstyle -qt-freetype -opensource
4.2 配置完毕输出如下内容:
This is the Qt for Embedded Linux OpenSource Edition.
You are licensed to use this software underthe terms of
the Lesser GNU General Public License(LGPL) versions 2.1.
You are also licensed to use this softwareunder the terms of
the GNU General Public License (GPL)versions 3.
Type '3' to view the GNU General PublicLicense version 3.
Type 'L' to view the Lesser GNU GeneralPublic License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.
Do you accept theterms of either license? Yes
5、make
6、sudo make intall
在/usr/local/Qt-4.8.4-arm中生成目标
二、配置目标板
1、将usr/local/Qt-4.8.4-arm中lib及plugins拷贝到目标板/usr/local/Qt-4.8.4-arm目录下
2、在目标版的/etc/profile里添加如下内容:
export QT_INSTALL_PATH=/usr/local/Qt-4.8.4-arm
exportLD_LIBRARY_PATH=/lib:/usr/lib:${QT_INSTALL_PATH}/lib:${LD_LIBRARY_PATH}
export QT_QWS_FONTDIR=${QT_INSTALL_PATH}/lib/fonts
exportQT_QWS_DISPLAY=linuxFB:/dev/fb0
注意:交叉编译时安装目录和目标板上的qt库存放目录一致时(1、中两个红色的目录一致),可不用设置上述环境变量。
3、source /etc/profile使环境变量立即生效。
4、配置/dev/fb0
4.1 将/dev/fb0设置为RGB8888模式(Qt需要在该模式下运行)
4.2 参考Hi3536_SDK_V2.0.4.0/mpp_single/sample/hifbsd/sample_hifb.c
4.3 使用分支4,compression模式:在执行ioctl函数后,挂起程序。提示:需要修改的位置有个注释//opencompress;
4.4 重新编译生成sample_hifb
三、测试运行
1、交叉编译一个Qt demo,拷贝到目标板上
2、加载hifb.ko(可以使用load3536 -a,加载全部模块)
3、运行sample_hifb &(屏幕会成绿色)
4、运行Qt demo(加-qws选项)
5、屏幕出现demo界面,成功!
- 海思3536:交叉编译Qt4.8.4
- 交叉编译QT4.8.4
- 交叉编译QT4.8.4
- 交叉编译QT4.8.4
- 交叉编译qt4.8.4 for ARM
- 交叉编译Qt4
- 交叉编译Qt4.8.2
- 交叉编译Qt4.8.2
- 交叉编译QT4.7.0
- 交叉编译QT4.7.0
- 交叉编译QT4.7.0
- qt4.8.7交叉编译
- Qt4.7.3交叉编译移植
- [交叉编译qt4.8.4 for ARM]遇到到问题
- qt4桌面和交叉编译统一脚本
- ubuntu下搭建Qt4交叉编译平台
- 3.3.2 交叉编译Qt4.7
- QT4.8.3 arm平台交叉编译
- 2017.3.24 MATLAB(三)数组与矩阵
- Java Character 类
- 初学python,爬虫小项目
- session 文件同步
- |算法讨论|二分查找 学习笔记
- 海思3536:交叉编译Qt4.8.4
- CodeforcesBeta Round #19 D. Points 离线线段树 单点更新 离散化
- HDU4081-Qin Shi Huang's National Road System(次小生成树)
- 活学活用Python01:谷歌翻译小助手
- Rslogix5000 中随机数制作。
- IDEA像eclipse那样鼠标移到方法上显示javadoc
- springmvc接收参数和页面传值
- (教程)Windows server 2008下新建ftp站点图文教程
- 完全图生成树计数