[oe] qt4-embedded & tslib

Matthew Dombroski matthew at 4d-electronics.co.nz
Sun Sep 6 22:22:10 UTC 2009


On 07/09/09 05:16, Eric Bénard wrote:
> Holger Hans Peter Freyther a écrit :
>> On Sunday 06 September 2009 14:31:36 Eric Bénard wrote:
>>> Without this, tslib loads properly the module_raw (input in my case) 
>>> but
>>> none of the module (pthres, linear & co) defined in ts.conf (despite 
>>> the
>>> fact ts_test & co are running fine).
>>
>> Please google for the QWS_MOUSE_PROTO environement variable... tslib 
>> support is built as a plugin and Qt needs to be instructed to load it.
>>
> of course, without this variable it's not loaded at all.
> But even with this variable, it doesn't work for me with 
> -plugin-mouse-tslib but works with -qt-mouse-tslib.
> I tried :
> tslib:/dev/input/event0 & tslib:/dev/input/touchscreen0
>
> In fact, the module_raw (input) is properly loaded (which means QT was 
> instructed by QWS_MOUSE_PROTO to use tslib and TSLIB_PLUGINDIR is 
> properly set) but the other modules (pthres, linear & co) are not 
> properly loaded (from what I saw with strace they are found, opened, 
> and closed). If I comment out all the modules (not module_raw) from 
> ts.conf everything is properly loaded but of course tslib gives raw 
> values to QT so touchscreen is unusable.
>
> Eric

Actually, the problem is that tslib is linked incorrectly.
The pthres, linear, etc. modules are not linked to libts so theyre 
missing symbols when an attempt is made to load them.
To confirm, do

LD_PRELOAD=/usr/lib/libts-1.0.so.0 <args>

tslib modules will resolve symbols properly so tslib will work.

A quick patch to tslib to link those modules against libts is below.
A little dirty linking against the static libs, but it works!

Add to tslib_1.0.bb SRC_URI.

~Matt


--- tslib.orig/plugins/Makefile.am
+++ tslib/plugins/Makefile.am
@@ -107,15 +107,19 @@ pluginexec_LTLIBRARIES = \

  variance_la_SOURCES    = variance.c
  variance_la_LDFLAGS    = -module $(LTVSN)
+variance_la_LIBADD     = $(top_builddir)/src/libts.la

  dejitter_la_SOURCES    = dejitter.c
  dejitter_la_LDFLAGS    = -module $(LTVSN)
+dejitter_la_LIBADD     = $(top_builddir)/src/libts.la

  linear_la_SOURCES      = linear.c
  linear_la_LDFLAGS      = -module $(LTVSN)
+linear_la_LIBADD       = $(top_builddir)/src/libts.la

  pthres_la_SOURCES      = pthres.c
  pthres_la_LDFLAGS      = -module $(LTVSN)
+pthres_la_LIBADD       = $(top_builddir)/src/libts.la

  # hw access
  corgi_la_SOURCES       = corgi-raw.c





More information about the Openembedded-devel mailing list