tslib移植
1.安装需要的工具
sudo apt-get install automake
sudo apt-get install autogen
sudo apt-get install autoconf
sudo apt-get install libtool
2.下载tslib1.4.tar.gz,并解压
tar zxvf tslib1.4.tar.gz
3.进入tslib目录,运行脚本:
./autogen.sh
4.配置:
./configure --host=arm-linux ac_cv_func_malloc_0_nonnull=yes --cache-file=arm-linux.cache -prefix=/opt/tslib
5.编译与安装:
make
make install
7.修改/opt/tslib/ts.conf配置文件:
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
8.复制/opt/tslib所有文件到开发板/opt/tslib
9.编辑开发板/etc/profile文件,添加如下内容:
export TSLIB_ROOT=/opt/tslib
export TSLIB_TSDEVICE=/dev/input/event2
export TSLIB_CALIBFILE=$TSLIB_ROOT/etc/pointercal
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=/dev/tty
export TSLIB_FBDEVICE=/dev/fb0
export PATH=$PATH:/opt/tslib/bin
10.完成,重启开发板,运行:
/opt/tslib/bin/ts_calibrate
屏幕出现校准的配置
出现的问题:
1.selected device is not a touchscreen I understand
解决:更改/etc/profile中的export TSLIB_TSDEVICE=/dev/input/event2,将event2改为event0,event1等,试试