tslib和qt在君正平台上的搭建

来源:互联网 发布:淘宝店铺几个好评两 编辑:程序博客网 时间:2024/04/28 19:55
 

1.安装tslib

a.下载tslib和相关工具

最新tslib下载地址:https://github.com/kergoth/tslib#readme

发现此地址下载的tslib比tslib1.4.tar.gz要新。

sudo apt-get install autoconf

sudo apt-get install automake

sudo apt-get install libtool

 

b.解压缩

sudo tar -zxvf kergoth-tslib-1.0-98-ge17263e.tar.gz

cd kergoth-tslib-e17263e

 

c.运行autogen.sh脚本

./autogen.sh

 

d.配置

./configure --host=mipsel-linux  --prefix=/opt/tslib  ac_cv_func_malloc_0_nonnull=yes

要知道更多关于configure的配置选项,可以通过./configure -help来查看。

--host表示你的交叉编译环境是什么。

--prefix表示你要安装到的位置。

ac_cv_func_malloc_0_nonnull=yes此选项不加,make的时候会出现错误。

具体原因,参看此文:http://www.sudu.cn/info/html/edu/20070101/286963.html

 

e.编译

make

 

f.安装

make install

 

g.拷贝安装目录下的文件到开发板上。

 

h.在开发板上设置环境变量

export TSLIB_ROOT=/usr/local/tslib

export TSLIB_TSDEVICE=/dev/input/event0(你的开发板dev下的触摸屏设备节点文件)

export TSLIB_CALIBFILE=/etc/pointercal  (保存校准数据)

export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf

export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts

export  TSLIB_CONSOLEDEVICE=none

export TSLIB_FBDEVICE=/dev/fb0

 

i.可以运行tslib/bin下的可执行文件了。

 

参考文章:http://blog.csdn.net/lanmanck/article/details/4303213

原创粉丝点击