INTEGRITY Platform: Difference between revisions
(Add INTEGRITY application build) |
(Remove demos from path in examples) |
||
Line 80: | Line 80: | ||
First, try to build a sample example, like the [[http://doc.qt.io/qt-5/qtwidgets-painting-deform-example.html deform]] widget demo: | First, try to build a sample example, like the [[http://doc.qt.io/qt-5/qtwidgets-painting-deform-example.html deform]] widget demo: | ||
$ cd examples | $ cd examples/painting/widgets/deform | ||
$ | $ ../../../../bin/qmake | ||
$ make -j6 | $ make -j6 | ||
Revision as of 14:05, 1 April 2016
INTEGRITY OS Platform for Qt
This page described a reference platform for Qt on INTEGRITY OS by focusing on a minimal set of software and selected development boards. Note that INTEGRITY supports a large variety of hardware, most of it will run Qt as well.
Required software
Green Hills-specific setup
The host platform to build Qt for INTEGRITY has to be Linux right now, mainly due to the use of the Unix configure script. Patches to the Windows configure.exe are welcome.
The minimal requirements for Qt 5.6 are:
- INTEGRITY 11.x
- MULTI 2015.1.6
The minimal requirements for Qt 5.7 are:
- INTEGRITY 11.x with C++11 support
- MULTI 2015.5
Qt sources from git
The initial step is to gather sources from the standard git repository. You may want to look at Building Qt 5 from Git for detailed instructions and additional host requirements, otherwise:
$ git clone git://code.qt.io/qt/qt5.git $ cd qt5 $ git checkout 5.6
You can do a full checkout using:
$ git submodule update --init
Or only the minimum using:
$ git submodule update --init qtbase qtimageformats qtsvg qtxmlpatterns qtrepotools qtdeclarative
Configuring and Building
Building Qt5 for INTEGRITY follows the classic process with qmake-generated makefiles. To point the setup to the specifics of your INTEGRITY setup, you need to first define some environment variables. Those variables need to be declared and valid also during compilation of additional applications:
$ export INTEGRITY_DIR=/your/path/to/integrity INTEGRITY_BSP=your_bsp_name
For example, for i.MX6:
$ export INTEGRITY_DIR=/usr/ghs/int1104 INTEGRITY_BSP=imx6-sabrelite
Or for an Intel PC:
$ export INTEGRITY_DIR=/usr/ghs/int1144 INTEGRITY_BSP=pcx86-smp
Also, make sure that your MULTI Compiler binaries are accessible in your path:
$ export PATH=$PATH:/usr/ghs/comp_201516
Once those definitions are set, you can run the configure tool to prepare the checkout (to be run either from qt5 or qtbase):
$ ./configure -xplatform integrity-x86 -confirm-license -opensource -nomake examples -nomake tests --no-dbus --force-debug-info -prefix / -extprefix /path/to/local/target
In the above:
- -xplatform platform: integrity-armv7 and integrity-x86 are valid xplatforms right now
- -prefix: should point to the path that Qt will see as the root while running on the INTEGRITY target
- -extprefix: should point to the path that will contain a copy of the target filesystem
- -silent: optional, allows not showing the command-line but only shorter messages for building
You can now do the actual build:
$ make -j6
After building the base libraries, you may want to build additional modules some examples may need. For each of qtsvg, qtxmlpatterns, qtimagesformats, change to the corresponding directory and execute:
$ ../qtbase/bin/qmake $ make -j6
Deployment
First, try to build a sample example, like the [deform] widget demo:
$ cd examples/painting/widgets/deform $ ../../../../bin/qmake $ make -j6
You now have a built AddressSpace. You may include it in a pre-existing INTEGRITY Application, or create one yourself using the following as a sample deform_app.int:
Kernel
Filename DynamicDownload
EndKernel
AddressSpace
Filename deform
MemoryPoolSize 0x800000
Language C++
HeapSize 0x800000
Task Initial
StackSize 0x30000
EndTask
EndAddressSpace
Then run intex to build the application:
$ intex -os_dir $INTEGRITY_DIR -bsp $INTEGRITY_BSP -alt_tools_path /usr/ghs/comp_201516 -intexoption -no_shared_libs -intexoption -no_shared_libs_quiet -intfile deform_app.int deform -o deform_app
That's it, load and run!