移植tslib 到mini2440

来源:互联网 发布:office mac 2016 编辑:程序博客网 时间:2024/06/01 10:37

apt-get install autoconf
apt-get install automake
apt-get install libtool


编译:
tar xzf tslib-1.4.tar.gz
cd tslib
./autogen.sh

mkdir tmp
echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=$(pwd)/tmp
make
make install

安装:
cd tmp
cp * -rf /开发板根目录    //将tmp文件都考到开发板 根目录 tar -cf  tmp.tar  ./打包


使用:

先安装s3c_ts.ko, lcd.ko

1.
修改 /etc/ts.conf第1行(去掉#号和第一个空格):
# module_raw input
改为:
module_raw input

2.
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0

ts_calibrate

ts_test
1、ts.conf文件中的各个设置选项之前不能有空格,否则会出现:Segmentation fault 错误,我就不小心在module...之前多了个空格,害我查了好久。
2、不要在pointercal对应的目录下,建立一个空的pointercal文件,否则在运行ts_calibrate时,也可能会出现
Segmentation fault

原创粉丝点击