部分来自网络,并整理验证。
确认已安装以下组件
apt-get install autoconf automake libtool
1、下载源码:
https://github.com/libts/tslib
选择zip下载
2、编译
进入解压后的目录
./autogen.sh
./configure --prefix=/opt/tslib_hi3559av100 --host=arm-linux CC=aarch64-himix100-linux-gcc
make
make install
编译生成的库位于/opt/tslib_hi3559av100
将tslib_hi3559av100通过SD卡或nfs挂载到嵌入式设备中
3、设置环境变量
export TSLIB_ROOT=/nfsroot/tslib_hi3559av100
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_TSEVENTTYPE=input
export TSLIB_CONFFILE=/nfsroot/tslib_hi3559av100/etc/ts.conf
export TSLIB_PLUGINDIR=/nfsroot/tslib_hi3559av100/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb1
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$QT_ROOT/lib:$TSLIB_ROOT/lib:$TSLIB_ROOT/lib/ts
/dev/input/event0和/dev/fb1根据实际情况选择
4、运行海思hifb
打开vo和hifb
5、运行./bin目录下的ts_test、ts_calibrate程序
来源:CSDN
作者:year12
链接:https://blog.csdn.net/year12/article/details/96154047