歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> tslib移植出現的小問題

tslib移植出現的小問題

日期:2017/3/1 10:12:23   编辑:Linux編程

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 $LD_LIBRARY_PATH //查看lib路徑,
#export LD_LIBRARY_PATH=$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

Copyright © Linux教程網 All Rights Reserved