It took me two hours to solve the problem, because I forgot to recompile the LCD after I modified the version.
Here are the detailed steps I've been tslib:
Tslib-1.4.tar.gz Source code Download address: tslib-1.4.tar.gz
# TAR-XZVF Tslib-1.4.tar.gz
# CD Tslib #./autogen.sh
# mkdir TMP
# echo "Ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache (must add, specific reasons to see the end of the article)
#./configure--host=arm-linux--enable-inputapi=no--cache-file=arm-linux.cache--prefix=$ (PWD)/tmp
# Make && make install
After make install, 4 subdirectories are generated in the TMP directory:
Include Lib etc bin
The resulting library is located in Lib, which also has a subdirectory, TS, which contains many libraries for calibration (such as input.so, etc.).
etc under the ts.conf is the configuration file, the bin directory for calibration, testing tools (such as calibrated ts_calibrate, Test ts_test).
The four files are then copied to the root file system root directory.
The configuration file ts.conf content is as follows:
Module_raw input (remove the previous # and space, the others remain unchanged)
Module Pthres pmin=1
Module Variance delta=30
Module Dejitter delta=100
Module linear
There are many kinds of module_raw, which use only input (that is, the input subsystem of Linux, the device filename is called/dev/event1)/dev/event0 the device node of the touch screen.
Add the following command to the Vi/etc/profile export tslib_tsdevice=/dev/event0 to specify the touchscreen device
Export Tslib_calibfile=/etc/pointercal Specify the location of the touch screen calibration file pintercal
Export tslib_conffile=/etc/ts.conf Specify the location of the Tslib configuration file
Export tslib_plugindir=/lib/ts/Specify the path of the touch screen plugin
The Export Tslib_consoledevice=/dev/tty1 Settings console device is none, otherwise the default is/dev/tty, which prevents the "open consoledevice:no such file or directory Kdsetmode:bad File Descriptor "error
Export tslib_fbdevice=/dev/fb0 Specify frame buffer device
The following error occurred when I executed ts_calibrate:
Selected device is a touchscreen I understand
Find the article on the internet found that the reason is the kernel with ev_version for 0x0100001, cross-compiler tool ev_version for 0x0100000
Change the two to the same. (In fact, the positive solution is the same)
Method One:
I modified the # VI include/linux/input.h ev_version for 0x0100000, recompile the kernel or the same error, it took me a lot of time, and then found me this ev_version macro changed, And my LCD driver is not recompiled, I am in the LCD driver casually move, just for the network compiler detects me this driver is modified, and then the LCD driver also recompile, again test OK, heartbreak Ah, took two hours to solve.
Method Two:
In cross-compilation, modify/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include/linux/input.h in Ev_versin to 0x0100001
Hint under this cross-compiling input.h it is possible that your path is not the same as mine, you can search under your cross-compilation path with the following command:
Find-name "Input.h"
The following error may occur at make:
TS_TEST.O (. Text 0x218): In function ' main ':
: Undefined reference to ' Rpl_malloc '
Find Rpl_malloc in the current directory and find a # define malloc Rpl_malloc line in Configure. Parse configure script related code, originally is ac_cv_func_malloc_0_nonnull caused, OK we don't let it check, produce a cache file Arm-linux.cache, cheat Configure:
Workaround:
# echo "Ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache