From cf0456a2949ed437b4e4f2521e72631c272573a6 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 11 Aug 2009 11:54:11 +0200 Subject: usermanual: Provide a section on Qt Embedded SDK Explain how to configure, build and use a Qt Embedded SDK generated with OpenEmbedded. --- docs/usermanual/chapters/common_use_cases.xml | 110 ++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) (limited to 'docs') diff --git a/docs/usermanual/chapters/common_use_cases.xml b/docs/usermanual/chapters/common_use_cases.xml index 2c693c681c..1407304ec9 100644 --- a/docs/usermanual/chapters/common_use_cases.xml +++ b/docs/usermanual/chapters/common_use_cases.xml @@ -511,8 +511,118 @@ SDK_SUFFIX = "toolchain-YOUR" SDK creation currently does not work with the DISTRO set to micro. + + If the environment-setup script packaged in the SDK should + require more environment look at the meta-toolchain-qte.bb + to accomplish this. + + +
+ Creating and Using a Qt Embedded SDK + +
+ Creating the SDK + + The SDK should contain a build of Qt Embedded, but also + optional depedencies like directFB, glib-2.0, gstreamer-0.10, tslib + and more esoteric depedencies like mysql and postgres. This allows + developers to simply start developing using Qt and enables system + integrators to easily recompile Qt and base libraries without tracking + down extra depedencies. + + + OpenEmbedded provides an easy way to create a Qt Embedded + SDK. In + recipes/tasks/task-qte-toolchain-host.bb host + tools like moc, uic, rcc, qmake will get installed and in + recipes/tasks/task-qte-toolchain-target.bb the Qt4 header + files and libraries will be installed. + + To build the SDK, setup OpenEmbedded in the usual way by picking + a DISTRO and MACHINE. Issue + the below command and after the operation finished you should find + a SDK in the deployment directory. + +# bitbake meta-toolchain-qte + + + + The deployment directory depends on the distribution and used + C library. In the case of Angstrom and glibc it is located in + tmp/deploy/glibc/sdk. + + Change qt4-embedded.inc and + qt4.inc for using different Qt configuration + flags. This might include a custom qconfig.h to produce a reduced + size build. + + When distributing the SDK make sure to include a written offer + to provide the sourcecode of GPL licensed applications or provide + parts of the sources folder. The + sources folder is located right next to the sdk + one. +
+ + +
+ Using the Qt Embedded SDK + + In this example we are assuming that the target hardware + is an armv5t system and the SDK targets the Angstrom Distribution. You + should start by downloading the SDK and untar it to the root folder + (/). Once this operation is finished you will + find a new directory /usr/local/angstrom/arm/ and + it contains the environment-setup to setup the + QMAKESPEC and various other paths. + + + +Untar the SDK once +# tar -C / -xjf angstrom-armv5te-linux-gnueabi-toolchain-qte.tar.bz2 + +Before using it source the environment +# . /usr/local/angstrom/arm/environment-setup + +Use qmake2 to build software for the target +# qmake2 + + + Creating and building a simple example. We will create a simple + Qt Embedded application and use qmake2 and + make to cross compile. + + +# . /usr/local/angstrom/arm/environment-setup +# cd $HOME +# mkdir qte-example +# cd qte-example + +# echo "TEMPLATE=app +SOURCES=main.cpp +" > qte-example.pro + +# echo '#include <QApplication> +#include <QPushButton> + +int main(int argc, char** argv) { + QApplication app(argc, argv); + + QPushButton btn("Hello World"); + btn.show(); + btn.showMaximized(); + + return app.exec(); +} +' > main.cpp + +# qmake2 +# make + + + +
-- cgit v1.2.3