@虚拟机Linux系统下安装tslib 1.21
准备
下载tslib安装包:
https://github.com/libts/tslib/releases有tslib的各种版本,无需登录,即可下载。
安装
1、安装相关软件:
sudo apt-get install automake autogen autoconf
2、解压:
1)gz文件命令
tar -zxvf tslib-1.21.tar.gz
2)zip文件命令
unzip tslib-1.21.zip
3、进入tslib解压文件夹执行
./autogen.sh
4、产生一个cache文件arm-linux.cache,欺骗configure
echo “ac_cv_func_malloc_0_nonnull=yes” >arm-linux.cache
5、找到tslib解压文件夹 tslib-1.21\src,打开tslib.h文件添加以下内容,然后保存:
#define EVIOCGPROP(len) _IOC(_IOC_READ, ‘E’, 0x09, len)
#define SYN_MT_REPORT 2
#define ABS_MT_SLOT 0x2f /* MT slot being modified /
#define ABS_MT_TOUCH_MAJOR 0x30 / Major axis of touching ellipse /
#define ABS_MT_TOUCH_MINOR 0x31 / Minor axis (omit if circular) /
#define ABS_MT_WIDTH_MAJOR 0x32 / Major axis of approaching ellipse /
#define ABS_MT_WIDTH_MINOR 0x33 / Minor axis (omit if circular) /
#define ABS_MT_ORIENTATION 0x34 / Ellipse orientation /
#define ABS_MT_POSITION_X 0x35 / Center X touch position /
#define ABS_MT_POSITION_Y 0x36 / Center Y touch position /
#define ABS_MT_TOOL_TYPE 0x37 / Type of touching device /
#define ABS_MT_BLOB_ID 0x38 / Group a set of packets as a blob /
#define ABS_MT_TRACKING_ID 0x39 / Unique ID of initiated contact /
#define ABS_MT_PRESSURE 0x3a / Pressure on contact area /
#define ABS_MT_DISTANCE 0x3b / Contact hover distance /
#define ABS_MT_TOOL_X 0x3c / Center X tool position /
#define ABS_MT_TOOL_Y 0x3d / Center Y tool position */
6、配置
./configure --prefix=/usr/local/tslib --host=arm-linux ac_cv_func_malloc_0_nonnull=yes --cache-file=arm-linux.cache
7、编译
make
8、安装
make install
参考
[1]:https://blog.csdn.net/explore_world/article/details/53735138
[2]: https://blog.csdn.net/wkd_007/article/details/90444753
[3]: https://blog.csdn.net/whitefish520/article/details/101021445