Prepare the work environment

Before running mksysimage to generate a new target image, you must prepare the work environment on your host system.

On your host system, before you can generate an image for your target board you should have all the components you'll need, including:

Product-specific scripts

As well as the generic mkworkspace and mksysimage scripts, your product includes scripts that you can run to set your environment variables. For example, QNX Platform for ADAS includes qnx650-adas10-env.bat for Windows hosts, and qnx650-adas10-env.sh for a Linux hosts.

These scripts are named according to the pattern shown in the figure below:



Figure 1. Naming convention for product-specific scripts used to set environment variables

In our instructions, we use qnxsdp-productrelease-env.bat and qnxsdp-productrelease-env.sh to refer to these scripts. Substitute the QNX SDP release number, product, and product release number for your product.

Set the environment variables and set up the workspace

When you have the required components in a convenient location on your host, you must:

  1. Set QNX_BSP_ROOT_DIR to the directory where you extracted the BSP archive.
  2. Set the rest of the environment variables you need set before you can create your workspace:

    • Windows: run the qnxsdp-productrelease-env.bat script.

    • Linux: source the qnxsdp-productrelease-env.sh script.

    For example, for QNX Platform for ADAS on a Linux host:

    $ source /opt/qnx650/qnx650-adas10-env.sh

    For more information about the environment variables you need to set, see qnx*-env.

  3. Run the mkworkspace.py script, which sets up your workspace and copies your content files to it.

    This script simplifying the work environment by copying only the required files and directories to it (see mkworkspace.py).

  4. Set the QNX_DEPLOYMENT_WORKSPACE environment variable to:

    workspace/product_deployment/

    where:

    • workspace is the path to your workspace created by mkworkspace.py (e.g., /User/cmarlowe/QNX650/)
    • product_deployment is your product deployment directory (e.g., ADAS_deployment)

    For example:

    export QNX_DEPLOYMENT_WORKSPACE=/User/cmarlowe/QNX650/ADAS_deployment
Note: You need to run mkworkspace.py only once, unless you have new content to copy into your workspace. Remember, however, that the environment variables are set locally, so you must set them again when if you open a new shell.

When you have completed the tasks described above, the directories and files in your workspace should follow the model described in Workspace directories. You should now be able to generate and assemble a new target image.

Environment variables

Most of the environment variables you'll need are set when you run your product installer. After these have been set, however, you will still need to set the following environment variables (see above):

QNX_BSP_ROOT_DIR
The name of the directory where you extracted the BSP archive.
QNX_DEPLOYMENT_WORKSPACE
The path to your deployment workspace, where mkworkspace.py has copied your files.
Note:

For information about the environment variables used to modify the search paths, see Search path environment variables in the Modifying Content chapter.

See the QNX SDP Utilities Reference appendix Commonly Used Environment Variables for detailed list of environment variables used in the QNX SDP.