s3c2440下移植tslib库的编译步骤

编译之前ubuntu必须有这几个工具

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

编译步骤: 解压:tar -xvf 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//安装到当前目录的tmp 目录

make make install

安装完后: 进入tmp : cd tmp

查看是否有etc include lib bin

把tmp 目录拷贝到根文件系统下如:cp tmp/ first_fs/ts_dir -rfd 启动开发板

cd /mnt/ts_dir/tmp

把tmp目录下的所有文件拷到开发板的根目录下

cp * / -rdf

使用:

先安装s3c_ts.ko, lcd.ko

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

2.命令行上输入 export TSLIB_TSDEVICE=/dev/event0 //这个根据自己的安装的触摸屏驱动,然后查看/dev/event* export TSLIB_lCALIBFILE=/etc/pointerca export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_PLUGINDIR=/lib/ts export TSLIB_CONSOLEDEVICE=none export TSLIB_FBDEVICE=/dev/fb0

测试校准文件

ts_calibrate

ts_test

经验分享 程序员 微信小程序 职场和发展