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:
- BSP_ROOT_DIR
- The name of the directory where you extracted the BSP archive.
- CPU_VARIANT
- 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.
- PATH
-
A
colon-separated list of directories that are searched when the shell looks for commands. For
more information, see "ksh"
in the Utilities Reference.
- QNX_DEPLOYMENT_WORKSPACE
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:
- Copy to another location the directory and all the contents of:
base_dir/product_deployment/QSAM/1.1/deployment/
where base_dir is the directory where you installed the QNX
Neutrino SDP.
- 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.
- QNX_HOST
- The location of host-specific files for all development hosts.
- QNX_PRODUCT
- 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).
- QNX_PYTHON_PATH
- 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).
- QNX_QT
- 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.
- QNX_TARGET
- 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:
Linux:
# source base_dir/qnx660-env.sh
Windows:
base_dir\qnx660-env.bat
where base_dir is the directory where you installed QNX SDP 6.6.
CAUTION:
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.