现在的位置: 首页 > 综合 > 正文

qt-embedded-linux-opensource-src-4.5.2 触摸屏版的移植-基于mips

2013年08月31日 ⁄ 综合 ⁄ 共 3009字 ⁄ 字号 评论关闭

转载请说明本文的链接




1.下载qt-embedded-linux-opensource-src-4.5.2.tar.bz2

   下载地址:http://get.qtsoftware.com/qt/source/

  
qt-embedded-linux-opensource-src-4.5.2.tar.bz2

2.配置

   ./configure  -prefix /opt/qt-4.5.2 -embedded mips -no-opengl -qt-mouse-tslib

 

   由于我之前已经交叉编译了所需要的库,所以这里就不再说明。

   配置结果如下:

Build ............... libs examples demos docs translations
Configuration .......  cross_compile release shared dll embedded largefile stl precompile_header exceptions_off  minimal-config small-config medium-config large-config full-config qt3support accessibility embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-mng system-png png system-tiff freetype system-zlib nis openssl svg webkit scripttools release
Debug ............... no
Qt 3 compatibility .. yes
QtDBus module ....... no
QtScriptTools module  yes
QtXmlPatterns module  no
Phonon module ....... no
SVG module .......... yes
WebKit module ....... yes
STL support ......... yes
PCH support ......... yes
MMX/3DNOW/SSE/SSE2..  no/no/no/no
IPv6 support ........ yes
IPv6 ifname support . yes
getaddrinfo support . yes
getifaddrs support .. yes
Accessibility ....... yes
NIS support ......... yes
CUPS support ........ no
Iconv support ....... no
Glib support ........ no
GStreamer support ... no
Large File support .. yes
GIF support ......... plugin
TIFF support ........ plugin (system)
JPEG support ........ plugin (system)
PNG support ......... yes (system)
MNG support ......... plugin (system)
zlib support ........ system
Session management .. no
Embedded support .... mips
Freetype2 support ... auto (yes)
Graphics (qt) ....... linuxfb multiscreen
Graphics (plugin) ...
Decorations (qt) .... styled windows default
Decorations (plugin) 
Keyboard driver (qt). tty
Keyboard driver (plugin)
Mouse driver (qt) ... pc linuxtp tslib
Mouse driver (plugin)
OpenGL support ...... no
SQLite support ...... plugin (qt)
OpenSSL support ..... yes (run-time)

3.编译安装

   gmake

   gmake install

4.把安装的文件放入文件系统

   所有的文件将被安装到/opt/qt-4.5.2目录,先删除一些头文件之类的无用东西,再直接把qt-4.5.2打成一个bz包,然后解压到我的文件系统/opt目录下。

5.触摸屏的环境变量

  在qt程序运行之前,必须导出以下环境变量,你可以保存为一个脚本,让开机的时候自动导出这些变量。

---------------------------------

#!/bin/sh



TSLIB_ROOT=/usr



export
 PATH
=$PATH:$TSLIB_ROOT/bin


export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib


export
 TSLIB_CONSOLEDEVICE=none


export
 TSLIB_FBDEVICE=/dev/fb


export
 TSLIB_TSDEVICE=/dev/ts


export
 TSLIB_CALIBFILE=/etc/pointercal


export
 TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf


export
 TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts


export
  QWS_MOUSE_PROTO=tslib:/dev/ts


export
 QTDIR=/opt/qt-
4.5.2


export
 TSLIB_TSEVENTTYPE=
"H3600"

---------------------------------

我这里将它保存为ts.sh,并放入/etc/profile.d/目录下,由于我的启动脚本会自动运行/etc/profile.d/目录下的*.sh文件,所以启动的时候我就不用手动的去导出了。

6.制作文件系统

   mkyaffs2image 2 root yaffs.img

   这样就可以制作出一个yaffs文件系统的镜像了,直接下载到相应的flash地址。

7.运行

   到demos下面任意找一个程序,如:demos/books/books -qws,作为第一个运行的程序,必须带参数-qws运行,表示同时启动qt server,后面的程序都不用带-qws.

8.qt-4.5.2运行速度给我的感觉

   我的CPU是MIPS 400MHz左右,相当于s3c2440的水平,启动第一个程序-qws时,books -qws大概需要3s,运行browser -qws需要6s,其他大型一点的程序会超过10s.感觉速度还是不够快,另外,消耗内存也比较严重,我这次移植仅是为了看它的效果,以确定是否适合公司的方案,我们打算用64MB的内存,但这似乎不够Qt使用,公司会不会采用Qt,还要作进一步的对比,X+Gtk, DirectFB+Gtk都有可能是Qt杀手,因为我们要综合考虑整体的性价比。

 

   做过Qt,X+Gtk, DirectFB+Gtk三者的比较的同行朋友,请回帖指点笔者,





谢!

 

 

 

关键字:qt 4.5.2移植, qt 4.5.2 触摸屏 ,qt mips处理器

 

 

 

 

 

抱歉!评论已关闭.