您的位置:首页 > 编程语言 > Qt开发

qtopia4.3.2及tslib1.0的移植文档

2009-07-05 10:35 246 查看
编译开发板内核时,在make ARCH=arm CROSS_COMPILE=arm-926ejs-linux- menuconfig时,在输入子系统中加入对输入事件的支持。

tslib1.0源代码文件位置:/mnt/nfs/source/tslib-1.0

tslib1.0安装目标位置:/mnt/nfs/touchscreen/tslib

编译tslib

# cd tslib-1.0

export CC=arm-926ejs-linux-gcc

export CXX=arm-926ejs-linux-g++

export PATH=/opt/arm-926ejs-linux/bin:$PATH

./autogen.sh

之后出现configure.ac:7: installing `./missing'

configure.ac:7: installing `./install-sh'

plugins/Makefile.am: installing `./depcomp'

此错误可以完全忽略

echo "ac_cv_func_malloc_0_nonnull=yes">arm-linux.cache

./configure --prefix=/mnt/nfs/touchscreen/tslib --host=arm-linux --target=arm-linx --enable-inputapi=yes --enable-static=yes --cache-file=arm-linux.cache

make

make install

修改tslib

修改/mnt/nfs/source/tslib-1.0/src/ts_config.c的99行

return ret-----------------------return 0;

修改/mnt/nfs/touchscreen/tslib/ts.conf

# Uncomment if you wish to use the linux input layer event interface

module_raw input

qtopia4.3.4源代码目录:/mnt/nfs/source/qtopia-opensource-4.3.2

qtopia4.3.4目标安装目录:/mnt/nfs/touchscreen/qtopia4

修改qtopia

裁减Qtopia core的库

# gedit qtopiacore/qconfig-qpe.h

首先注释掉关于鼠标光标的宏定义,让程序运行时,触摸屏中央有光标出现:

// Qtopia Core

/*

#ifndef QT_NO_QWS_CURSOR

# define QT_NO_QWS_CURSOR

#endif

*/

/*

#ifndef QT_NO_QWS_MOUSE

# define QT_NO_QWS_MOUSE

#endif

#ifndef QT_NO_QWS_MOUSE_AUTO

# define QT_NO_QWS_MOUSE_AUTO

#endif

*/

保存退出。

其它宏定义根据需要进行注释。

保存后将qconfig-qpe.h拷贝到global目录。

cp qtopiacore/qconfig-qpe.h qtopiacore/qt/src/corelib/global/qconfig-qpe.h

5)注释掉其他文件里的QT_NO_QWS_CURSOR的定义

# gedit qtopiacore/qt/src/corelib/global/qfeatures.h

注释掉如下内容:

/*

#if !defined(QT_NO_QWS_CURSOR) && (defined(QT_NO_CURSOR))

#define QT_NO_QWS_CURSOR

#endif

*/

保存退出。

# gedit qtopiacore/qt/src/corelib/global/qglobal.h

注释掉以下内容:

//# define QT_NO_QWS_CURSOR

保存退出。

gedit src/libraries/qtopia/qtimezone.cpp

将114行的 /usr/share/zoneinfo/ 改为//mnt/nfs/touchscreen/qtopia4 ,保存退出。

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

修改qmake.conf

/mnt/nfs/source/qtopia-opensource-4.3.2/qtopiacore/qt/mkspecs/qws/linux-arm-g++

将其中带有arm-Linux-的部分前面换成arm-926ejs-linux-

开始编译qt,在最上层目录建立build,然后cd build,之后运行

../qtopia-opensource-4.3.2/configure -silent -release -image /mnt/nfs/touchscreen/qtopia4  -prefix /mnt/nfs/touchscreen/qtopia4  -xplatform linux-arm-g++ -arch arm -no-qvfb -displaysize 320x240 -no-modem  -extra-qtopiacore-config "-release -xplatform qws/linux-arm-g++ -embedded arm  -no-opengl -qt-gfx-qvfb -qt-gfx-transformed -qconfig qpe -qt-sql-sqlite -depths 4,8,16,32 -qt-kbd-usb -no-kbd-tty  -no-mouse-linuxtp -qt-mouse-tslib -I/mnt/nfs/touchscreen/tslib/include -L/mnt/nfs/touchscreen/tslib/lib" 2>../qtopiaconfgure432ERR.txt


make 2>../qtopiamakeERR.txt

make install

配置环境变量

mknod /dev/input/event1 c 13 65
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CONFFILE=/mnt/nfs/touchscreen/tslib/etc/ts.conf
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_PLUGINDIR=/mnt/nfs/touchscreen/tslib/lib/ts
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfs/touchscreen/tslib/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/nfs/touchscreen/qtopia4/lib
export TZ=Asia/Chongqing
export QWS_SIZE=320x240
export QWS_MOUSE_PROTO="Tslib:/dev/input/event1"
export POINTERCAL_FILE=/etc/pointercal
export QWS_DISPLAY="Transformed:Rot90: QVFb"//旋转应用程序
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: