本次移植参照这篇文章:http://www.cnblogs.com/zuobaozhu/articles/2498092.html
1.在下载了最新的tslib
2.为虚拟机里的Linux系统安装工具:
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool
3.解压后编译
mv xxx(解压后名字) tslib //名字改为tslib
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
4.打开tmp目录,里面有四个文件夹,分别是bin、etc、include、lib。将etc目录下的ts.conf里的第2行去掉注释。即:
# module_raw input
改为:
module_raw input
5.将tmp复制到开发板根文件目录下/usr/local/并改名tslib
6.在开发板根文件目录/bin/下新建一个文件叫calibrate,内容如下:
#! /bin/sh
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_TSEVENTTYPE=H3600
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export QWS_KEYBOARD="TTY:/dev/tty1"
if [ -c /dev/event0 ]; then
if [ -e /etc/pointercal -a ! -s /etc/pointercal ] ; then
rm /etc/pointercal
fi
fi
export QTDIR=/opt/Qtopia
export QPEDIR=/opt/Qtopia
export PATH=$QTDIR/bin:$PATH
#export LD_LIBRARY_PATH=$QTDIR/plugins/qtopialmigrate/:$QTDIR/qt_plugins/imageformats/:$QTDIR/lib:/root/tslib/build/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$QTDIR/lib:/usr/local/lib:$TSLIB_ROOT/lib:$LD_LIBRARY_PATH
exec /usr/local/tslib/bin/ts_calibrate
重启开发板,进入linux 3.6.7命令行控制模式后输入
calibrate就会在LCD屏幕上出现触摸屏校准程序。
阅读(4007) | 评论(0) | 转发(4) |