Compilation and porting of tslib1.4

Source: Internet
Author: User
Tags touch automake

compiling and porting of tslib1.4 based on s3c2410

Environment: s3c2410 Linux tslib1.4
1. Cross-compiling Tslib
The process is as follows:

Extract

#./autogen.sh
#./configure--prefix=/home/duancp/mytslib/--host=arm-linux (the selected installation directory, note) Ac_cv_func_malloc_0_nonnull=yes (Mr. can be a shell file)

#make

#make Install-strip//build slimming applications and libraries

Possible error and Solution process: (Excerpt from: http://blog.csdn.net/gfocean/archive/2010/01/2/5266847.aspx)
Error 1:
./autogen.sh Error Tip:
root@ppcst-desktop:/home/ppcst/software/tslib#./autogen.sh
Can ' t exec ' aclocal ': No such file or directory at/usr/bin/autoreconf2.50 line 182.
Use of the uninitialized value in the pattern match (m//) at/usr/bin/autoreconf2.50 line 182.
Can ' t exec ' automake ': No such file or directory at/usr/bin/autoreconf2.50 line 183.
Use of the uninitialized value in the pattern match (m//) at/usr/bin/autoreconf2.50 line 183.
Can ' t exec ' aclocal ': No such file or directory at/usr/share/autoconf/autom4te/fileutils.pm line 290.
Autoreconf2.50:failed to run aclocal: no file or directory
Workaround: Apt-get Install Automake


Error 2:
Can ' t exec "libtoolize": No such file or directory at/usr/bin/autoreconf line 190.

Use of the uninitialized value $libtoolize in the pattern match (m//) at/usr/bin/autoreconf line 190.

configure.ac:25:error:possibly undefined macro:ac_disable_static

If this token and others is legitimate, please use M4_pattern_allow.

See the Autoconf documentation.

configure.ac:26:error:possibly undefined macro:ac_enable_shared

configure.ac:27:error:possibly undefined Macro:ac_libtool_dlopen

configure.ac:28:error:possibly undefined Macro:ac_prog_libtool

Autoreconf:/usr/bin/autoconf failed with exit Status:1

Workaround: Install Libtool.deb under Ubuntu or update with command: Apt-get install Libtool



Error 3:

TS_TEST.O (. text+0x218): In function ' main ':

: Undefined reference to ' Rpl_malloc '

FBUTILS.O (. text+0x234): In function ' Open_framebuffer ':

: Undefined reference to ' Rpl_malloc '

Collect2:ld returned 1 exit status

MAKE[2]: * * * [ts_test] Error 1

MAKE[2]: Leaving directory '/home/gfpeak/desktop/tslib/tests '

MAKE[1]: * * * [all-recursive] Error 1

MAKE[1]: Leaving directory '/home/gfpeak/desktop/tslib '

Make: * * * [ALL] Error 2

The workaround is at compile time./configure The following parameters are not set, the correct settings are as follows:

./configure--prefix=/usr/local/tslib/--host=arm-linux Ac_cv_func_malloc_0_nonnull=yes


Error 4:

No raw modules loaded when running the calibration program on the Development Board

The workaround is to remove the comment symbol "#" from the ts.conf "#module_raw input" in the TSLIB/ETC directory. But remember not to leave a space in front of you, or you will get an error 4

Error 5:
Segmentation fault occurs when you run the calibration program on the Development Board
The workaround is to look at error 3.

2.tslib of migration
The process is as follows:
A. Go to/home/duancp/mytslib/(under the directory you set in./configure) Download the mytslib to the open board
/mnt/yaffs/(Download method can refer to the article download method)
B. Set the environment variables as follows: (or in shell form)
Export T_root=/mnt/yaffs/mytslib
Export Ld_library_path= $T _root/lib
Export Tslib_consoledevice=none
Export tslib_fbdevice=/dev/fb0
Export Tslib_tsdevice=/dev/input/event0
Export tslib_plugindir= $T _root/lib/ts
Export tslib_conffile= $T _root/etc/ts.conf
Export Tslib_calibfile=/mnt/yaffs/pointercal (#tslib配置文件内容) I did not get to this file and should not be set also line

Explain:
Tslib_tsdevice//Touch screen device file name
Default (no inputapi):/dev/touchscreen/ucb1x00
Default (INPUTAPI):/dev/input/event0
Tslib_calibfile//Calibrated data file, generated by the Ts_calibrate calibration program
Default: ${sysconfdir}/pointercal
Tslib_conffile//Profile Name
Default: ${sysconfdir}/ts.conf
Tslib_plugindir//Plugin Directory
Default: ${datadir}/plugins
Tslib_consoledevice//console device file name
Default:/dev/tty
Tslib_fbdevice//framebuffer Device Name
Default:/dev/fb0
The above environment variables in the actual development of the actual configuration can be determined according to the actual situation.
C. Modify the mytslib/etc/ts.conf file to avoid error 2
Make the ts.conf file as follows:
Module_raw input
Module Pthres pmin=1
Module Variance delta=30
Module Dejitter delta=100
Module linear
That is, the tslib/etc directory of the ts.conf "#module_raw input" annotation symbol "#" is removed, do not leave a space in front.
D. cd bin
./ts_test (Execute the test program, you can see the test point on the screen, then success)
Note: The touchscreen is based on the premise that your touchscreen driver has been written and loaded into the kernel. You can test if there is no load touch screen driver, cat/dev/input/event0 (this is just my touch screen on the board), Hand touch touch screen, look at the terminal has no display, if there is the correct indication. If none to add touch screen driver Insmod touchscreen.o (this driver to find)

Errors and workarounds for compiling tslib1.4: (Excerpt from: http://blog.csdn.net/gfocean/archive/2010/01/28/5266847.aspx)
Error 1:

TS_TEST.O (. text+0x218): In function ' main ':

: Undefined reference to ' Rpl_malloc '

FBUTILS.O (. text+0x234): In function ' Open_framebuffer ':

: Undefined reference to ' Rpl_malloc '

Collect2:ld returned 1 exit status

MAKE[2]: * * * [ts_test] Error 1

MAKE[2]: Leaving directory '/home/gfpeak/desktop/tslib/tests '

MAKE[1]: * * * [all-recursive] Error 1

MAKE[1]: Leaving directory '/home/gfpeak/desktop/tslib '

Make: * * * [ALL] Error 2

The workaround is at compile time./configure The following parameters are not set, the correct settings are as follows:

./configure--prefix=/usr/local/tslib/--host=arm-linux Ac_cv_func_malloc_0_nonnull=yes


Error 2:

No raw modules loaded when running the calibration program on the Development Board

The workaround is to remove the comment symbol "#" from the ts.conf "#module_raw input" in the TSLIB/ETC directory. But remember not to leave a space in front of you, or you will get an error 4


Error 3:

Segmentation fault occurs when you run the calibration program on the Development Board

The workaround is to look at error 2

Error 4:
Ts_open:no such file or directory
environment variable not set well



Transplant Tslib

    
    
     
     System Environment
    
    
    
    
     
     operating system:	Ubuntu 12.0 32-bit
    
    
    
    
     
     Development Board:		TQ2440
    
    
    
    
     
     Cross tool chain: ARM-LINUX-GCC 4.4.3 Days Embedded version
    
    

Transplant tslib
1 Download source tslib-x.x.tar.gz  Address: http://sourceforge.net/projects/tslib.berlios/?source=directory
2 Unzip, CD Tslib
3 Build Configure
  ./autogen.sh
4 configuration, generating makefile
  ./configure--host=arm-none-linux-gnueabi (Platform)--prefix=/(installation directory)
  --enable-debug=no Ac_cv_func_malloc_0_nonnull=yes
Example: #./configure--prefix=/opt/tslib-1.0--host=arm-linux--enable-debug=no ac_cv_func_malloc_0_nonnull=yes
5 Compile make 6 install the make install to
generate the/bin/
  etc/lib/include folder in the specified installation directory  and put the appropriate files in it. If
The corresponding folder is already in, then put the corresponding file into the corresponding folder. 7 running the test program, configuring the parameters

Prefix behind is the installation directory, their own random definition, installed after modifying/opt/tslib-1.0/etc/ts.conf, remove Module_raw input before the #, and then the/opt/tslib-1.0 files are copied into the development Board, such as I put in the In the/usr/local. Then configure the Development Board environment variables, so that tslib can work properly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.