Building Qt with tslib

6,958 views
Skip to first unread message

Brent

unread,
Dec 9, 2012, 11:52:58 PM12/9/12
to beagl...@googlegroups.com
I've been trying to get my LCD7 to calibrate correctly when running a Qt application, but I have not had any luck.  I've tried several approaches and refereced the following links:
 
Here is what I've done so far:
1. Downloaded tslib and compiled.  No issues here.  I verified that ts_calibrate is an ARM executable.
 
2. Downloaded Qt 4.8.4 and modified the mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf file and added the following lines:
     QMAKE_INCDIR = /home/brent/tslib_arm/include
     QMAKE_LIBDIR = /home/brent/tslib_arm/lib
     QMAKE_LFLAGS = -lts
 
 3. Tried building Qt:
root@ubuntu:~/Downloads/qt-everywhere-opensource-src-4.8.4# ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -qt-kbd-linuxinput -qt-mouse-tslib -qt-gfx-linuxfb -little-endian -prefix-install -depths 16,18,24 -optimized-qmake -release -opensource -confirm-license
but get an error: The tslib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR and QMAKE_LIBDIR in /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-gnueabi-g++.
 
So I am unable to build Qt with the -qt-mouse-tslib argument.  If I try to run my Qt application without this built into Qt, the touchscreen is terrible.  It's like it's configured to only work in a 2"x2" square in the middle of the screen.
 
Exporting the QWS_MOUSE_PROTO actually makes the touchscreen not work at all.  Can someone please help me out here?

AndrewTaneGlen

unread,
Dec 10, 2012, 4:07:51 PM12/10/12
to beagl...@googlegroups.com
Hi Brent, 

I have the LCD7 and have been able to successfully get qt/tslib compiled/installed and calibrating etc - I built everything on a host Ubuntu 12.04.1 LTS. It took a lot of fiddling/trial and error (I have no previous experience with qt...), so I documented my steps as follows (compare with your own; see how you go) - check the paths I use, especially /home/bone/... etc. as this is specific to my user name:

1)      Download Qt from ‘http://qt-project.org/downloads’ the latest stable release of the Qt Libraries for Embedded Linux (e.g. http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz).

a.       mkdir ~/qt

b.      cd ~/qt

c.       wget http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz

d.      tar -xvzf qt-everywhere-opensource-src-4.8.3.tar.gz

e.      Install Necessary Packages:

                                                               i.      sudo apt-get install libgmp3-dev

                                                             ii.      sudo apt-get install libmpfr

                                                            iii.      sudo apt-get install zlib1g-dev

                                                           iv.      sudo apt-get install libncurses5-dev

f.        cd qt-everywhere-opensource-src-4.8.3

g.       gedit mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf   and change all of the ‘arm-none’ to ‘arm-angstrom’ to match the compiler executables…

h.      Including ‘tslib’:

                                                               i.      Install Necessary Packages:

1.       sudo apt-get install autoconf

2.       sudo apt-get install libtool

                                                             ii.      cd ~

                                                            iii.      git clone https://github.com/kergoth/tslib.git

                                                           iv.      cd tslib

                                                             v.      Don’t Forget: . ~/.oe/environment-angstromv2012.05

                                                           vi.      ./autogen.sh

                                                          vii.      ./configure --prefix=$HOME/tslib_beaglebone --host=arm-angstrom-linux-gnueabi

                                                        viii.      make

                                                           ix.      make install

                                                             x.      Output files can be found in ~/tslib_beaglebone/

1.       Copy the ‘/lib’ directory to ‘/usr/lib’ on the beaglebone.

2.       Copy the ‘/bin’ directory to the ‘/usr/bin’ on the beaglebone.

3.       Copy ‘/etc/ts.conf’ to ‘/etc’ on the beaglebone.

4.       Uncomment line 2 in ts.conf, i.e. ‘module_raw input’

5.       Call the following from the Beaglebone command line (or make a script):

a.       export QWS_MOUSE_PROTO=tslib:/dev/input/event0

b.      export TSLIB_CALIBFILE=/etc/pointercal

c.       export TSLIB_CONFFILE=/etc/ts.conf

d.      export TSLIB_PLUGINDIR=/usr/lib/ts

6.       Run ‘ts_calibrate’ and complete the calibration. Call ‘cat /etc/pointercal’ to verify the calibration file has been written.

                                                           xi.      Add the following lines to / qt-everywhere-opensource-src-4.8.3/ mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf   :

1.       QMAKE_INCDIR += /home/bone/tslib/src

2.       QMAKE_LIBDIR += /home/bone/tslib_beaglebone/lib

2)      Configure and build Qt: LAST USED COMMAND: ./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -prefix /opt/qt-arm -no-cups -no-accessibility -reduce-relocations -no-nas-sound -no-sm -no-nis -qt-libjpeg -qt-libpng -qt-zlib -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-pch -no-dbus -no-glib -no-phonon -no-phonon-backend -no-webkit -no-multimedia -no-audio-backend -no-qt3support -nomake docs -nomake translations -exceptions -no-fast -qt-mouse-tslib

3)      make

4)      make install

5)      copy all .so files from ‘/opt/qt-arm/lib/’ on the host ubuntu machine to the same location on the beaglebone:

a.       From Ubuntu:

                                                               i.      cd /opt/qt-arm/lib

                                                             ii.      tar -cpvzf qt_arm_lib.tar.gz *

b.       From the beaglebone:

                                                               i.      mkdir /opt

                                                             ii.      mkdir /opt/qt-arm

                                                            iii.      mkdir /opt/qt-arm/lib

                                                           iv.      cd /opt/qt-arm/lib

                                                             v.      scp bo...@10.192.0.115:/opt/qt-arm/lib/qt_arm_lib.tar.gz   ./

                                                           vi.      tar -xvf qt_arm_lib.tar.gz

                                                          vii.      export LD_LIBRARY_PATH=/opt/qt-arm/lib:$LD_LIBRARY_PATH

6)      Install Packages (not sure if absolutely necessary):

a.       opkg install libgles-omap3

b.      opkg install libstdc++6

c.       opkg install libpng12-0

7)      Test out an example (on the beaglebone):

a.       cd ~

b.      mkdir qttest

c.       cd qttest

d.      scp bo...@10.192.0.115:/opt/qt-arm/examples/animation/stickman/stickman ./

e.      ./stickman -qws

Good luck!

Andrew.

On Monday, 10 December 2012 17:52:58 UTC+13, Brent wrote:
I've been trying to get my LCD7 to calibrate correctly when running a Qt application, but I have not had any luck.  I've tried several approaches and refereced the following links:
 
Here is what I've done so far:
1. Downloaded tslib and compiled.  No issues here.  I verified that ts_calibrate is an ARM executable.
 
2. Downloaded Qt 4.8.4 and modified the mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf file and added the following lines:
     QMAKE_INCDIR = /home/brent/tslib_arm/include
     QMAKE_LIBDIR = /home/brent/tslib_arm/lib
     QMAKE_LFLAGS = -lts
 
 3. Tried building Qt:
ro...@ubuntu:~/Downloads/qt-everywhere-opensource-src-4.8.4# ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -qt-kbd-linuxinput -qt-mouse-tslib -qt-gfx-linuxfb -little-endian -prefix-install -depths 16,18,24 -optimized-qmake -release -opensource -confirm-license

Brent

unread,
Dec 11, 2012, 12:11:15 AM12/11/12
to beagl...@googlegroups.com
Andrew,
 
Thank you for the detailed instructions.  This is exactly what I have been looking for!  However, I am still having trouble building Qt.  I have a feeling it's my arm-angstrom-linux-gnueabi compiler... Here is what I'm getting:
 
mmx auto-detection... ()
/home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/config.tests/unix/compile.test: 71: /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/config.tests/unix/compile.test: cannot create /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/config.tests/unix/mmx/.qmake.cache: Permission denied
arm-angstrom-linux-gnueabi-g++ -c -pipe -mmmx -O2 -Wall -W  -I../../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../../../tslib/src -o mmx.o mmx.cpp
cc1plus: error: unrecognized command line option "-mmmx"
make: *** [mmx.o] Error 1
mmx disabled.
...
tslib auto-detection... ()
arm-angstrom-linux-gnueabi-g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../../../tslib/src -o tslib.o tslib.cpp
arm-angstrom-linux-gnueabi-g++ -Wl,-O1 -o tslib tslib.o    -L/home/brent/tslib_beaglebone/lib -lts
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: skipping incompatible /home/brent/tslib_beaglebone/lib/libts.so when searching for -lts
/usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lts
collect2: ld returned 1 exit status
make: *** [tslib] Error 1
tslib disabled.

The tslib functionality test failed!
 You might need to modify the include and library search paths by editing
 QMAKE_INCDIR and QMAKE_LIBDIR in
 /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-gnueabi-g++.
This is my qmake.conf file:
#
# qmake configuration for building with arm-none-linux-gnueabi-g++
#
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
# modifications to g++.conf
QMAKE_CC                = arm-angstrom-linux-gnueabi-gcc
QMAKE_CXX               = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK              = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = arm-angstrom-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR                = arm-angstrom-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = arm-angstrom-linux-gnueabi-objcopy
QMAKE_STRIP             = arm-angstrom-linux-gnueabi-strip
QMAKE_INCDIR = /home/brent/Downloads/tslib/src
QMAKE_LIBDIR = /home/brent/tslib_beaglebone/lib
#QMAKE_LFLAGS = -lts
load(qt_config)

Gary Thomas

unread,
Dec 11, 2012, 5:59:06 AM12/11/12
to beagl...@googlegroups.com
On 2012-12-10 22:11, Brent wrote:
> Andrew,
> Thank you for the detailed instructions. This is exactly what I have been looking for! However, I am still having trouble building Qt. I have a feeling it's my
> arm-angstrom-linux-gnueabi compiler... Here is what I'm getting:

If you are using the Angstrom tools, why not just build Qt using Angstrom??
There are recipes available for Qt (desktop using X11) and Qte (embedded)

It would save you all of these headaches.

> mmx auto-detection... ()
> /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/config.tests/unix/compile.test: 71:
> /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/config.tests/unix/compile.test: cannot create
> /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/config.tests/unix/mmx/.qmake.cache: Permission denied
> arm-angstrom-linux-gnueabi-g++ -c -pipe -mmmx -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../../../tslib/src -o mmx.o mmx.cpp
> cc1plus: error: unrecognized command line option "-mmmx"
> make: *** [mmx.o] Error 1
> mmx disabled.
> ...
> tslib auto-detection... ()
> arm-angstrom-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../../../tslib/src -o tslib.o tslib.cpp
> arm-angstrom-linux-gnueabi-g++ -Wl,-O1 -o tslib tslib.o -L/home/brent/tslib_beaglebone/lib -lts
> /usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: skipping incompatible /home/brent/tslib_beaglebone/lib/libts.so when
> searching for -lts
> /usr/local/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lts
> collect2: ld returned 1 exit status
> make: *** [tslib] Error 1
> tslib disabled.
> The tslib functionality test failed!
> You might need to modify the include and library search paths by editing
> QMAKE_INCDIR and QMAKE_LIBDIR in
> /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-gnueabi-g++.
> *This is my qmake.conf file:*
> 1)Download Qt from �http://qt-project.org/downloads <http://qt-project.org/downloads>� the latest stable release of the Qt Libraries for Embedded Linux (e.g.
> http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz <http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz>).
>
> a.mkdir ~/qt
>
> b.cd ~/qt
>
> c.wget http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz <http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.3.tar.gz>
>
> d.tar -xvzf qt-everywhere-opensource-src-4.8.3.tar.gz
>
> e.Install Necessary Packages:
>
> i.sudo apt-get install libgmp3-dev
>
> ii.sudo apt-get install libmpfr
>
> iii.sudo apt-get install zlib1g-dev
>
> iv.sudo apt-get install libncurses5-dev
>
> f.cd qt-everywhere-opensource-src-4.8.3
>
> g.gedit mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf and change all of the �arm-none� to �arm-angstrom� to match the compiler executables�
>
> h.Including �tslib�:
>
> i.Install Necessary Packages:
>
> 1.sudo apt-get install autoconf
>
> 2.sudo apt-get install libtool
>
> ii.cd ~
>
> iii.git clone https://github.com/kergoth/tslib.git <https://github.com/kergoth/tslib.git>
>
> iv.cd tslib
>
> v.Don�t Forget: . ~/.oe/environment-angstromv2012.05
>
> vi../autogen.sh
>
> vii../configure --prefix=$HOME/tslib_beaglebone --host=arm-angstrom-linux-gnueabi
>
> viii.make
>
> ix.make install
>
> x.Output files can be found in ~/tslib_beaglebone/
>
> 1.Copy the �/lib� directory to �/usr/lib� on the beaglebone.
>
> 2.Copy the �/bin� directory to the �/usr/bin� on the beaglebone.
>
> 3.Copy �/etc/ts.conf� to �/etc� on the beaglebone.
>
> 4.Uncomment line 2 in ts.conf, i.e. �module_raw input�
>
> 5.Call the following from the Beaglebone command line (or make a script):
>
> a.export QWS_MOUSE_PROTO=tslib:/dev/input/event0
>
> b.export TSLIB_CALIBFILE=/etc/pointercal
>
> c.export TSLIB_CONFFILE=/etc/ts.conf
>
> d.export TSLIB_PLUGINDIR=/usr/lib/ts
>
> 6.Run �ts_calibrate� and complete the calibration. Call �cat /etc/pointercal� to verify the calibration file has been written.
>
> xi.Add the following lines to / qt-everywhere-opensource-src-4.8.3/ mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf :
>
> 1.QMAKE_INCDIR += /home/bone/tslib/src
>
> 2.QMAKE_LIBDIR += /home/bone/tslib_beaglebone/lib
>
> 2)Configure and build Qt: *LAST USED COMMAND:*./configure -v -opensource -confirm-license -xplatform qws/linux-arm-gnueabi-g++ -embedded arm -little-endian -prefix /opt/qt-arm
> -no-cups -no-accessibility -reduce-relocations -no-nas-sound -no-sm -no-nis -qt-libjpeg -qt-libpng -qt-zlib -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite
> -no-sql-sqlite2 -no-pch -no-dbus -no-glib -no-phonon -no-phonon-backend -no-webkit -no-multimedia -no-audio-backend -no-qt3support -nomake docs -nomake translations -exceptions
> -no-fast -qt-mouse-tslib
>
> 3)make
>
> 4)make install
>
> 5)copy all .so files from �/opt/qt-arm/lib/� on the host ubuntu machine to the same location on the beaglebone:
>
> a.From Ubuntu:
>
> i.cd /opt/qt-arm/lib
>
> ii.tar -cpvzf qt_arm_lib.tar.gz *
>
> b. From the beaglebone:
>
> i.mkdir /opt
>
> ii.mkdir /opt/qt-arm
>
> iii.mkdir /opt/qt-arm/lib
>
> iv.cd /opt/qt-arm/lib
>
> v.scp bo...@10.192.0.115:/opt/qt-arm/lib/qt_arm_lib.tar.gz ./
>
> vi.tar -xvf qt_arm_lib.tar.gz
>
> vii.export LD_LIBRARY_PATH=/opt/qt-arm/lib:$LD_LIBRARY_PATH
>
> 6)Install Packages (not sure if absolutely necessary):
>
> a.opkg install libgles-omap3
>
> b.opkg install libstdc++6
>
> c.opkg install libpng12-0
>
> 7)Test out an example (on the beaglebone):
>
> a.cd ~
>
> b.mkdir qttest
>
> c.cd qttest
>
> d.scp bo...@10.192.0.115:/opt/qt-arm/examples/animation/stickman/stickman ./
>
> e../stickman -qws
>
> Good luck!
>
> Andrew.
>
> On Monday, 10 December 2012 17:52:58 UTC+13, Brent wrote:
>
> I've been trying to get my LCD7 to calibrate correctly when running a Qt application, but I have not had any luck. I've tried several approaches and refereced the
> following links:
> http://embedfun.blogspot.ch/2011/07/compiling-qt-embedded-for-arm.html <http://embedfun.blogspot.ch/2011/07/compiling-qt-embedded-for-arm.html>
> https://groups.google.com/forum/?fromgroups#!category-topic/beagleboard/beaglebone/Hj1nB_xTcWA
> <https://groups.google.com/forum/?fromgroups#!category-topic/beagleboard/beaglebone/Hj1nB_xTcWA>
> Here is what I've done so far:
> 1. Downloaded tslib and compiled. No issues here. I verified that ts_calibrate is an ARM executable.
> 2. Downloaded Qt 4.8.4 and modified the mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf file and added the following lines:
> QMAKE_INCDIR = /home/brent/tslib_arm/include
> QMAKE_LIBDIR = /home/brent/tslib_arm/lib
> QMAKE_LFLAGS = -lts
> 3. Tried building Qt:
> ro...@ubuntu:~/Downloads/qt-everywhere-opensource-src-4.8.4# ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -qt-kbd-linuxinput -qt-mouse-tslib
> -qt-gfx-linuxfb -little-endian -prefix-install -depths 16,18,24 -optimized-qmake -release -opensource -confirm-license
> but get an error: The tslib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR and QMAKE_LIBDIR in
> /home/brent/Downloads/qt-everywhere-opensource-src-4.8.4/mkspecs/qws/linux-arm-gnueabi-g++.
> So I am unable to build Qt with the -qt-mouse-tslib argument. If I try to run my Qt application without this built into Qt, the touchscreen is terrible. It's like it's
> configured to only work in a 2"x2" square in the middle of the screen.
> Exporting the QWS_MOUSE_PROTO actually makes the touchscreen not work at all. Can someone please help me out here?
>
> --
> For more options, visit http://beagleboard.org/discuss
>
>

AndrewTaneGlen

unread,
Dec 11, 2012, 4:18:52 PM12/11/12
to beagl...@googlegroups.com
Good point Gary,

I'm slowly getting my head around using recipes, this is my first project using oe/bitbake etc. - It is probably best to rely on experienced recipe makers to get things right rather than taking the brute force/trial and error/forum scavenging approach as I have been.

I still tend to favour doing everything manually once, and only automating things once I have my head around what's happening at each step. Not particularly efficient, but more educational.


Brent, I do recall having some trouble like this getting ts lib to build into qt - and I think I may have failed to include the bit of info (my qmake.conf file) that fixed it. It is possibly the QMAKE_LFLAGS line that will help, I'm not 100% sure, but give it a go.  (For some reason it wouldn't find ...-strip event though it was clearly in the $PATH, so I gave it the full path) qmake.conf:

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

include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = arm-angstrom-linux-gnueabi-gcc
QMAKE_CXX               = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK              = arm-angstrom-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = arm-angstrom-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = arm-angstrom-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = arm-angstrom-linux-gnueabi-objcopy
QMAKE_STRIP             = /home/bone/angstrom/setup-scripts/build/tmp-angstrom_v2012_05-eglibc/sysroots/i686-linux/usr/bin/armv7a-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-strip

# modifications to include tslib
QMAKE_INCDIR            += /home/bone/tslib/src
QMAKE_LIBDIR            += /home/bone/tslib_beaglebone/lib
QMAKE_LFLAGS            += -Wl,-rpath-link=/home/bone/tslib_beaglebone/lib

load(qt_config)

AndrewTaneGlen

unread,
Jan 10, 2013, 4:08:20 PM1/10/13
to beagl...@googlegroups.com, transis...@gmail.com
Hi Seth,

The command '. ~/.oe/environment-angstromv2012.05' assumes you have downloaded and run the setup_scripts, at least to the point of having called './oebb.sh config beaglebone/' (I originally used 'http://cwraig.id.au/?p=507' as a reference to get things off the ground on my Ubuntu machine. - I'd recommend going all the way to the point of having build a systemd image before trying to build anything else - this takes a long time to run... )

Once this config command has been completed you should find that the file '~/.oe/environment-angstromv2012.05' now exists. A call of '. ~/.oe/environment-angstromv2012.05' should successfully set up a lot of important environment variables, such as the path to the beaglebone gcc compiler, which I think is actually built from scratch in the config step. Have a look at '~/.oe/environment-angstromv2012.05' once it's there to see all the stuff it does.

Then the rest of the qt/tslib process 'should' complete properly...


Cheers,
Andrew.



On Saturday, 5 January 2013 03:28:30 UTC+13, seth wrote:
Hi Andrew,

Thanks very much for posting a detailed guide. I am, however, stuck on a 'simple' step. When you say "Don’t Forget: . ~/.oe/environment-angstromv2012.05" when making tslib, what exactly do you mean? I am a beginner to linux and am unaware as to what to do there. I've searched online and used trial/error for a few hours for anything that could help me but nothing I found/did works. It looks like it's specifying the build environment so 'make' knows which compiler/linker to use, etc. I tried following your steps but skipping that step, and ts_calibrate (the only one I tried) doesn't run ("cannot execute binary file") on the board. I see when running make that it was using plain old gcc, which I think is wrong (should be arm-angstrom-linux-gnueabi-gcc). I also see when running configure that it's Not cross compiling (I'd assume that check would be Yes). I tried adding CC=arm-angstrom-linux-gnueabi-gcc to the make command which did force it to use the right compiler, but when it gets to the linking steps it reverts to using plain gcc and immediately errors out ("file in wrong format"). I'm unaware of any flags for make (like CC) that will force it to use a certain linker.

I should also mention that I am using the LCD4 with the newest Angstrom release (11-22-12) because it's the only release that supports that newly-released LCD model. That build of Angstrom already has tslib installed. As a result, I originally thought I could skip the whole building tslib steps altogether. I can build Qt with the -qt-mouse-tslib argument and apps can run, but I still have the same problem as the OP: "If I try to run my Qt application without this built into Qt, the touchscreen is terrible.  It's like it's configured to only work in a 2"x2" square in the middle of the screen." Also, it's as if the Qt app 'isn't there' because I can click on things on the desktop behind the app - there is a small square around the cursor which shows the desktop through the running app.

I've read this post in which Davide Rondini says he was able to get things working without recompiling Qt by using an export command, but I've tried that already (as well as other suggested similar exports) and it still doesn't work. I'm pretty close to getting tslib compiled myself anyway so I figure it's worth a shot. Does anyone know if it's even necessary with the newest release of Angstrom since the libs are included already? Thanks much!

-Seth


Reply all
Reply to author
Forward
0 new messages