5.1 Porting tslib5.1.1 To download the latest tslib in Https://github.com/kergoth/tslib
5.1.2 is the Linux system Installation tool in the virtual machine
sudo apt-get install autoconf
sudo apt-get install Automake
sudo apt-get install Libtool
Note that the new GCC open function has 3 parameters, and a parameter of 0777 is added after the ts_calibrate.c.
5.1.3 Unzip and compile
MV XXX (after extracting name) Tslib//name changed to 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
Open the TMP directory, there are four folders, respectively, bin, etc, include, lib. Remove the comment from the 2nd line in the ts.conf in the ETC directory. That
# Module_raw input to read: Module_raw input
Copy tmp to the DEV board root file directory/usr/local/and rename Tslib
Create a new file calibrate under the Development Board root file directory/bin/, with the following content:
Export Tslib_root=/usr/local/tslib
Export Tslib_tsdevice=/dev/event0
Export tslib_tseventtype=h3600
Exporttslib_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/qt-4.8.4
Export qpedir=/opt/qt-4.8.4
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
Exportld_library_path= $QTDIR/lib:/usr/local/lib: $TSLIB _root/lib: $LD _library_path
Exec/usr/local/tslib/bin/ts_calibrate 1>/dev/null2>/dev/null
Restart the Development Board and enter the Linux 3.8.3 command line control mode
The calibrate will display a touchscreen calibration program on the LCD screen.
Note: Before testing, you must first ensure that you have a touchscreen device node eventx in the/dev directory. Take event0 as an example and add it manually with Mknod command.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
tslib-Touch Screen Calibration