环境:
PC虚拟机安装Centos 6.3
arm-linux-gcc 4.4.3
Tiny6410
安装步骤:
1) QtEmbedded 4.6.2 安装,配置如下:
依次执行gamke,gamkeinstall(按照6410光盘里面安装手册配置qt)
echo yes | ./configure -prefix /usr/local/Trolltech/QtEmbedded-4.6.2-arm-6410/
-opensource -embedded arm -xplatform qws/linux-arm-g++ -no-webkit -qt-libtiff -qt-libmng -qt-mouse-tslib -qt-mouse-pc -no-mouse-linuxtp -no-neon
2)复制Qt lib
将/usr/local/Trolltech/QtEmbedded-4.6.2-arm-6410/lib文件夹打包,copy到6410 相同目录/usr/local/Trolltech/QtEmbedded-4.6.2-arm-6410/lib
3)将友善之臂一线触摸one-wire-ts-input-src-20111026.tar.gz在PC虚拟机上解压,然后make得到" one-wire-ts-input.so ",将其copy到6410板子/usr/lib/ts/目录。
同时,修改6410板子“/etc/ts.conf“文件第一行:
module_raw one-wire-ts-input
/etc/ts.conf修改后内容如下:
module_raw one-wire-ts-input
module pthres pmin=1
module variance delta=30
module dejitter delta=10000
module linear
4) 编写环境变量配置脚本profile_me_merslib.sh
#!/bin/bash
if [ -e /etc/friendlyarm-ts-input.conf ]; then
. /etc/friendlyarm-ts-input.conf
fi
true ${TSLIB_TSDEVICE:=/dev/touchscreen}
TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE
export TSLIB_CONFFILE
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=:1
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
if [ -c /dev/touchscreen ]; then
export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
if [ ! -s /etc/pointercal ]; then
rm /etc/pointercal
/usr/bin/ts_calibrate
fi
else
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
fi
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root
5)通过串口reboot 6410
6)通过串口执行source profile_me_merslib.sh ,设置环境变量
7)运行/usr/bin目录下校准程序ts_calibrate,触摸屏上显示出十字叉,但是点击无效(感觉触摸屏就起作用),串口也没有X, Y输出。
[root@FriendlyARM /root]# cd /usr/bin
[root@FriendlyARM bin]# ./ts_calibrate
TouchDevice: /dev/touchscreen-1wire
8)在PC虚拟机上,使用QtEmbeded生成测试程序test-qt-6410,并将其copy到6410板子上运行,上报无法找到libpng.so.3错误
[root@FriendlyARM /root]# ./test-qt-6410 -qws
./test-qt-6410: error while loading shared libraries: libpng.so.3: cannot open shared object file: No such file or directory
还请大侠们看看,为什么触摸屏无法校准,无法使用?
小弟感激不尽!