Which edition of Qt do you want to use ? Type 'c' if you want to use the Commercial Edition. Type 'o' if you want to use the Open Source Edition. o This is the Qt/X11 Open Source Edition. You are licensed to use this software under the terms of the Lesser GNU General Public License (LGPL) versions 2.1. You are also licensed to use this software under the terms of the GNU General Public License (GPL) versions 3. Type '3' to view the GNU General Public License version 3. Type 'L' to view the Lesser GNU General Public License version 2.1. Type 'yes' to accept this license offer. Type 'no' to decline this license offer. Do you accept the terms of either license? yes Creating qmake. Please wait... Configuring Qt for X11 Let this run through, then run make .
Multiple Qt Installs and QMake
QMake builds Makefiles (and projects, etcetera)
Build a project file: qmake -project
Build a Makefile from a project file: qmake
For this, QMake knows about
The compiler to use
Paths and libraries to use
QMake is built when configuring Qt, so each Qt installation has a different QMake.
Multiple Qt Installs and QMake Change qmake: make dist clean && qmake-nn qmake-x11 qmake-target qmake-qvfb Makefile + Executable project.pro cpp h ui qrc
Building the QVFb
The QVFb tool is not built automatically when building Qt for X11.
cd tools/qvfb make make install
Configuring Qt for QVFb
Problem: The sources are extracted to qt-embedded-... . This is the same directory as will be used by the target sources.
Solution: Rename to qt-qvfb!
Configuring Qt for QVFb $ ./configure --help Usage: ... [additional platform specific options (see below)] ... Qt for Embedded Linux only: -xplatform target ... The target platform when cross-compiling. -no-feature-<feature> Do not compile in <feature>. -feature-<feature> .. Compile in <feature>. The available features are described in src/corelib/global/qfeatures.txt -embedded <arch> .... This will enable the embedded build, you must have a proper license for this switch to work. Example values for <arch>: arm mips x86 generic -armfpa ............. Target platform is uses the ARM-FPA floating point format. -no-armfpa .......... Target platform does not use the ARM-FPA floating point format. The floating point format is usually autodetected by configure. Use this to override the detected value. -little-endian ...... Target platform is little endian (LSB first). -big-endian ......... Target platform is big endian (MSB first). -host-little-endian . Host platform is little endian (LSB first). -host-big-endian .... Host platform is big endian (MSB first). You only need to specify the endianness when cross-compiling, otherwise the host endianness will be used. -no-freetype ........ Do not compile in Freetype2 support. -qt-freetype ........ Use the libfreetype bundled with Qt. * -system-freetype .... Use libfreetype from the operating system. See http://www.freetype.org/ -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the default (full). -depths <list> ...... Comma-separated list of supported bit-per-pixel depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'. -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library, by default all available decorations are on. Possible values for <style>: [ styled windows default ] -plugin-decoration-<style> Enable decoration <style> as a plugin to be linked to at run time. Possible values for <style>: [ default styled windows ] -no-decoration-<style> ....Disable decoration <style> entirely. Possible values for <style>: [ styled windows default ] -no-opengl .......... Do not support OpenGL. -opengl <api> ....... Enable OpenGL ES support With no parameter, this will attempt to auto-detect OpenGL ES 1.x or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection. NOTE: A QGLScreen driver for the hardware is required to support OpenGL ES on Qt for Embedded Linux. -qt-gfx-<driver> ... Enable a graphics <driver> in the QtGui library. Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ] -plugin-gfx-<driver> Enable graphics <driver> as a plugin to be linked to at run time. Possible values for <driver>: [ ahi directfb hybrid linuxfb powervr qvfb transformed vnc ] -no-gfx-<driver> ... Disable graphics <driver> entirely. Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ] -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library. Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ] -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to at runtime. Possible values for <driver>: [ linuxis sl5000 usb vr41xx yopy ] -no-kbd-<driver> ... Disable keyboard <driver> entirely. Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ] -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library. Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ] -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to at runtime. Possible values for <driver>: [ bus linuxis linuxtp pc tslib vr41xx yopy ] -no-mouse-<driver> ... Disable mouse <driver> entirely. Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ] -iwmmxt ............ Compile using the iWMMXt instruction set (available on some XScale CPUs). -no-glib ........... Do not compile Glib support. + -glib .............. Compile Glib support.
Configuring Qt for QVFb -prefix path -no-... -nomake examples -nomake demos -qt-freetype -qt-zlib -no-gif -qt-libjpeg -qt-libpng -depths 8,16 -qt-kbd-qvfb -qt-mouse-qvfb -qt-gfx-qvfb Use the same tricks as with Qt for X11 Use Qt's versions of 3 rd party libraries Depths limits you to what your target has -qt-*-qvfb builds with drivers for the virtual target There are more options – now configure and make
Embedded Linux 101
Can be pre-configured for the specific board to reduce boot time
Can contain all drivers (avoid loading modules)
Can contain parts or the full file system.
Same or smaller C lib
glibc works – uclibc, newlib, etc are smaller
Fewer and smaller utilities
busybox replaces most tools
Avoid all extras (usually not shipping with emacs)
Embedded Linux 101
Different architecture means that you need to cross compile.
The entire system is usually built into one or a few binary images.
Kernel + initial file system
Additional file systems
Use the available infrastructure!
buildroot, scratchbox, openembedded, etc
Qt for Embedded Linux Dependencies
Graphics needs a framebuffer
Can acceleration, e.g. PowerVR (TI OMAP), DirectFB, etcetera.
Touch based input needs tslib
You can provide custom Qt back-ends for graphics, mouse, keyboard.
Configuring Qt for Embedded Linux
No hardware here today, but lets target an imaginary ARM board.
Possible real targets for the curious:
An old PC (or a newer one...)
Configuring Qt for Embedded Linux Use the same setup as for your QVFb Prepare for an embedded target and a cross compilation -prefix path -no-... -nomake examples -nomake demos -qt-freetype ... -depths 8,16 -embedded arch -xplatform mkspec
Configuring Qt for Embedded Linux
The arch names your target architecture
x86, x86_64, ia64, arm, powerpc, mips, sh, sh4a
Gives you architecture specific implementations, e.g. qatomic_i386.h