Académique Documents
Professionnel Documents
Culture Documents
php/Building_Qt
Building Qt
From Texas Instruments Embedded Processors Wiki
Building Qt
Contents
1 Useful Links
1.1 Qt Embedded Download Location
1.2 TI software Package Download Location
1.3 Getting Started Guides
2 Setting up Target before Qt Build
3 Building Qt with OpenGL ES accelerated by SGX
4 Building Qt
5 Creating Project in Qt
6 Configuration Examples
6.1 Qt 4.5.x Embedded Linux: Configuration for OMAP-L137
6.2 Qt 4.5.x WinCE: Configuration for OMAP3
6.3 Qt 4.5.x Embedded Linux: Configuration for DM365 with Avnet LCD
7 See Also
Useful Links
Qt Embedded Download Location
You can download the Open Source LGPL version of Qt libraries 4.6.2 for embedded Linux here (http://get.qt.nokia.com/qt/source
/qt-everywhere-opensource-src-4.6.2.tar.gz)
DVSDK GSG
Graphics SDK GSG
Qt 4.7
Using Qt4.7 - Refer to this page for an overview of using QtQuick feature introduced in Qt 4.7
Please follow Graphics SDK GSG for getting started on SGX if you need 3D Graphics (OpenGL ES xx) in you Qt GUI Application
and your processor has SGX
1 of 5 02/01/2011 01:41 PM
Building Qt - Texas Instruments Embedded Process... http://processors.wiki.ti.com/index.php/Building_Qt
-You may need to refer the Technical Reference Manual of your Processor to determine whether it has SGX or not
FileSystem:
Note: For BeagleBoard, please use the same toolchain as the one used to compile your kernel & filesystem
Bootargs:
- OMAP3515/30
- DM3715/30
- AM3517
- AM3717
If you are making your Qt GUI Application using OpenGL ES 1.1/2.0 (3D Graphics), then you need to build Qt with OpenGL
ES support.
Building Qt
You can follow these steps to build Qt without OpenGL ES support for any ARM based TI Processor.
Step 1:
It is assumed that you have downloaded Qt embedded libraries and have set up the target board as mentioned above in this wiki
Step 2:
Copy the qmake conf for your processor. Replace <NAME_OF_PROCESSOR> with the name of your target in all the steps below:
cp -R [qt-install-dir]/mkspecs/qws/linux-arm-g++/ [qt-install-dir]/mkspecs/qws/linux-<NAME_OF_PROCESSOR>-g++/
2 of 5 02/01/2011 01:41 PM
Building Qt - Texas Instruments Embedded Process... http://processors.wiki.ti.com/index.php/Building_Qt
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
# modifications to g++.conf
#Toolchain
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)
Note: For a different toolchain, please change the qmake.conf above accordingly. e.g For Angstrom Toolchain, you may need to change
arm-none-linux-gnueabi-gcc to arm-angstrom-linux-gnueabi-gcc
#
# qmake configuration for building with arm-linux-g++
#
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
# modifications to g++.conf
#Toolchain
QMAKE_CC = arm-none-linux-gnueabi-gcc
QMAKE_CXX = arm-none-linux-gnueabi-g++
QMAKE_LINK = arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-none-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-none-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-none-linux-gnueabi-objcopy
QMAKE_STRIP = arm-none-linux-gnueabi-strip
load(qt_config)
Step 3:
The steps below will list all the configure feature options available in Qt. You can add/remove feature using these configure options.
cd [qt-install-dir]
./configure --help
./configure -prefix <PATH> -embedded arm -platform /qws/linux-x86-g++ -xplatform /qws/linux-omap3-g++ -depths 16,24,32 -no-mmx
-no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -qt-mouse-pc -qt-mouse-linuxtp
-qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast
Note:
"-prefix" <PATH> option in the configure above points to the path inside the rootfs where qt-e will be installedon Target
FileSystem
'"-platform '/qws/linux-x86-g++" in configure above assumes your host machine CPU to be of 32-bit. For 64-bit, use "-platform
/qws/linux-x86_64-g++"
For TouchScreen, you need to append the configure options "-qt-mouse-tslib" in above mentioned recommended options
Step 4:
> make
3 of 5 02/01/2011 01:41 PM
Building Qt - Texas Instruments Embedded Process... http://processors.wiki.ti.com/index.php/Building_Qt
e.g. if the path in "-prefix" option of configure is "-prefix /opt/qt" and you use "make install INSTALL_ROOT=/home/alpha/nfs/", then the
qt binaries will be installed at "/home/alpha/nfs/opt/qt"
Step 5:
After copying/installing the qt binaries in the target filesystem, you can run the qt examples & qt demos
For the commands below, I have installed my qt-embedded in the path: /opt/qt-embedded
root@arago:~# cd /opt/qt-embedded/demos/
root@arago:~# cd composition
root@arago:~# ./composition -qws
You can see the output either on the lcd or dvi output depending on how you configured your target board to output
Creating Project in Qt
Export the toolchain to be used for cross-compiling
Export "qmake" under [qt-install-dir]/bin/qmake
cd path/to/project
qmake -project
qmake -spec qws/linux-<NAME_OF_PROCESSOR>-g++ (From Step 2 of Building Qt above)
make
Configuration Examples
Comment: examples below are taken from real-world tests but don't mean you shouldn't consider other options. Especially where
modules are not build you might remove that option to get the full Qt functionality (e.g. -no-phonon was used in one case to reduce
compile time as we had no need for phonon in our application demo).
#./configure -prefix /opt/qt -embedded arm -platform /qws/linux-x86-g++ -xplatform /qws/linux-omapl1-mv-g++ -qt-kbd-usb -depths 16 -no-cups -no-largefile
-no-accessibility -no-opengl -no-openssl
Make sure that your path contains <wince_qt_dir>\bin. Then open a Visual Studio shell and enter:
Here we assume that WinCE Platform Builder and the OMAP3 WinCE BSP are installed. Now type "nmake" inside a Platform Builder
build shell to generate Qt DLLs. The DLLs maybe installed into C:/Windows on the WinCE file system or reside in the same folder as the
Qt application (e.g. on SD card or USB disk). This is especially useful for testing.
set INSTALL_ROOT=\some_path
nmake install
This will copy all relevant files into C:\some_path. From there copy to the WinCE target.
4 of 5 02/01/2011 01:41 PM
Building Qt - Texas Instruments Embedded Process... http://processors.wiki.ti.com/index.php/Building_Qt
For touchscreen support, ensure the following lines are in the gmake.conf file:
Add the following lines to the /root/.profile file on the target. This sets the environment variables for touch screen support, and for Qt to
use the second OSD window (/dev/fb2 ).
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export QWS_DISPLAY=LinuxFb:/dev/fb2
See Also
Building Qt to make use of the Beagle board’s SGX GPU (http://labs.trolltech.com/blogs/2009/11/20/building-qt-to-make-use-of-the-
beagle-boards-sgx-gpu/)
Beagle is the first officially verified Qt Board under "The Qt Board Verification Program" - March 02, 2010 (http://qt.nokia.com
/about/news/qt-launches-qt-board-verification-program/)
Qt on BeagleBoard
For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Building Qt here.
Retrieved from "http://processors.wiki.ti.com/index.php/Building_Qt"
Categories: OpenGL ES | Qt | OMAPL1 | Sitara Linux | OMAP35x
Leave a Comment
Comments
Comments on Building Qt
Privacy policy
About Texas Instruments Embedded Processors Wiki
Disclaimers
5 of 5 02/01/2011 01:41 PM