solved .. tiny 6410 how to use touch

Sudhanshu Mehta
hi guys with 3 week of struggle i am able to use touch of tiny 6410.
in this tutorial i am using material from forum and net. do not feel i am
coping.. my motive is to share info how i done that.

here is the solution: 

1. tslib compilation

Tslib is an abstraction layer for touchscreen panel events, as well as a
filter stack for the manipulation of those events. It was created by
Russell King, of Tslib is generally used on embedded
devices to provide a common user space interface to touchscreen

4th line under this is the path of tool chain which may change.

$sudo apt-get install git-core
$cd /usr/local
$git clone
$export PATH=/usr/local/arm/4.7.0/bin:$PATH
$export CROSS_COMPILE=arm-none-linux-gnueabi-
$export CC=${CROSS_COMPILE}gcc
$export CFLAGS=-march=armv6z
$export CXX=${CROSS_COMPILE}"g++" 
$export AR=${CROSS_COMPILE}"ar" 
$export AS=${CROSS_COMPILE}"as"
$export RANLIB=${CROSS_COMPILE}"ranlib"
$export LD=${CROSS_COMPILE}"ld"
$export STRIP=${CROSS_COMPILE}"strip"
$export ac_cv_func_malloc_0_nonnull=yes
$cd /usr/local/tslib
$sudo ./
$sudo ./
$sudo ./configure --host=arm-linux --prefix=/home/tslib --enable-shared=yes
$sudo make
$sudo make install

If everything went ok you will see tslib in you will see tsblib in

2.Qt Compilation

i used it from CD that i got but below is how ppl are getting from net.
version that i got was 4.7.0 below is 4.6.3. do not confuse with this both
will work i prefer to use 4.7.0 because i am witness it will work with my

$mv qt-everywhere-opensource-src-4.6.3.tar.gz /usr/local
$cd /usr/local
$tar -zxvf  qt-everywhere-opensource-src-4.6.3.tar.gz

$cd qt-everywhere-opensource-src-4.7.0    #if you used 4.6.3 then you will
#find that   --this line is comment .
$cd mkspecs/common/
$gedit g++.conf

Edit that file

change         QMAKE_CFLAGS_RELEASE += -O2
into               QMAKE_CFLAGS_RELEASE += -O0

just need to replace 2 with 0 (zero) Then save the file 

$gedit qmake.conf

Edit the file.Copy paste the below content , note that, the path
/usr/local/arm/4.7.0/ is the path which you installed tool chain.Remember
that the PATH variable should have the location of

# qmake configuration for building with arm-linux-g++


# modifications to g++.conf
QMAKE_CC = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-gcc
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv6z -mtune=arm1176jzf-s -O0
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv6z -mtune=arm1176jzf-s -O0
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv6z -mtune=arm1176jzf-s -O0
-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv6z -mtune=arm1176jzf-s -O0

# modifications to linux.conf
QMAKE_AR = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-none-linux-gnueabi-ar

QMAKE_INCDIR += /home/tslib/include/
QMAKE_LIBDIR += /home/tslib/lib/

QMAKE_CFLAGS_RELEASE += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_DEBUG += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_MT += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_MT_DBG += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_MT_DLL += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_MT_DLLDBG += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_SHLIB += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_THREAD += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_WARN_OFF += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CFLAGS_WARN_ON += -march=armv6z -mtune=arm1176jzf-s

QMAKE_CXXFLAGS_DEBUG += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_MT += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_MT_DBG += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_MT_DLL += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_MT_DLLDBG += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_RELEASE += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_SHLIB += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_THREAD += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_WARN_OFF += -march=armv6z -mtune=arm1176jzf-s
QMAKE_CXXFLAGS_WARN_ON += -march=armv6z -mtune=arm1176jzf-s


save and close file
change the path in above section if needed.

open terminal
$mkdir /usr/local/Qt
$cd /usr/local/qt-everywhere-opensource-src-4.7.0

Then issue this command

$sudo ./configure -embedded arm -xplatform qws/linux-arm-g++ -prefix
/usr/local/Qt -qt-mouse-tslib -little-endian -no-webkit -no-qt3support
-no-cups -no-largefile -optimized-qmake -no-openssl -nomake tools
-qt-sql-sqlite -no-3dnow -system-zlib -qt-gif -qt-libtiff -qt-libpng
-qt-libmng -qt-libjpeg -no-opengl -gtkstyle -no-openvg -no-xshape -no-xsync
-no-xrandr -qt-freetype -qt-gfx-linuxfb -qt-kbd-tty -qt-kbd-linuxinput
-qt-mouse-tslib -qt-mouse-linuxinput

chose ‘o’ Open Source Edition
chose ‘yes’ to accept license offer

$sudo make
$sudo make install

3 .Copy library of tslib and Qt4.7.0 into tiny 6410 board

Use pendrive

copy library and example program of Qt to pendrive
Pendrive below means exact location of pendrive in media

$cd /usr/local/Qt/lib
$cp *4.7.0   /media/Pendrive/
$cp -r fonts/   /media/Pendrive/
$cd /usr/local/Qt
$cp -r demos/   /media/Pendrive/

copy tslib into pendrive

$mkdir /media/Pendrive/tslib/lib/
$cd /home/tslib/lib/

now we need to copy all files under lib in pendrive this is not easy .
some symbolic link will be there with witch you need to deal with.
so easy way is not to use following 2 commands. because you get error with
that. seee solution under the commands
$cp -r * /media/Pendrive/tslib/lib/
$cp * /media/Pendrive/tslib/lib/

use gui method to copy. copy all files in /home/tslib/lib/ to
/media/Pendrive/tslib/lib/ location. and will create problem.
solution is copy two more times at same location in
pendrive and for first copied file, rename it to and for second
copied file rename it to

above method is tested to you can also try.

Now connect the pendrive to the usb port of tiny6410 and in its console

$mkdir /usr/local/Qt/lib/
$cp /sdcard/*4.7.0 /usr/local/Qt/lib/
rename all *.4.7.0 in /usr/local/Qt/lib into *.4, for example
$cp -r /udisk/fonts/ /usr/local/Qt/lib/
$cp -r /udisk/demos/ /mnt/
$cp -r /udisk/tslib/ /usr/local/

On tiny 6410 the pendrive will appear as /udisk instead of /media/Pendrive

4. Configure the environment in tiny 6410 board.

Below instructions will make tiny 6410 board not load its desktop so that
our example Qt programs not conflict screen with the desktop

$cd /etc/init.d/
$vi rcS
comment last three lines:

#echo"                                 "> /dev/tty1
#ehco"Starting Qtopia, please waiting..." > /dev/tty1

Configure the environment in mini2440:

$cd /etc/
$vi profile

add those lines at the end of file. please verify that you have these files
at the locations specified. otherwise change location as per your system

export LD_LIBRARY_PATH=/usr/local/tslib/lib
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO="tslib:/dev/touchscreen-1wire
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export QWS_DISPLAY=LinuxFB:mmWidth=105:mmHeight=140

go to friendly arm forum given at end of following link

go to /src
file name: one-wire-ts-input-src-20111026.tar.gz
an open source tslib for FriendlyARM one wire touch screen, only for Linux,
not Android

How to use
by FriendlyARM, 2011-10-26

step1: unzip the source code tarball
   you will get, put it into the tiny6410
board: /usr/lib/ts/
   vertify the first line in file "/etc/ts.conf"  to:
   module_raw one-wire-ts-input

5. Run Qt example program:

Now we can test Qt example programs

$cd /mnt/demos/embedded/fluidlauncher/
$./fluidlauncher -qws

use touch now :-)

Good luck .. if you have problem let me know .. please share your

Sudhanshu Mehta
wrongly copied from hyperterminal

The last part i.e. "Installing one wire ts input" will work on MINI2440???

I ported 6410 one_wire_touchscreen driver to 2440, it works very fine, is
Friendlyarm OK to give it? or mini2440.ko ?

I attempted and completed setting up the qt cross compilation framework for
my Tiny 6410 on my host (x86).

Thanks these steps were a lot of help. Not all is perfect on by Tiny 6410
yet. but the basics are working fine.

Attachment: workingset.rar (134.32 KB)
Everytime I try to redo this, I get into trouble

I kept getting error "The tslib functionality test failed!" on an attempt
to configure qt.

I saw the internet flooded with blogs about the same issue faced by a lot
of people.

This error has something to do with either erroneous tslib compilation or
wrong contents in g++.conf or qmake.conf or all three of them.

I am sorry I do not, at this moment have any solid explanation on what was
causing the error.

However, I do have a working set.

Put the tslib from my workingset.rar in /home/
(my qmake.conf points to this location for incdir and libdir)

Put the g++.conf and qmake.conf in their respective places. (see original
post for their locations)

Then, execute configure command (with all the flags/options) again.
Worked for me. Best of luck.

Wanted to update about the last post.

The files contained in the .rar are tested to be working
for: Tiny6410
from: ubuntu12.04 LTS (x86)

Abhishek Ekhare
My touchscreen for Mini2440 is not working.
I have /dev/touchscreen-1wire.

I suppose i have to download one-wire-ts-input-src-20111026.tar.gz and do
the mentioned procedure.
But i cannot find one-wire-ts-input-src-20111026.tar.gz.

Can anybody give a proper link to this file ??

Also please confirm if this works with Mini2440.

Tocuch is not working in tiny 6410,after doing the follwoing steps

step1: unzip the source code tarball
   you will get, put it into the tiny6410
board: /usr/lib/ts/
   vertify the first line in file "/etc/ts.conf"  to:
   module_raw one-wire-ts-input