Difference between revisions of "Qtopia core howto"

From Gumstix User Wiki
Jump to: navigation, search
Line 1: Line 1:
we need qtopia to find the compiler (symlinks & path)
+
We need to find the compiler (symlinks & path)
  
 
   $ cd path-to/gumstix-oe/tmp/cross/bin ; for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done
 
   $ cd path-to/gumstix-oe/tmp/cross/bin ; for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done
 
   $ PATH=$PATH:path-to/gumstix-oe/tmp/cross/bin/ ; export PATH
 
   $ PATH=$PATH:path-to/gumstix-oe/tmp/cross/bin/ ; export PATH
  
download and unpack
+
Download and unpack qt-embedded. As of release candidate 1, the name has changed from qtopia to qt-embedded. The commands to get and unpack the qt-embedded release candidate for the gumstix is:
 
+
  $ wget ftp://ftp.trolltech.com/qt/source/qtopia-core-opensource-src-4.4.0-beta1.tar.gz
+
  $ tar xzvf qtopia-core-opensource-src-4.4.0-beta1.tar.gz ; cd qtopia-core-opensource-src-4.4.0-beta1/
+
 
+
as of release candidate 1, the name has changed from qtopia to qt-embedded. The commands to get and unpack the qt-embedded release candidate for the gumstix is:
+
  
 
   $ wget ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-4.4.0-rc1.tar.gz
 
   $ wget ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-4.4.0-rc1.tar.gz
   $ tar xzvf qt-embedded-linux-opensource-src-4.4.0-rc1.tar.gz ; cd qt-embedded-linux-opensource-src-4.4.0-rc1/
+
   $ tar xzvf qt-embedded-linux-opensource-src-4.4.0-rc1.tar.gz ; cd qt-embedded-linux-opensource-src-4.4.0-rc1
  
configure, make and make install
+
I chose to install qt-embedded in the directory qt-4.4.0 under /usr/lib. If you would like to install it somewhere else, provide that location in the -prefix option.
  
  $ ./configure -embedded arm -little-endian -prefix /qtopia ; make ; sudo make install
+
Configure, make and make install. If you want to use the touchscreen for mouse input, it is best to include the tslib mouse driver configuration for qt-embedded. The correct configuration is:
  
if you want to use the touchscreen for mouse input, it is best to include the tslib mouse driver configuration for qt-embedded. The correct configuration is:
+
   $ ./configure -embedded arm -little-endian -prefix /usr/lib/qt-4.4.0 -qt-mouse-tslib; make ; make install
 
+
   $ ./configure -embedded arm -little-endian -prefix /qtopia -qt-moust-tslib; make ; sudo make install
+
  
 
tar and move it to gumstix (~83 MB including examples & demos)
 
tar and move it to gumstix (~83 MB including examples & demos)
  
   $ tar cvf ~/qtopia-core.tar --exclude=doc /qtopia
+
  $ cd /usr/lib/qt-4.4.0
 +
   $ tar cvf ~/qt-4.4.0.tar --exclude=doc qt-4.4.0
  
   gumstix: $ tar xvf qtopia-core.tar -C /media/cf ; ln -s /media/cf/qtopia/ /qtopia
+
   gumstix: $ tar xvf qt-4.4.0.tar -C /media/cf ; ln -s /media/cf/qt-4,4,0/ /usr/lib/qt-4.4.0
  
 
+
qt-embedded needs libstdc++, move it to your gumstix's /lib or somewhere it can be found
qtopia needs libstdc++, move it to your gumstix's /lib or somewhere it can be found
+
  
 
   $ cd path-to/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/
 
   $ cd path-to/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/
Line 42: Line 35:
  
  
set variables for qtopia & calibrate touchscreen
+
Set variables for qtopia & calibrate touchscreen. If you are using the tslib then you should calibrate the touch screen using ts_calibrate instead of the mousecalibration example. The environment variable QWS_MOUSE_PROTO should be set to tslib:/dev/input/touchscreen0
 
+
  $ export QWS_MOUSE_PROTO='LinuxTP:/dev/input/touchscreen0'
+
  $ /qtopia/examples/qtopiacore/mousecalibration/mousecalibration -qws &
+
 
+
 
+
if you are using the tslib then you should calibrate the touch screen using ts_calibrate instead of the mousecalibration example. The environment variable QWS_MOUSE_PROTO should be set to tslib:/dev/input/touchscreen0
+
  
 
   $ export QWS_MOUSE_PROTO='tslib:/dev/input/touchscreen0'
 
   $ export QWS_MOUSE_PROTO='tslib:/dev/input/touchscreen0'
 +
  $ ts_calibrate
  
  
 
[[Category:How_to_-_gui]]
 
[[Category:How_to_-_gui]]

Revision as of 13:00, 15 April 2008

We need to find the compiler (symlinks & path)

 $ cd path-to/gumstix-oe/tmp/cross/bin ; for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done
 $ PATH=$PATH:path-to/gumstix-oe/tmp/cross/bin/ ; export PATH

Download and unpack qt-embedded. As of release candidate 1, the name has changed from qtopia to qt-embedded. The commands to get and unpack the qt-embedded release candidate for the gumstix is:

  $ wget ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-4.4.0-rc1.tar.gz
  $ tar xzvf qt-embedded-linux-opensource-src-4.4.0-rc1.tar.gz ; cd qt-embedded-linux-opensource-src-4.4.0-rc1

I chose to install qt-embedded in the directory qt-4.4.0 under /usr/lib. If you would like to install it somewhere else, provide that location in the -prefix option.

Configure, make and make install. If you want to use the touchscreen for mouse input, it is best to include the tslib mouse driver configuration for qt-embedded. The correct configuration is:

 $ ./configure -embedded arm -little-endian -prefix /usr/lib/qt-4.4.0 -qt-mouse-tslib; make ; make install

tar and move it to gumstix (~83 MB including examples & demos)

 $ cd /usr/lib/qt-4.4.0
 $ tar cvf ~/qt-4.4.0.tar --exclude=doc qt-4.4.0
 gumstix: $ tar xvf qt-4.4.0.tar -C /media/cf ; ln -s /media/cf/qt-4,4,0/ /usr/lib/qt-4.4.0

qt-embedded needs libstdc++, move it to your gumstix's /lib or somewhere it can be found

 $ cd path-to/gumstix-oe/tmp/staging/arm-angstrom-linux-gnueabi/lib/
 $ tar cfv ~/libstdc++.tar libstdc++.so*
 libstdc++.so
 libstdc++.so.6
 libstdc++.so.6.0.8
 gumstix: $ tar xvf libstdc++.tar -C /lib


Set variables for qtopia & calibrate touchscreen. If you are using the tslib then you should calibrate the touch screen using ts_calibrate instead of the mousecalibration example. The environment variable QWS_MOUSE_PROTO should be set to tslib:/dev/input/touchscreen0

 $ export QWS_MOUSE_PROTO='tslib:/dev/input/touchscreen0'
 $ ts_calibrate