Difference between revisions of "Qtopia core howto"

From Gumstix User Wiki
Jump to: navigation, search
(remove spam)
 
(28 intermediate revisions by 12 users not shown)
Line 1: Line 1:
'''incomplete'''
+
We need to find the compiler (symlinks & path)
  
 +
  $ cd gumstix/gumstix-oe/tmp/cross/armv7a/bin
 +
  $ for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done
 +
  $ PATH=$PATH:gumstix/gumstix-oe/tmp/cross/armv7a/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 are:
  
 +
  $ wget ftp://ftp.qtsoftware.com/qt/source/qt-embedded-linux-opensource-src-4.5.0.tar.gz
 +
  $ tar xzvf qt-embedded-linux-opensource-src-4.5.0.tar.gz ; cd qt-embedded-linux-opensource-src-4.5.0
  
  $ wget ftp://ftp.trolltech.com/qt/source/qtopia-core-preview-opensource-src-4.4.0-tp1.tar.gz
+
I chose to install qt-embedded in the directory qt-4.5.0 under /usr/lib. If you would like to install it somewhere else, provide that location in the -prefix option.
  $ tar xfzv qtopia-core-preview-opensource-src-4.4.0-tp1.tar.gz ; cd qtopia-core-preview-opensource-src-4.4.0-tp1/
+
  
 +
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.5.0 -prefix-install -qt-mouse-tslib
 +
  $ make
 +
  $ sudo make install INSTALL_ROOT=/tmp/qt-embedded
  
we need qtopia to find the compiler
+
tar and move it to gumstix (~40 MB)
  
 +
  $ cd /tmp/qt-embedded/usr/lib
 +
  $ tar zcf ~/qt-4.5.0.tar qt-4.5.0/{lib,plugins,translations}
  
   $ ln -s path-to/gumstix-oe/tmp/cross/bin/arm-angstrom-linux-gnueabi-g++ path-to/gumstix-oe/tmp/cross/bin/arm-linux-g++
+
   gumstix: $ tar zxf qt-4.4.0.tar -C /media/cf ; ln -s /media/cf/qt-4,4,0/ /usr/lib/qt-4.4.0
  $ PATH=$PATH:path-to/gumstix-oe/tmp/cross/bin/ ; export PATH
+
  
 +
/media/cf can be substituted with /media/card if you are using a MicroSD expansion like the one that comes with the LCD Pack.
 +
Additionally Symlinks cannot be stored on a FAT based disk. This means that the symbolic links like libQtGui.so.4 -> libQtGui.so.4.5.0 won't be present and your programs may not be able to find libQtGui.so.4 . To fix this either format the disk to a symlink compatible system (ext2) or make real copies of the libraries under the other name.
  
configure, make and make install
+
qt-embedded needs libstdc++, move it to your gumstix's /lib or somewhere it can be found
  
 +
  $ cd gumstix/gumstix-oe/tmp/staging/armv7a-angstrom-linux-gnueabi/lib/
 +
  $ tar zcf ~/libstdc++.tar libstdc++.so*
  
   $ ./configure -embedded arm -little-endian -prefix /qtopia -nomake examples -nomake tools -nomake demos ; make ; make install
+
   libstdc++.so
 +
  libstdc++.so.6
 +
  libstdc++.so.6.0.8
  
 +
  gumstix: $ tar zxf libstdc++.tar -C /lib
  
remove debug files *.debug
 
  
  
tar and move it to gumstix
+
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
  
  $ tar cfv ~/qtopia-core.tar /qtopia
 
  
  gumstix: $ mkdir /qtopia ; tar xfv qtopia-core.tar -C /qtopia
+
== See Also  ==
  
 +
*[http://processors.wiki.ti.com/index.php/Building_Qt Building Qt at wiki.ti.com]
  
  
 
+
[[Category:How_to_-_gui]]
[[Category:How to-gui]]
+

Latest revision as of 15:28, 23 November 2010

We need to find the compiler (symlinks & path)

 $ cd gumstix/gumstix-oe/tmp/cross/armv7a/bin 
 $ for f in arm-angstrom-linux-gnueabi-*; do n=$(echo $f|cut -b 28-); ln -s $f arm-linux-$n; done
 $ PATH=$PATH:gumstix/gumstix-oe/tmp/cross/armv7a/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 are:

  $ wget ftp://ftp.qtsoftware.com/qt/source/qt-embedded-linux-opensource-src-4.5.0.tar.gz
  $ tar xzvf qt-embedded-linux-opensource-src-4.5.0.tar.gz ; cd qt-embedded-linux-opensource-src-4.5.0

I chose to install qt-embedded in the directory qt-4.5.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.5.0 -prefix-install -qt-mouse-tslib
 $ make
 $ sudo make install INSTALL_ROOT=/tmp/qt-embedded

tar and move it to gumstix (~40 MB)

 $ cd /tmp/qt-embedded/usr/lib
 $ tar zcf ~/qt-4.5.0.tar qt-4.5.0/{lib,plugins,translations}
 gumstix: $ tar zxf qt-4.4.0.tar -C /media/cf ; ln -s /media/cf/qt-4,4,0/ /usr/lib/qt-4.4.0

/media/cf can be substituted with /media/card if you are using a MicroSD expansion like the one that comes with the LCD Pack. Additionally Symlinks cannot be stored on a FAT based disk. This means that the symbolic links like libQtGui.so.4 -> libQtGui.so.4.5.0 won't be present and your programs may not be able to find libQtGui.so.4 . To fix this either format the disk to a symlink compatible system (ext2) or make real copies of the libraries under the other name.

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

 $ cd gumstix/gumstix-oe/tmp/staging/armv7a-angstrom-linux-gnueabi/lib/
 $ tar zcf ~/libstdc++.tar libstdc++.so*
 libstdc++.so
 libstdc++.so.6
 libstdc++.so.6.0.8
 gumstix: $ tar zxf 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


See Also