This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3354: tslib issue

Genius 13655 points
Part Number: AM3354


Hello Champs,

Customer own board: AM3354

SDK: PROCESSOR-SDK-LINUX-AM335X  06_03_00_106

Root filesystem: arago-base-tisdk-image-am335x-evm

tslib: tslib-1.22

1. Generating tsllib according to below steps.

./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


2. migrate it o root filesystem and add below code to etc/profile

export TSLIB_TSDEVICE=/dev/input/touchscreen0             
export TSLIB_CONFFILE=/etc/ts.conf           
export TSLIB_FBDEVICE=/dev/fb0

3. Boot the board and run below command, then prompted the error message.

root@am335x-evm:~# ts_calibrate
-sh: /bin/ts_calibrate: cannot execute binary file: Exec format error
Thanks.

Rgds
Shine

  • Shine said:
    root@am335x-evm:~# ts_calibrate
    -sh: /bin/ts_calibrate: cannot execute binary file: Exec format error

    What does running the following on the board return:

    file /bin/ts_calibrate

    The error suggests ts_calibrate isn't a compatible ARM executable.

  • on the board,it's

    -sh: file: command not found

    but on the Ubuntu

    file /bin/ts_calibrate

    bin/ts_calibrate: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=cf992018adb32d2c49a385ee940b42820ac2dc0d, for GNU/Linux 3.7.0, stripped

  • so it’s the mismatch between 64 bits and 32 bits

    What should I do to complete the compilation and migration of tslib。

    Attached is the tslib source code I used

    tslib-1.22.zip

  • I will not have time to look at this until next week. Have you tried searching e2e for guidance on compiling tslib? e.g., a google site search like "site:e2e.ti.com AM335x tslib"

    Regards,

    Nick

  • I ' ve already searched for relevant information to make sure they ' re basically the same as I used, but I didn 't find an example of that error.
    Help me to solve this problem when you are free.

    Looking forward to your help with great sincerity.


  • Ok, I will come back to this next week. Please ping me if I have not replied by then.

    Regards,

    Nick

  • Hello,

    Apologies for the delayed response. Please see Brad's answer in thread How to build tslib for steps to build tslib from source.

    Jason's answer in thread Adding tslib to kernel indicates that you should also be able to build tslib by modifying the SDK Build Steps, but I was not able to build it on my first try. I need to try experiment with the steps a bit more.

    Regards,

    Nick

  • For some reasons, I can't connect to git directly, so I choose to download tar. Before, I will trigger an error according to the method in it

     

    l@ubuntu:~/uboot/new/tslib-1.22$./configure $CONFIGURE_FLAGS

    config.status: creating Makefile

    config.status: creating etc/Makefile

    config.status: creating plugins/Makefile

    config.status: creating src/Makefile

    config.status: creating tests/Makefile

    config.status: creating tools/Makefile

    config.status: creating doc/Makefile

    config.status: creating tslib.pc

    config.status: creating config.h

    config.status: executing depfiles commands

    config.status: executing libtool commands

    rm: invalid option -- 'l'

    Try 'rm --help' for more information.

    mv: invalid option -- 'l'

    Try 'mv --help' for more information.

    rm: invalid option -- 'l'

    Try 'rm --help' for more information.

    chmod: invalid option -- 'l'

    Try 'chmod --help' for more information.

    l@ubuntu:~/uboot/new/tslib-1.22$ make

    make all-recursive

    make[1]: Entering directory '/home/nfk/uboot/new/tslib-1.22'

    Making all in etc

    make[2]: Entering directory '/home/nfk/uboot/new/tslib-1.22/etc'

    make[2]: Nothing to be done for 'all'.

    make[2]: Leaving directory '/home/nfk/uboot/new/tslib-1.22/etc'

    Making all in src

    make[2]: Entering directory '/home/nfk/uboot/new/tslib-1.22/src'

    CC       ts_attach.lo

    /bin/bash: ../-libtool: There is no file or directory

    Makefile:776: recipe for target 'ts_attach.lo' failed

    make[2]: *** [ts_attach.lo] Error 127

    make[2]: Leaving directory '/home/nfk/uboot/new/tslib-1.22/src'

    Makefile:487: recipe for target 'all-recursive' failed

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

    make[1]: Leaving directory '/home/nfk/uboot/new/tslib-1.22'

    Makefile:396: recipe for target 'all' failed

    make: *** [all] Error 2

     

    So I found the method mentioned at the beginning on the Internet, but the generated file format is not correct.

    Attached is tslib that I use, you can try it

    5873.tslib-1.22.ziptslib-master.zip

  • Hello,

    I do not have access to my Linux computer because of the winter storms in Texas. I will try this out next week. Please ping me if I have not replied in a couple of days.

    Regards,

    Nick

  • HI

    are you back to the work place ? 

  • Hi,how is it going with the tslib

  • Thank you for the pings, and I apologize for the delayed responses. I will give a more detailed reply tomorrow.

    Regards,

    Nick

  • Apologies again for the delayed response.

    Did you install tslib in the root of your SDK directory? And did you source linux-devkit? Note that my username got replaced by [linux-devkit] after I used the "source" command.

    I have attached my steps and terminal output for your reference.

    Regards,

    Nick

    user@computer:~$ cd ti-processor-sdk-linux-am335x-evm-06.03.00.106
    user@computer:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106$ ls
    bin  board-support  docs  example-applications  filesystem  linux-devkit  linux-devkit.sh  Makefile  Rules.make  setup.sh  tslib
    user@computer:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106$ source linux-devkit/environment-setup 
    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106> cd tslib/
    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib> ./autogen.sh 
    libtoolize: putting auxiliary files in '.'.
    libtoolize: copying file './ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4/internal'.
    libtoolize: copying file 'm4/internal/libtool.m4'
    libtoolize: copying file 'm4/internal/ltoptions.m4'
    libtoolize: copying file 'm4/internal/ltsugar.m4'
    libtoolize: copying file 'm4/internal/ltversion.m4'
    libtoolize: copying file 'm4/internal/lt~obsolete.m4'
    configure.ac:58: installing './compile'
    configure.ac:7: installing './missing'
    plugins/Makefile.am: installing './depcomp'
    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib> ./configure $CONFIGURE_FLAGS
    configure: loading site script /home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/site-config-armv7at2hf-neon-linux-gnueabi
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-linux-gnueabi-strip... arm-linux-gnueabihf-strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make supports nested variables... (cached) yes
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... arm-unknown-linux-gnueabi
    checking for arm-linux-gnueabi-gcc... arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... yes
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi accepts -g... yes
    checking for arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi option to accept ISO C89... none needed
    checking whether arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi understands -c and -o together... yes
    checking whether make supports the include directive... yes (GNU style)
    checking dependency style of arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi... none
    checking how to run the C preprocessor... arm-linux-gnueabihf-gcc -E --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi
    checking whether the C compiler supports -fvisibility=hidden... yes
    checking whether to use -fvisibility=hidden... yes
    checking whether ln -s works... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking how to print strings... printf
    checking for a sed that does not truncate output... (cached) sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi... arm-linux-gnueabihf-ld --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi
    checking if the linker (arm-linux-gnueabihf-ld --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... arm-linux-gnueabihf-nm
    checking the name lister (arm-linux-gnueabihf-nm) interface... BSD nm
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-pc-linux-gnu file names to arm-unknown-linux-gnueabi format... func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for arm-linux-gnueabihf-ld --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi option to reload object files... -r
    checking for arm-linux-gnueabi-objdump... arm-linux-gnueabihf-objdump
    checking how to recognize dependent libraries... pass_all
    checking for arm-linux-gnueabi-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for arm-linux-gnueabi-ar... arm-linux-gnueabihf-ar
    checking for archiver @FILE support... @
    checking for arm-linux-gnueabi-strip... (cached) arm-linux-gnueabihf-strip
    checking for arm-linux-gnueabi-ranlib... arm-linux-gnueabihf-ranlib
    checking command to parse arm-linux-gnueabihf-nm output from arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi object... ok
    checking for sysroot... /home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for arm-linux-gnueabi-mt... no
    checking for mt... mt
    configure: WARNING: using cross tools not prefixed with host triplet
    checking if mt is a manifest tool... no
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi supports -fno-rtti -fno-exceptions... no
    checking for arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi option to produce PIC... -fPIC -DPIC
    checking if arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi PIC flag -fPIC -DPIC works... yes
    checking if arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi static flag -static works... yes
    checking if arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi supports -c -o file.o... yes
    checking if arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi supports -c -o file.o... (cached) yes
    checking whether the arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi linker (arm-linux-gnueabihf-ld --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking for shl_load... no
    checking for shl_load in -ldld... no
    checking for dlopen... no
    checking for dlopen in -ldl... yes
    checking whether a program can dlopen itself... cross
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking for dlopen in -ldl... (cached) yes
    checking for size_t... yes
    checking for working alloca.h... yes
    checking for alloca... yes
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for unistd.h... (cached) yes
    checking for stdint.h... (cached) yes
    checking for sys/types.h... (cached) yes
    checking errno.h usability... yes
    checking errno.h presence... yes
    checking for errno.h... yes
    checking dirent.h usability... yes
    checking dirent.h presence... yes
    checking for dirent.h... yes
    checking linux/spi/cy8mrln.h usability... no
    checking linux/spi/cy8mrln.h presence... no
    checking for linux/spi/cy8mrln.h... no
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for size_t... (cached) yes
    checking for uint16_t... yes
    checking for uint8_t... yes
    checking whether time.h and sys/time.h may both be included... yes
    checking whether arm-linux-gnueabihf-gcc --sysroot=/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/armv7at2hf-neon-linux-gnueabi needs -traditional... no
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for sys/param.h... yes
    checking for getpagesize... (cached) yes
    checking for working mmap... (cached) yes
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking types of arguments for select... int,fd_set *,struct timeval *
    checking return type of signal handlers... void
    checking whether lstat correctly handles trailing slash... (cached) yes
    checking whether stat accepts an empty string... (cached) no
    checking for vprintf... yes
    checking for _doprnt... no
    checking for gettimeofday... yes
    checking for memmove... yes
    checking for memset... yes
    checking for munmap... yes
    checking for select... yes
    checking for strcasecmp... yes
    checking for strchr... yes
    checking for strdup... yes
    checking for strtoul... yes
    checking for strtol... yes
    checking for strsep... yes
    checking for arm-linux-gnueabi-pkg-config... no
    checking for pkg-config... /home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/linux-devkit/sysroots/x86_64-arago-linux/usr/bin//pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking whether debounce module is requested... yes
    checking whether dejitter module is requested... yes
    checking whether evthres module is requested... yes
    checking whether iir module is requested... yes
    checking whether linear module is requested... yes
    checking whether median module is requested... yes
    checking whether pthres module is requested... yes
    checking whether skip module is requested... yes
    checking whether lowpass module is requested... yes
    checking whether invert module is requested... yes
    checking whether variance module is requested... yes
    checking whether input module is requested... yes
    checking whether touchkit module is requested... yes
    checking whether waveshare module is requested... yes
    checking whether input-evdev module is requested... no
    checking whether tatung module is requested... no
    checking whether ucb1x00 module is requested... no
    checking whether mk712 module is requested... no
    checking whether h3600 module is requested... no
    checking whether dmc module is requested... no
    checking whether linear-h2200 module is requested... no
    checking whether corgi module is requested... no
    checking whether collie module is requested... no
    checking whether arctic2 module is requested... no
    checking whether dmc_dus3000 module is requested... no
    checking whether cy8mrln-palmpre module is requested... no
    checking whether galax module is requested... no
    checking whether one-wire-ts-input module is requested... no
    checking where to place modules... ${libdir}/ts
    checking whether to enable debugging... no
    checking whether to enable tools... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating etc/Makefile
    config.status: creating plugins/Makefile
    config.status: creating src/Makefile
    config.status: creating tests/Makefile
    config.status: creating tools/Makefile
    config.status: creating doc/Makefile
    config.status: creating tslib.pc
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    config.status: executing libtool commands
    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib> make
    make  all-recursive
    make[1]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib'
    Making all in etc
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/etc'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/etc'
    Making all in src
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/src'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/src'
    Making all in plugins
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/plugins'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/plugins'
    Making all in tests
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/tests'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/tests'
    Making all in tools
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/tools'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/tools'
    Making all in doc
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/doc'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib/doc'
    make[2]: Entering directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib'
    make[2]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib'
    make[1]: Leaving directory '/home/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib'
    [linux-devkit]:~/ti-processor-sdk-linux-am335x-evm-06.03.00.106/tslib> 
    

  • Hello
    I successfully installed tslib
    But after migrating tslib to my board, type the command: TS_ calibrate

    root@am335x-evm:~# ts_calibrate 
    xres = 800, yres = 480
    Took 28 samples...
    Top left : X =  364 Y =  607
    Took 2 samples...
    Top right : X = 3745 Y =  640
    Took 2 samples...
    Bot right : X = 3710 Y = 3522
    Took 2 samples...
    Bot left : X =  352 Y = 3553
    Took 3 samples...
    Center : X = 1982 Y = 2050
    -25.112305 0.207688 0.001629
    -30.332581 -0.000060 0.130377
    Calibration constants: -1645760 13611 106 -1987876 -3 8544 65536 
    open: No such file or directory

    Is this an error?

    /etc/profile :

    export TSLIB_CONFFILE=/etc/ts.conf 
    export TSLIB_PLUGINDIR=/lib/ts
    export TSLIB_TSDEVICE=/dev/input/touchscreen0
    export TSLIB_FBDEVICE=/dev/fb0
  • Hello Desheng,

    Do you still need assistance on this?

    Regards,

    Nick

  • Yes,The touch screen is not calibrated, even if I use pointercal