Building a target image

If you modify the deployment configuration or target contents of your QNX Apps and Media system, you can use command-line instructions to build an image to include your modifications.

Before you begin building your QNX Apps and Media target image, familiarize yourself with the available scripts and configuration files, then prepare your working environment, as described below in "Setting up."


Scripts and configuration files

The QNX SDK for Apps and Media installation process creates a workspace that contains the scripts and configuration files you'll use when you build your target image.

Scripts are under the following directories (assuming that you have already set $QNX_DEPLOYMENT_WORKSPACE as instructed in "Setting up"):


The (optional) configuration files are in:


At this location, under platform.variant, there are two important directories:

Contains files for mksysimage configuration.
Files in this directory specify how to generate the IFS.

Setting up

When you build a custom image, start with the following preliminary steps:

  1. Copy to another location the directory and all the contents of:


    (where base_dir is the directory where you installed QNX SDP).

  2. Set the QNX_DEPLOYMENT_WORKSPACE environment variable to the location of the new copy of the deployment directory (include the /deployment directory in the path).
  3. Create an output directory where you want to have the image generated. You must specify a valid directory name; the directory must exist prior to running mksysimage, or the script won't generate the image.
  4. Set the QNX_QT environment variable to the architecture-specific path of your QNX Qt Development Framework installation. This environment variable tells the mksysimage script (which generates the target image) where the QNX Qt runtime is installed on your host.

    For example, on a Linux host for an ARMLE-v7 target:

    export QNX_QT=qt_base_dir/QNX-qt/Qt-5.3.1-armle-v7

    On a Windows host for an x86 target:

    set QNX_QT=qt_base_dir\QNX-qt\Qt-5.3.1-x86

    where qt_base_dir is the directory where you installed the QNX Qt Development Framework.

Later, when you run mksysimage, redirect its output to a file and look for any warning and error messages about missing files. For example:

Warning: host file filename missing.

When you run (Linux) or mksysimage.bat (Windows) to generate a system image file (.img), you must set these options:

  • You must specify the argument for the -P option as -P AnM (for Apps and Media).
  • The script needs to know the full path to the QNX Qt runtime on your target, so it can find the Qt libraries and binaries. If you haven't set the QNX_QT environment variable, when you run mksysimage, use the -Q option to specify where the QNX Qt runtime is installed on your host.
  • Run the script with the -f option to force it to overwrite existing tar files.