最新QT4.8+kernel_3.2.5+uboot_2010.06+tslib移植成功-问题小结

2012-02-19 21:34:13

都是从源码下载然后自己修改,使用与TQ2440,之前uboot其实已经完成了。但是yaffs2没带起来。现在回头看来是很简单的了。bootargs参数中我设置成了ramdisk但是无法挂载yaffs2啦。修改了下就可以了。

安装配置QT4.8到是花费了大半天的时间。但是最后还是装好了。然后根据官网的帮助文件,学习了QT基础。和C++编程类似。做了和hello窗口做测试。没想到还遇到了些问题。记录下。

文件系统在开发板上起来后,触摸ts_calibration是错误的。但是我先没管。把qmake(arm版本)编译的hello下载到sbin目录下,然后执行。出现如下错误
1,./hello
./hello: /lib/libc.so.6: version `GLIBC_2.9' not found (required by /usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so.4)
./hello: /lib/libc.so.6: version `GLIBC_2.10' not found (required by /usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtNetwork.so.4)
./hello: /lib/libc.so.6: version `GLIBC_2.9' not found (required by /usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtCore.so.4)
分析原因
因为,我把之前文件系统中的qte相关文件都删除了。添加了tslib所有文件及qt-everywhere-opensource-src-4.8.0编译安装后产生在/usr/local/Trolltech/QtEmbedded-4.8.0-arm中的lib文件夹copy到了开发板文件系统中。然后修改了etc/profile及etc/init.d/rcS的启动及配置文件。
此问题出来lib文件夹下,是arm-linux-gcc编译器的库文件。由于我用比较高级的arm-linux-gcc版本编译qt。所有也要在lib下移植比较新的arm-linux-gcc版本lib。
解决
把lib文件夹内容更新。用新的编译工具的库代替。

2,./hello 后又产生一个问题
QWSSocket::connectToLocalFile could not connect:: No such file or directory
解决:
网上查了下原来要添加“-qws”后缀

3,./hello -qws后出现问题
QWSTslibMouseHandlerPrivate: ts_open() failed with error: 'No such file or directory'
Please check your tslib installation!
网上查后,修改了环境变量
error:QWSTslibMouseHandlerPrivate: ts_open() failed with error: 'No such file or dire'
solve: Please check your tslib installation!
add:export QWS_MOUSE_PROTO=tslib:/dev/event0

4,./hello -qws后出现问题
还是如上问题。于是想到我的ts_calibration是有提示出错的。需要先解决ts_calibration出错的问题。
错误显示为tslib: Selected device uses a different version of the event protocol than tslib was compiled for
解决:
我想到之前我也遇到过,是把kernel中的linux/input.h中的EN_VERSION改成和tslib中的一致。由于我现在是新下载的tslib再编译的,所以,可能正好对于新的kernel3.2.5于是我又改回来了。没有问题咯,不会报错了。ts_calibration也能正常工作了。

5,报错,少了文件libstdc++.so.6。于是我看来看之前的lib目录是有此文件了。copy到lib下即可。
6,可是显示的字体很小。都看不清。
于是网上查了下要配置QWS_DISPLAY参数
        export set QWS_DISPLAY=LinuxFB:mmWidth200:mmHeight100:0
        export set QWS_SIZE=320x240
最后就能把字体变大了。当然在hello软件里也可以修改。

7,usb鼠标及触摸屏后鼠标都不动。
后来查到原因,是QWS_MOUSE_PROTO配置参数的问题,到qt官网去查详细的参数。如下。
Specifies the driver for pointer handling. For example, if the current shell is bash, ksh, zsh or sh:
 export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
The valid values for the <driver> argument are MouseMan, IntelliMouse, Microsoft, VR41xx, LinuxTP, Yopy. Tslib and keys identifying custom drivers, and the driver specific options are typically a device, e.g., /dev/mouse for mouse devices and /dev/ts for touch panels.
Multiple keyboard drivers can be specified in one go:
 export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
         <driver>[:<driver specific options>]
         <driver>[:<driver specific options>]"
Input will be read from all specified drivers. Note that the Vr41xx driver also accepts two optional arguments: press=<value> defining a mouseclick (the default value is 750) and filter=<value> specifying the length of the filter used to eliminate noise (the default length is 3). For example:
 export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
解决:
所以最后修改driver名称为Tslib及MouseMan.即可.

# ./hello -qws显示如下

 

 

posted @ 2019-04-27 11:33  clleady  阅读(368)  评论(0编辑  收藏  举报