• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : 移植QTE 4.5.1 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 4545
精华: 3
发帖: 88
金钱: 810 两
威望: 614 点
综合积分: 236 分
注册时间: 2009-03-19
最后登录: 2020-06-17
楼主  发表于: 2009-06-15 11:10

 移植QTE 4.5.1

管理提醒: 本帖被 arm9home 从 Linux技术交流专区 移动到本区(2009-09-10)
整理了一下我移植QTE的一些步骤,此类网上很多,我不保证我的方法是最好的,我也不会把每一步做什么写得很清楚。
我所想要分享的是我的经验,而不是方法。

一些环境
busybox 1.14.1
qt-embedded-linux-opensource-src-4.5.1
tslib 1.4
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)
构建一个新的根文件系统目录,路径为
/root/rootfs


1.busybox的编译安装
相信这一步大家都非常熟悉啦,在官网下载最新版。以下是我修改的几处地方
Busybox Settings ---> Build Options ---> (arm-linux-)Cross Compiler prefix
Busybox Settings  ---> Installation Options --->[]Dont't use /usr
Busybox Settings  ---> Installation Options --->(/root/rootfs) BusyBox installation prefix
Busybox Settings --->Busybox Library Tuning --->[*] Fancy Shell prompts
这项一定要选上,不然设置/etc/profile 中PS1变量不生效
# make;make install

2.tslib的编译安装
# ./autogen.sh
# ./configure -prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/ -host=arm-linux ac_cv_func_malloc_0_nonnull=yes
# make;make install
朋友们不要奇怪,安装目录的确是这个 /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/
好处就是在编译QTE时,不用指定tslib的头文件和库文件。将来编译其他需要链接tslib的程序时,也不需要指定。
在做这一步前,需要做一个目录链接
在/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/目录下
# ln -s ../../usr/include ./

当然,如果这一步你不是很清楚,也可以配置tslib安装在你指定的目录($tslib),到时候配置QTE时 -I/($tslib)/include -L/($tsslib)/lib

安装tslib到rootfs
# ./configure -prefix=/root/rootfs/usr/ -host=arm-linux ac_cv_func_malloc_0_nonnull=yes
# make install

3.QTE的编译与安装
最基本的配置
# ./configure -prefix /usr -embedded arm -xplatform qws/linux-arm-g++ -depths 16  -qt-mouse-tslib

-prefix /usr  使用这个配置,编译后的QTE库文件即可放在目标文件系统的/usr/lib下,而不是默认/usr/local/Trolltech/QtEmbedded-4.5.1 这个很深的目录

# make
# cp lib/* /root/rootfs/usr/lib -rd  将QTE库文件拷贝到根文件系统的目录
# cp plugins /root/rootfs/usr -rd 将QTE插件目录拷贝到根文件系统的目录

扩展配置
见1楼

4.根文件系统的设置
这时/root/rootfs/usr下应该有 bin etc include lib sbin目录
tslib生成的etc目录,包含一个tslib的配置文件 ts.conf,编辑此文件,去掉module_raw input前的注释
# mv etc ../ 移动到rootfs的根目录
创建rootfs的其他目录,添加etc目录下的其他文件,拷贝toolchain下的库文件,这不是本文讨论的地方
关键的几处操作

进行一次清理操作
#arm-linux-strip lib/*.so
#arm-linux-strip usr/lib/*.so

编辑etc/profile,添加以下内容
export QWS_MOUSE_PROTO=Tslib:/dev/event0
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts

好了,mkyaffs2image 制作镜像,烧写镜像,启动
ts_calibrate校验触屏,运行一个qte程序试试看。

基本上就是这样,虽然是想说移植QTE的,结果说了一大堆都不关QTE的 呵呵
1楼用来讲QTE的一些配置
级别: 侠客
UID: 4545
精华: 3
发帖: 88
金钱: 810 两
威望: 614 点
综合积分: 236 分
注册时间: 2009-03-19
最后登录: 2020-06-17
1楼  发表于: 2009-06-15 11:13
1.配置说明 以下为网友翻译,这里引摘过来
./configure --help 列出帮助

The defaults * are usually acceptable. A plus (+) denotes a default value that needs to be evaluated. If the evaluation succeeds, the feature is included. Here is a short explanation of each option:
#加*号的选项通常是默认安装的,加+号的选项则需要预先评估,评估成功后才可安装。
-release ........... Compile and link Qt with debugging turned off.
#编译链接时不允许使用debug,编译好的qt-embedded不能用于调试程序。
-debug ............. Compile and link Qt with debugging turned on.
#编译链接时允许使用debug,编译好的qt-embedded只能用于调试程序。
-debug-and-release ... Compile and link two versions of Qt, with and without
debugging turned on (Mac only).
-shared ............ Create and use shared Qt libraries.
#创建动态链接库
-static ............ Create and use static Qt libraries.
#创建静态链接库
-no-fast ........... Configure Qt normally by generating Makefiles for all
project files.
#正常速度编译Qt
-fast .............. Configure Qt quickly by generating Makefiles only for
library and subdirectory targets. All other Makefiles are created as wrappers, which will in turn run qmake.
#快速编译Qt,只为库和子目录目标生成Makefile。所有其它的Makefile被打包创建,依次进行qmake。
-no-largefile ...... Disables large file support.
#关闭大文件支持
+ -largefile ......... Enables Qt to access files larger than 4 GB.
#大文件(大于4G)支持
-no-exceptions ..... Disable exceptions on compilers that support it.
#关闭异常支持
-exceptions ........ Enable exceptions on compilers that support it.
#异常支持
-no-accessibility .. Do not compile Accessibility support.
#关闭对windows active控件支持
-accessibility ..... Compile Accessibility support.
#windows active控件支持
-no-stl ............ Do not compile STL support.
#关闭c++标准库支持
-stl ............... Compile STL support.
#c++标准库支持
-no-sql-<driver> ... Disable SQL <driver> entirely.

#完全禁止SQL<driver>

-qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default

none are turned on.
#开启QtSql库中SQL<driver>支持,默认无<driver>开启。

-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to

at run time.
Possible values for <driver>: [ db2 ibase mysql oci odbc psql sqlite sqlite2 tds ]

#开启SQL<driver>支持,编译为运行时链接的插件库。

-system-sqlite ..... Use sqlite from the operating system.
#使用操作系统自带的sqlite
-no-qt3support ..... Disables the Qt 3 support functionality.
#关闭Qt3程序支持
-qt3support ........ Enables the Qt 3 support functionality.
#Qt3程序支持
-no-xmlpatterns .... Do not build the QtXml Patterns module.

#不编译QtXml模式模块

+ -xmlpatterns ....... Build the QtXml Patterns module.

QtXml Patterns is built if a decent C++ compiler is used and exceptions are enabled.

#编译QtXml模式模块,前提是使用标准C++编译器和开启了异常支持。

-no-phonon ......... Do not build the Phonon module.
#不编译phonon模块
+ -phonon ............ Build the Phonon module.
Phonon is built if a decent C++ compiler is used.
#编译phonon模块,前提是使用标准c++编译器。
-no-phonon-backend.. Do not build the platform phonon plugin.
#不编译平台phonon插件库。
+ -phonon-backend..... Build the platform phonon plugin.
#编译平台phonon插件库。
-no-svg ............ Do not build the SVG module.
#不编译SVG(可放缩的矢量图形)模块。
+ -svg ............... Build the SVG module.
#编译SVG模块
-no-webkit ......... Do not build the WebKit module.

#不编译WebKit模块。WebKit是一个开源浏览器网页排版引擎。

+ -webkit ............ Build the WebKit module.

#编译WebKit模块。

WebKit is built if a decent C++ compiler is used.

-no-scripttools .... Do not build the QtScriptTools module.

#不编译QtScriptTools模块。

+ -scripttools ....... Build the QtScriptTools module.

#编译QtScriptTools模块。

-platform target ... The operating system and compiler you are building
on (qws/linux-x86-g++). See the README file for a list of supported operating systems and compilers.
-no-mmx ............ Do not compile with use of MMX instructions.
#不编译MMX(MultiMedia eXtensions(多媒体扩展))。

-no-3dnow .......... Do not compile with use of 3DNOW instructions.
#不编译3dnow,3dnow是支持单精度浮点数的矢量运算,用于增强x86架构的计算机在三维图像处理上的性能。
-no-sse ............ Do not compile with use of SSE instructions.
#不编译sse,sse是MMX的扩充指令集。
-no-sse2 ........... Do not compile with use of SSE2 instructions.
-qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.

-qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.

-D <string> ........ Add an explicit define to the preprocessor.

-I <string> ........ Add an explicit include path.

#手动增加头文件绝对路径
-L <string> ........ Add an explicit library path.

#手动增加库文件绝对路径
-help, -h .......... Display this information.
#显示配置帮助信息
Third Party Libraries:

-qt-zlib ........... Use the zlib bundled with Qt.
#使用Qt自带的zlib。zlib是个支持gzip档案格式*.gz的函数库。
+ -system-zlib ....... Use zlib from the operating system.
#使用操作系统自带的zlib。
See http://www.gzip.org/zlib

-no-gif ............ Do not compile the plugin for GIF reading support.
#不编译GIF图片支持插件库。
-qt-gif ............ Compile the plugin for GIF reading support.
#编译GIF支持插件库。
See also src/plugins/imageformats/gif/qgifhandler.h
-no-libtiff ........ Do not compile the plugin for TIFF support.
#不编译TIFF(标签图像文件格式)支持插件库。
-qt-libtiff ........ Use the libtiff bundled with Qt.
#使用Qt打包的libtiff。
+ -system-libtiff .... Use libtiff from the operating system.
#使用操作系统自带的libtiff。
See http://www.libtiff.org

-no-libpng ......... Do not compile in PNG support.
#不编译PNG支持,PNG(Portable Network Graphics)便携式网络图片。
-qt-libpng ......... Use the libpng bundled with Qt.
#使用Qt打包的libpng。
+ -system-libpng ..... Use libpng from the operating system.
#使用操作系统自带的libpng。
See http://www.libpng.org/pub/png

-no-libmng ......... Do not compile the plugin for MNG support.
#不编译MNG支持插件库,MNG是多帧PNG动画图形格式,功能类似GIF。目前多数主流浏览器均不直接支持MNG。
-qt-libmng ......... Use the libmng bundled with Qt.
#使用Qt打包的libmng。
+ -system-libmng ..... Use libmng from the operating system.
#使用操作系统自带的libmng。
See http://www.libmng.com

-no-libjpeg ........ Do not compile the plugin for JPEG support.
#不编译JPEG支持插件库。
-qt-libjpeg ........ Use the libjpeg bundled with Qt.
#使用Qt打包的libjpeg。
+ -system-libjpeg .... Use libjpeg from the operating system.
#使用操作系统自带的libjpeg。
See http://www.ijg.org

-no-openssl ........ Do not compile support for OpenSSL.
#不编译OpenSSL支持,OpenSSL是套开放源代码的SSL套件,实现了基本的传输层资料加密功能,但其授权书条款与GPL有冲突。
+ -openssl ........... Enable run-time OpenSSL support.
#开启运行时OpenSSL支持。
-openssl-linked .... Enabled linked OpenSSL support.
#开启链接OpenSSL支持。
-ptmalloc .......... Override the system memory allocator with ptmalloc.
(Experimental.)
Additional options:

. -make <part> ....... Add part to the list of parts to be built at make time.

(libs tools examples demos docs translations)
-nomake <part> ..... Exclude part from the list of parts to be built.

. -R <string> ........ Add an explicit runtime library path to the Qt

libraries.
-l <string> ........ Add an explicit library.

. -no-rpath .......... Do not use the library install path as a runtime
library path.
.+ -rpath ............. Link Qt libraries and executables using the library ,install path as a runtime library path. Equivalent to -R install_libpath
-verbose, -v ....... Print verbose information about each step of the
configure process.
#在配置的过程中,对每一步都打印出详细的信息。
-continue .......... Continue as far as possible if an error occurs.
#当错误出现时尽可能继续编译。
-silent ............ Reduce the build output so that warnings and errors
can be seen more easily.
-no-optimized-qmake ... Do not build qmake optimized.
#不生成优化过的qmake。
-optimized-qmake ...... Build qmake optimized.
#生成优化过的qmake。
-no-nis ............ Do not compile NIS support.
#不编译NIS支持,NIS(网络信息服务)是一个提供目录服务的RPC(远程过程调用)应用服务。
-nis ............... Compile NIS support.
#NIS支持。
-no-cups ........... Do not compile CUPS support.
#不编译CUPS支持,
-cups .............. Compile CUPS support.
#CUPS支持。
Requires cups/cups.h and libcups.so.2.
-no-iconv .......... Do not compile support for iconv(3).
#不编译iconv支持,iconv是一个计算机程序以及一套应用程序编程接口的名称。它的作用是在多种国际编码格式之间进行文本内码的转换。
-iconv ............. Compile support for iconv(3).
#iconv支持
-no-pch ............ Do not use precompiled header support.
#不使用预编译过的头文件支持。
-pch ............... Use precompiled header support.
#预编译过的头文件支持。预编译头就是把一个工程中的一部分代码,预先编译好放在一个文件里(通常以.pch为扩展名),这个文件就称为预编译头文件。这些预先编译好的代码在工程开发的过程中不会被经常改变。如果这些代码被修改,则需要重新编译生成预编译头文件。
-no-dbus ........... Do not compile the QtDBus module.
#不编译QtDBus模块,D-BUS是一个提供简单的应用程序互相通讯的途径的自由软件项目,允许程序在其上注册以提供服务给其他的程序,同时也提供客户端程序查询有哪些服务是获得的。
+ -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
#QtDBus模块支持且动态加载libdbus-1。
-dbus-linked ....... Compile the QtDBus module and link to libdbus-1.
-reduce-relocations ..... Reduce relocations in the libraries through extra
linker optimizations (Qt/X11 and Qt for Embedded Linux only;
experimental; needs GNU ld >= 2.18).

-no-separate-debug-info . Do not store debug information in a separate file.
-separate-debug-info .... Strip debug information into a separate .debug file.
Qt for Embedded Linux only:

-xplatform target ... The target platform when cross-compiling.
#交叉编译时的目标平台选择。
-no-feature-<feature> Do not compile in <feature>.

-feature-<feature> .. Compile in <feature>. The available features

are described in src/corelib/global/qfeatures.txt
-embedded <arch> .... This will enable the embedded build, you must have a

proper license for this switch to work.
Example values for <arch>: arm mips x86 generic

-armfpa ............. Target platform is uses the ARM-FPA floating point format.
-no-armfpa .......... Target platform does not use the ARM-FPA floating point format.
The floating point format is usually autodetected by configure. Use this to override the detected value.
-little-endian ...... Target platform is little endian (LSB first).
-big-endian ......... Target platform is big endian (MSB first).
-host-little-endian . Host platform is little endian (LSB first).
-host-big-endian .... Host platform is big endian (MSB first).
You only need to specify the endianness when cross-compiling, otherwise the host endianness will be used.
-no-freetype ........ Do not compile in Freetype2 support.
#不编译Freetype2支持,Freetype2是一个简单的跨平台的字体绘制引擎,可以被用在诸如图像库、展出服务器、字体转换工具、图像文字产生工具等多种其它产品上。
-qt-freetype ........ Use the libfreetype bundled with Qt.
#使用Qt打包的libfreetype。
-system-libfreetype. Use libfreetype from the operating system.
#使用操作系统自带的libfreetype。
See http://www.freetype.org/

-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
default (full).
-depths <list> ...... Comma-separated list of supported bit-per-pixel

depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.
-qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,

by default all available decorations are on.
Possible values for <style>: [ styled windows default ]

-plugin-decoration-<style> Enable decoration <style> as a plugin to be

linked to at run time.
Possible values for <style>: [ default styled windows ]

-no-decoration-<style> ....Disable decoration <style> entirely.

Possible values for <style>: [ styled windows default ]

-no-opengl .......... Do not support OpenGL.
-opengl <api> ....... Enable OpenGL ES support

With no parameter, this will attempt to auto-detect OpenGL ES 1.x
or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection. NOTE: A QGLScreen driver for the hardware is required to support

OpenGL ES on Qt for Embedded Linux.
-qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library.

#开启QtGui库中的图形驱动支持。

Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ]

-plugin-gfx-<driver> Enable graphics <driver> as a plugin to be

linked to at run time.
Possible values for <driver>: [ ahi directfb hybrid linuxfb powervr qvfb transformed vnc ]

-no-gfx-<driver> ... Disable graphics <driver> entirely.

Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ]

-qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.

#开启QtGui库中的键盘驱动支持。

Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ]

-plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to

at runtime.
Possible values for <driver>: [ linuxis sl5000 usb vr41xx yopy ]

-no-kbd-<driver> ... Disable keyboard <driver> entirely.

Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ]

-qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.

#开启QtGui库中的鼠标驱动支持。

Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ]

-plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to

at runtime.
Possible values for <driver>: [ bus linuxis linuxtp pc tslib vr41xx yopy ]

-no-mouse-<driver> ... Disable mouse <driver> entirely.

Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ]

-iwmmxt ............ Compile using the iWMMXt instruction set
(available on some XScale CPUs).
-no-glib ........... Do not compile Glib support.
#不编译Glib支持。
+ -glib .............. Compile Glib support.
#GNOME的Glib支持。
[ 此帖被长风在2009-06-15 11:56重新编辑 ]
级别: 侠客
UID: 4545
精华: 3
发帖: 88
金钱: 810 两
威望: 614 点
综合积分: 236 分
注册时间: 2009-03-19
最后登录: 2020-06-17
2楼  发表于: 2009-06-15 11:57

 性能与裁剪

留用
级别: 新手上路
UID: 3787
精华: 0
发帖: 30
金钱: 255 两
威望: 194 点
综合积分: 60 分
注册时间: 2009-02-08
最后登录: 2014-04-22
3楼  发表于: 2009-06-15 12:40
好东西!谢谢分享!
这个阶段正是我事业的上升期,我怎么能走得开呢?
级别: 精灵王
UID: 3197
精华: 3
发帖: 770
金钱: 6995 两
威望: 5398 点
综合积分: 1600 分
注册时间: 2008-12-30
最后登录: 2010-12-31
4楼  发表于: 2009-06-15 16:14
很好佷强大
级别: 新手上路
UID: 5623
精华: 0
发帖: 35
金钱: 250 两
威望: 120 点
综合积分: 70 分
注册时间: 2009-05-01
最后登录: 2018-04-19
5楼  发表于: 2009-06-19 00:19
学习中!
级别: 新手上路
UID: 2791
精华: 0
发帖: 15
金钱: 150 两
威望: 132 点
综合积分: 30 分
注册时间: 2008-12-09
最后登录: 2010-02-27
6楼  发表于: 2009-07-02 20:09
tslib-1.4 能否打包一下,我无法获得呀,谢谢!
按照你的方法,我在用友善linux-2.6.13内核,tslib-1.3,触屏ts_calibrate 运行后不动了。我想是tslib版本问题吧。
求真知!去浮躁!
级别: 侠客
UID: 6514
精华: 0
发帖: 86
金钱: 770 两
威望: 642 点
综合积分: 172 分
注册时间: 2009-06-04
最后登录: 2019-08-08
7楼  发表于: 2009-07-06 16:22
级别: 新手上路
UID: 7818
精华: 0
发帖: 7
金钱: 70 两
威望: 70 点
综合积分: 14 分
注册时间: 2009-07-29
最后登录: 2009-08-01
8楼  发表于: 2009-07-31 13:47
你板上的内核版本是多少
级别: 新手上路
UID: 6684
精华: 0
发帖: 10
金钱: 85 两
威望: 53 点
综合积分: 20 分
注册时间: 2009-06-11
最后登录: 2013-04-14
9楼  发表于: 2009-07-31 17:36
我移植过QTE 4.5.2,用arm-linux-gcc3.4.1,但是出现选择文件时死机,用gcc4.3.2时出现运行错误,你的系统是否有此问题?
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go