qt5.5.1在Cortex-a8上移植记录
来源:互联网 发布:人工智能屠宰场小女孩 编辑:程序博客网 时间:2024/04/25 14:56
使用Qt5.5.1源码包进行编译:下载地址 http://download.qt.io/official_releases/qt/
1、进入源码包根目录,配置qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
1 # 2 # qmake configuration for building with arm-linux-gnueabi-g++ 3 # 4 5 MAKEFILE_GENERATOR = UNIX 6 CONFIG += incremental 7 QMAKE_INCREMENTAL_STYLE = sublib 8 9 QT_QPA_DEFAULT_PLATFORM = linuxfb 10 QMAKE_CFLAGS_RELEASE += -O2 -march=armv7-a 11 QMAKE_CXXFLAGS_RELEASE += -O2 -march=armv7-a #cortex-a8 12 13 include(../common/linux.conf) 14 include(../common/gcc-base-unix.conf) 15 include(../common/g++-unix.conf) 16 17 # modifications to g++.conf 18 QMAKE_CC = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-gcc 19 QMAKE_CXX = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-g++ 20 QMAKE_LINK = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-g++ 21 QMAKE_LINK_SHLIB = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-g++ 22 23 # modifications to linux.c/usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi 24 QMAKE_AR = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-ar cqs 25 QMAKE_OBJCOPY = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-objcopy 26 QMAKE_NM = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-nm -P 27 QMAKE_STRIP = /usr/local/arm/arm-linux-gcc-4.8.3/bin/arm-none-linux-gnueabi-strip 28 load(qt_config)
2、配置编译选项
./configure -release -opensource -xplatform linux-arm-gnueabi-g++ -prefix /usr/local/qt -no-c++11 -no-opengl -no-dbus -no-icu -no-eglfs -no-iconv -I/usr/local/tslib/include -L/usr/local/tslib/lib
配置成功显示内容
This is the Qt Open Source Edition.You are licensed to use this software under the terms ofthe Lesser GNU General Public License (LGPL) versions 2.1.You are also licensed to use this software under the terms ofthe GNU Lesser General Public License (LGPL) versions 3.Type '3' to view the GNU Lesser General Public License version 3.Type 'L' to view the Lesser GNU General Public License version 2.1.Type 'yes' to accept this license offer.Type 'no' to decline this license offer.Do you accept the terms of either license? yesCreating qmake....Done.Running configuration tests...Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set. Configure summaryBuilding on: linux-g++ (x86_64, CPU features: mmx sse sse2)Building for: linux-arm-gnueabi-g++ (arm, CPU features: none detected)Platform notes: - Also available for Linux: linux-kcc linux-icc linux-cxx Build options: Configuration .......... accessibility audio-backend clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus enable_new_dtags evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify ipv6ifname large-config largefile linuxfb medium-config minimal-config mremap nis no-pkg-config pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config zlib Build parts ............ libs examples Mode ................... release Using sanitizer(s)...... none Using C++11 ............ no Using gold linker....... no Using new DTAGS ........ yes Using PCH .............. yes Target compiler supports: Neon ................. noQt modules and options: Qt D-Bus ............... yes (loading dbus-1 at runtime) Qt Concurrent .......... yes Qt GUI ................. yes Qt Widgets ............. yes Large File ............. yes QML debugging .......... yes Use system proxies ..... noSupport enabled for: Accessibility .......... yes ALSA ................... no CUPS ................... no Evdev .................. yes FontConfig ............. no FreeType ............... yes (bundled copy) Glib ................... no GStreamer .............. no GTK theme .............. no HarfBuzz ............... yes (bundled copy) Iconv .................. yes ICU .................... no Image formats: GIF .................. yes (plugin, using bundled copy) JPEG ................. yes (plugin, using bundled copy) PNG .................. yes (in QtGui, using bundled copy) journald ............... no libinput................ no mtdev .................. no Networking: getaddrinfo .......... yes getifaddrs ........... yes IPv6 ifname .......... yes libproxy.............. no OpenSSL .............. no NIS .................... yes OpenGL / OpenVG: EGL .................. no OpenGL ............... no OpenVG ............... no PCRE ................... yes (bundled copy) pkg-config ............. no PulseAudio ............. no QPA backends: DirectFB ............. no EGLFS ................ no EGLFS i.MX6....... . EGLFS KMS .......... no EGLFS Mali ......... EGLFS Raspberry Pi . EGLFS X11 .......... no LinuxFB .............. yes XCB .................. no Session management ..... yes SQL drivers: DB2 .................. no InterBase ............ no MySQL ................ no OCI .................. no ODBC ................. no PostgreSQL ........... no SQLite 2 ............. no SQLite ............... yes (plugin, using bundled copy) TDS .................. no tslib .................. no udev ................... no xkbcommon-x11........... no xkbcommon-evdev......... no zlib ................... yes (bundled copy)Info: creating super cache file /home/djq/Downloads/qt-everywhere-opensource-src-5.5.0/.qmake.superQt is now configured for building. Just run 'make'.Once everything is built, you must run 'make install'.Qt will be installed into /usr/local/qtPrior to reconfiguration, make sure you remove any leftovers fromthe previous build.
3、sudo make -j4 & sudo make install
方案1:主要原因是它依赖的dbus目录没有编译,解决方法如下:
#cd /home/hello/qt-everywhere-opensource-src-5.4.0/qtbase/src/dbus执行下面的
如没有Makefile,执行下面的命令
#../../bin/qmake dbus.pro
然后执行Make.
#make
编译成功后,再切换到/home/hello/qt-everywhere-opensource-src-5.4.0目录下,执行
#make
方案2:-no-dbus (注:当前使用方案)
问题2:make报错module-qt3d-install_subtargets 错误(参考http://my.oschina.net/u/1177171?disp=2&catalog=0&sort=time&p=1大婶的博客,灰常感谢)
方案1:在编译之前,还有个改动,额。。。qt3d和qtcanvas3d在编译的时候会报错,说是未识别模块,而且嵌入式的没有opengl,识别了也会报错,导致编译失败,而且编译配置参数里面也没有这两个模块的配置。我的解决方法简单粗暴,在配置时参数加-no-opengl,然后打开qt-everywhere-opensource-src-5.5.0/qt.pro文件,找到:
addModule(qt3d, qtdeclarative qtimageformats)
addModule(qtcanvas3d, qtdeclarative)
这两行注释掉(#号注释),或者直接删掉。如果不注释掉,即使加了-no-opengl也会报错,编译失败。
问题3:
make[3]: arm-none-linux-gnueabi-g++:命令未找到
make[3]: *** [.pch/Qt5WebChannel.gch/c++] 错误 127
make[3]:正在离开目录 `/home/djq/Downloads/qt-everywhere-opensource-src-5.5.0/qtwebchannel/src/webchannel'
make[2]: *** [sub-webchannel-install_subtargets] 错误 2
make[2]:正在离开目录 `/home/djq/Downloads/qt-everywhere-opensource-src-5.5.0/qtwebchannel/src'
make[1]: *** [sub-src-install_subtargets] 错误 2
make[1]:正在离开目录 `/home/djq/Downloads/qt-everywhere-opensource-src-5.5.0/qtwebchannel'
make: *** [module-qtwebchannel-install_subtargets] 错误 2
方案1:修改qmake.conf文件的交叉编译工具位置,设置为绝对路径错误消除。
4、板卡/etc/profile设置,使用Evdevtouch
echo "Compile usr app (gcc version 4.8.3),Support Qt version 5.5.1"# config qts env parm export QTDIR=/usr/local/qt export QPEDIR=$QTDIR export QT_QWS_FONTDIR=$QTDIR/lib/fonts export QWS_SIZE=1366x768 #export QWS_DISPLAY=LinuxFb:/dev/fb0 export PATH=$QTDIR/bin:$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/binexport LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0 export QT_QPA_GENERIC_PLUGINS=EvdevTouch:/dev/input/event1 #export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1:rotate=180 #可以使触摸屏旋转一定角度90-180-270
5、泰奇克电容触摸屏驱动配置文件/etc/eGTouchL.ini
Direction 3//[1] Invert X , [2] Invert Y , [4] Swap X wit xy各自镜像
1 0
- qt5.5.1在Cortex-a8上移植记录
- 移植QT到CORTEX-A8上的记录
- 移植QT到CORTEX-A8上的记录
- 移植QT到CORTEX-A8上的记录
- QT4.8.5在Cortex-A8上移植(pcduino)
- Cortex-A8上移植rt3070驱动出错
- tslib-1.4在OMAP3530(Cortex-A8)上的移植过程详解
- SPI在linux3.14.78 FS_S5PC100(Cortex A8)和S3C2440上驱动移植(deep dive)
- SPI在linux3.14.78 FS_S5PC100(Cortex A8)和S3C2440上驱动移植(deep dive)_0
- ubuntu上移植Qt-5.6.0到ARM Cortex-A8
- U-Boot在内核为Cortex-A8的飞思卡尔处理器i.MX53上的移植
- Cortex-A8处理器编程(上)
- Qt到Cortex-A8的移植
- opencv 移植到ti cortex a8
- opencv 移植到ti cortex a8
- cortex-A8 ARM核 opencv程序移植
- opencv 2.0 移植到spv210 cortex A8
- UCOS 在cortex-m3上的移植
- 高端的N 校联考题
- C++ 宏定义动态加载、工厂模式
- C#程序员开发WinForm必须知道的 Window 消息大全
- UVALive 3635-Pie-二分
- 火星人
- qt5.5.1在Cortex-a8上移植记录
- 使用PullToRefresh实现下拉刷新和上拉加载
- hdu 2803 The MAX
- OpenCV函数速查
- Android程序运行的Dalivk和Java程序运行的JVM虚拟机的区别?
- 轮播图的封装(MRC模式,若是ARC模式,需添加Compiler Flags:-fno-objc-arc)
- HDU1856
- 【基础练习】【差分】codevs1242 布局题解
- UISearchBar基本属性