TSLIB移植

来源:互联网 发布:高一优化方案英语答案 编辑:程序博客网 时间:2024/05/29 18:24
在LinuxIDC.com的1号FTP服务器上面下载最新的TSLIB,文件名kergoth-tslib-1.0-89-g412d99d.tar.gz
在本地解压缩。
./autogen.sh
./configure --host=arm-linux --prefix=/root/Desktop/arm_root/root_qtopia/myexe/tslib/
 
注意,--host说明交叉编译的目标结构,--prefix指定make install后库文件以及应用程序的存放位置。这个最好制定,不然就全被放到默认的地方,貌似是/usr....
make
编译库文件以及测试程序
make install
必须要用make install后bin目录里面的文件运行,tests目录下面的可执行文件是不能运行的,会出现下面错误。
./ts_calibrate: cd: line 1: can't cd to /root/Desktop/tslib/kergoth-tslib-412d99d/tests
./ts_calibrate: eval: line 1: arm-linux-gcc: not found
这样刚刚指定的--prefix目录下面就会多出bin、etc、include、lib四个文件
需要将指定库文件位置
export LD_LIBRARY_PATH=/myexe/tslib/lib
不然会出现下面提示。
error while loading shared libraries: libts-1.0.so.0: cannot open shared object file: No such file or directory
其次是指定触摸设备名、配置文件、插件目录、校准文件名
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CONFFILE=/myexe/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/myexe/tslib/lib/ts
export TSLIB_CALIBFILE=/myexe/tslib/calibfile
#export TSLIB_CONSOLEDEVICE=none
#export TSLIB_FBDEVICE=/dev/fb0
其中ts.conf是配置文件,需要将里面的module pthres pmin=1注释掉,把module_raw input的注释打开。
这样运行bin下面的ts_calibrate开始校准吧~~~~