Ubuntu11.04下移植QT/E到博创S3C2410 一、tslib-1.4编译时环境变量设置
/configure-embedded arm -xplatform qws/linux-arm-g++ -depths 16
-little-endian-qt-mouse-linuxtp -qt-mouse-tslib
-I/root/qte/tslib1.4-install
/include–L/root/qte/tslib1.4-install/lib
-prefix/tmp/Trolltech/qt-embedded-4.4.0
(编译成功生成tslib1.4-install文件)
注意:-prefix 后的路径为目标机中的被挂载目录
二、将生成的tslib1.4-install中的相关文件夹拷贝到qt-embedded-linux-opensource-src-4.4.0中:
cp -atslib1.4-install/lib/* qt-embedded-linux-opensource-src-4.4.0/lib
cp-atslib1.4-install/include/ts*qt-embedded-linux-opensource-src-4.4.0/include
三、在目标机中进行触摸屏测试时环境变量设置
export QTDIR=$PWD
exportLD_LIBRARY_PATH=$PWD/lib
exportTSLIB_TSDEVICE=/dev/event0
exportTSLIB_PLUGINDIR=$PWD/lib/ts
exportTSLIB_CONSOLEDEVICE=none
exportTSLIB_CONFFILE=$PWD/etc/ts.conf
exportPOINTERCAL_FILE=$PWD/etc/ts-calib.conf
exportQWS_MOUSE_PROTO=tslib:/dev/event0
exportTSLIB_CALIBFILE=$PWD/etc/ts-calib.conf
export LANG=zh_CN
四、整个移植过程中出现的问题及解决方法
错误1:
../../corelib/tools/qbytearray.cpp:52:18:fatal error: zlib.h: No such file or directory
compilationterminated.
make[1]: ***[.obj/release-shared-emb-arm/qbytearray.o] Error 1
make[1]: Leavingdirectory `/root/qte/qt-embedded-linux-opensource-src-4.4.0/src/tools/rcc'
make: ***[sub-rcc-make_default-ordered] Error 2
解决:
apt-fast installzlib1g-dev
错误2:
编译软件tslib-1.4,运行make和make install后,不能执行./build.sh
解决:
卸载以下软件:
apt-get purge autoconf
错误3:
Couldnt loadmodule pthres
No raw modulesloaded.
ts_config: Success
解决:
更改ts.conf配置文件
#vi/mnt/nfs/Trolltech/qt-embedded-4.4.0/etc/ts.conf
# Uncomment if youwish to use the linux input layer event interface
# module_raw input
改为:
# Uncomment if youwish to use the linux input layer event interface
module_raw input
注意: module_raw input 前不能有空格
错误4:运行./digitalclock –qws时出现:
nfs: server192.168.1.1 not responding, still trying
解决:主要是因为宿主机与目标机间传输的文件过大,因此在挂载时需加如下参数:
mount –t nfs –o nolock,wsize=4096,rsize=4096192.168.1.1:/root/arm2410cl /tmp
错误5:
在运行 ./digitalclock -qws出现:
QFontDatabase:Cannot find font directory /usr/local/Trolltech/QtopiaCore-4.3.3-arm/lib/fonts- is Qt installed correctly?
解决:
增加如下环境变量
exportQT_QWS_FONTDIR=/tmp/Trolltech/qt-embedded-4.4.0/lib/fonts |