天嵌 ARM开发社区

 找回密码
 注册
查看: 5882|回复: 2

qt环境设置问题类似ts_open: No such file or directory

[复制链接]
萧别离 发表于 2012-4-14 02:22:18 | 显示全部楼层 |阅读模式

qt界面移植
(1)将/usr/local/tslib下的所有文件复制到移植系统文件中/usr/local
(2)编辑移植系统中/etc/profile添加触摸屏支持内容:
在/etc/profile文件中设置tslib环境变量:
# 指定tslib主目录位置
export TSLIB_ROOT=/home/system/tslib
# 指定触摸屏设备
export TSLIB_TSDEVICE=/dev/input/touchscreen0
# 指定触摸屏校准文件pointercal存放位置
export TSLIB_CALIBFILE=/etc/pointercal
# 指定TSLIB配置文件的位置
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
# 指定触摸屏插件所在路径
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
# 指定帧缓冲设备
export TSLIB_FBDEVICE=/dev/fb0
# 设定控制台设备为none
# 否则默认为/dev/tty,
# 这样会出现”open consol device:No such file or directory KD…..”的错误
export TSLIB_CONSOLEDEVICE=none
# 指定TSLIB的库文件路径
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib
# 指定触摸屏设备
export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0
注意:
(1)/etc/profile文件是指rootfs上的/etc/profile,不是PC机;
(2)/home/system/tslib是我自己存放tslib的文件路径,其他人可自定义;
(3)/etc/pointercal是tslib/bin/ts_calibrate程序生产的,
将tslib移植入开发板,在开发板终端上运行:
cd /home/system/tslib/bin
./ts_calibrate
之后用手指点击液晶屏上的“+”,如此5次之后,便会自动在/etc下生成pointercal文件
取消/usr/local/tslib/etc/ts.conf中的第一个注释:
# module_raw input (去掉#,并且该行顶格,不顶格会出错)
启动开发板,运行/usr/local/tslib/bin/ts_calibrate进行校正触摸屏。此时如果遇到问题,可如下解决:
问题1:
./ts_calibrate: error while loading shared libraries: libts-0.0.so.0: cannot open shared object file: Error 40
./ts_calibrate: error while loading shared libraries: libts-0.0.so.0: cannot open shared object file: No such file or directory
解决方法:
#echo $LD_LIBRARY_PATH              // 查看lib路径
#export LD_LIBRARY_PATH=$TSLIB_ROOT/lib

问题2:
ts_open: No such file or directory
解决方法:
#export TSLIB_TSDEVICE=/dev/input/event0     // 触摸屏设备路径

问题3:
Couldnt open tslib config file: No such file or directory
ts_config: Illegal seek
解决方法:
#export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf

问题4:
Couldnt load module pthres No raw modules loaded.
ts_config: Success
解决方法:
#export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts

问题5:
No raw modules loaded.
ts_config: No such file or directory
解决方法:
修改$TSLIB_ROOT/etc/ts.conf,至少放开一个module_raw,打开tslib-1.4/etc/ts.conf文件,
去掉其中一个modules_raw前面的#符号,并删除空格即可并去掉前面空格


 楼主| 萧别离 发表于 2012-4-14 02:23:55 | 显示全部楼层
网上转载,截下了环境配置部分供参考
ww110052181 发表于 2012-4-18 21:44:15 | 显示全部楼层
I love it linux
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-28 11:12 , Processed in 1.027383 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表