Environment variables

Before you create an image, you must make sure the environment variables relevant to the image creation process are properly set.

Environment variables relevant to image creation

Listed below are the environment variables associated with the image creation process. Note that PATH, QNX_HOST, and QNX_TARGET are set when you run the script that defines the environment variables:

The name of the directory where you extracted the BSP archive.
The CPU architecture for which the BSP is designed. For QNX SDP 6.6, for example, the supported CPU variants are armle-v7 or x86.
A colon-separated list of directories that are searched when the shell looks for commands. For more information, see "ksh" in the Utilities Reference.

The path to the QNX deployment workspace where you copied the files required to build the image. It determines the location for the files that go onto the target. Before you begin working:

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


    where base_dir is the directory where you installed the QNX Neutrino SDP.

  2. Set the QNX_DEPLOYMENT_WORKSPACE environment variable to the location where you copied the deployment directory and its contents.

You can also use this environment variable when you have custom hardware (boards) that don't currently exist in the boards directory. If you want to create your own copy of the QNX deployment directory structure for your requirements, you can use this environment variable to reference your specific source control.

The location of host-specific files for all development hosts.
An optional environment variable that identifies the default product to use, such as AnM for QNX SDK for Apps and Media. If you don't set this environment variable, when you generate a target image, set the -P option as -P AnM (for Apps and Media).
An optional environment variable that specifies the location of the Python interpreter used to generate images. This variable is set by running mksysimage.sh (Linux) or mksysimage.bat (Windows).
An optional environment variable that refers to the location where you installed the version of Qt that you want to use. By default it's not set; however, it should reference the architecture-dependent location where Qt is installed on the host computer.

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.

If you don't set this environment variable, use the -Q option when you run mksysimage.

The location of SDP (OS) target content on the host device.
Note: To see a detailed list of environment variables used in QNX SDP and the QNX SDK for Apps and Media, see the appendix "Commonly Used Environment Variables" in the QNX SDP Utilities Reference.

Set environment variables for image creation

To set environment variables for the QNX SDK for Apps and Media, type the following at the command prompt:


# source base_dir/qnx660-env.sh



where base_dir is the directory where you installed QNX SDP 6.6.

When you run qnx660-env.sh (Linux) or qnx660-env.bat (Windows), the variables are only set locally. Therefore, every time you open a shell or a command-line prompt, you must run the command to set the environment variables.