INTEGRITY Platform

From Qt Wiki
Revision as of 07:02, 29 August 2017 by RollandDudemaine (talk | contribs) (Green Hills-specific setup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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

Important Note: Qt on INTEGRITY is currently a community effort. Some patches are needed to be able to use the opensource version, because all patches have not yet been accepted through Gerrit. Please contact your Green Hills representative to get started.

For Qt Quick support, an OpenGL ES stack is necessary. Not all GPUs have been tested so far, again contributions welcome.

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.9 and up are:

  • INTEGRITY 11.x with C++11 support patches
  • MULTI Compiler 2017.1 or later

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.7

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!