tslib移植小问题

博客主要围绕开发板文件系统和tslib校验程序的问题展开。开发板/opt文件夹不可读写,通过命令重启可解决;tslib校验程序错误多与环境变量、模块配置有关,需正确配置让其找到模块文件,还给出了多个相关错误的解决办法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

开发板文件系统/opt 文件夹不可读写?

/opt >: mkdir test
mkdir: can't create directory 'test': Read-only file system

解决:通过如下命令,然后进再进行重启即可。

mount rw -o remount / 

启动tslib校验程序错误?

/apps/etc >: ./ts_calibrate 
Couldn't open tslib config file: No such file or directory
ts_config: No such file or directory
ts_setup: No such file or directory

尝试解决:很明显是环境变量的问题,根据你的tslib库文件路径修改:

vim /etc/profile 

以下为我的修改环境变量等参数,仅供参考

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/QT5.9_A8/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib
export PATH=$PATH:/opt/QT5.9_A8/tslib/lib

# Touch Screen configuration            
export QT_QPA_GENERIC_PLUGINS=tslib
export TSLIB_FBDEVICE=/dev/fb0                    
export TSLIB_TSDEVICE=/dev/input/event0                            
export TSLIB_CALIBFILE=/etc/pointercal                                                           
export TSLIB_CONFFILE=$QTDIR/tslib/etc/ts.conf                                                   
export TSLIB_PLUGINDIR=$QTDIR/tslib/plugins

下面是我tslib存放的一些文件和路径,没有的话,可以自己新建文件夹。在这里插入图片描述
环境变量改完之后,再次执行ts_calibrate文件,发现出现如下错误。。。。

/apps/etc >: ./ts_calibrate 
Couldnt load module input
No raw modules loaded.
ts_config: Success
ts_setup: Success

解决:
Couldnt load module input:说明tslib从linux的输入设备读取数据,需要用到input这个模块,也就是plugin目录下的input.so文件, 所以你的TSLIB_PLUGINDIR一定要配置正确,让tslib能够找到模块文件。
其他参数分别控制触摸点的连续下压、变化宽度、轨迹变化和线性校准。
要把其对应的需要的几个库文件复制到/tslib/plugins中 即可(路径一定要加入/etc/profile),不然会提示找不到动态库。
No raw modules loaded.:导致"No raw modules loaded."的原因有两个:
一是你的ts.conf中没有指定module_raw,自带的ts.conf的所有module_raw都被注释掉了。

增加几个网上看到的错误及解决方法
1. 编译:

$export CC=/work/ebook/arm-linux-4.1.1/bin/arm-linux-gcc      //toolchain路径
$./autogen.sh   //生成config文件
$export PATH=$PATH:/work/ebook/arm-linux-4.1.1/bin/
$echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
$./configure  --cache-file=arm-linux.cache --enable-inputapi=no --prefix=/work/ts_lib_bin --host=arm-linux
$make

2.设备上运行
一些路径设置:

#export QWS_MOUSE_PROTO=TPanel:/dev/input/event0
#export T_ROOT=/mnt/ts_lib_bin
#export LD_LIBRARY_PATH=$T_ROOT/lib
#export TSLIB_CONSOLEDEVICE=none
#export TSLIB_FBDEVICE=/dev/fb0
#export TSLIB_TSDEVICE=/dev/input/event0
#export TSLIB_CALIBFILE=$T_ROOT/etc/pointercal
#export TSLIB_CONFFILE=$T_ROOT/etc/ts.conf
#export TSLIB_PLUGINDIR=$T_ROOT/lib/ts
#./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 ope
n shared object file: No such file or directory

解决办法:
#echo KaTeX parse error: Expected 'EOF', got '#' at position 29: …TH //查看lib路径, #̲export LD_LIBRA…T_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=$T_ROOT/etc/ts.conf

问题4:

Couldnt load module pthres
No raw modules loaded.
ts_config: Success

解决办法:

#export TSLIB_PLUGINDIR=$T_ROOT/lib/ts

问题5:

No raw modules loaded.
Ts_config: No such file or directory

解决办法:
修 改$T_ROOT/etc/ts.conf, 至少放开一个module_raw, 并去掉前面空格

问题6:

通过autogen生成过配置文件:configure,移到另一台机器,重新运行./configure出错,解决办法:

重新设置gcc路径,如:

$export CC=/work/ebook/arm-linux-4.1.1/bin/arm-linux-gcc      //toolchain路径

$rm arm-linux.cache

$export PATH=$PATH:/work/ebook/arm-linux-4.1.1/bin/
$echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
$./configure  --cache-file=arm-linux.cache --enable-inputapi=no --prefix=/work/ts_lib_bin --host=arm-linux
$make

$make install

附加问题原链接:https://blog.csdn.net/xiaoyangger/article/details/5369961

https://blog.csdn.net/lanmanck/article/details/4303213

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值