Generate the image

These instructions explain how to generate and assemble a target image for a QNX product such as QNX Platform for ADAS.

We recommend that the first time you generate a target image you simply generate an unmodified image (i.e., no changes to content or configuration). After you have successfully generated an unmodified image, you can modify image contents and configuration. This approach allows you to confirm that you have prepared your working environment correctly, and that the image generation scripts are running correctly.

Image generation scripts

Your product includes several scripts that are responsible for different stages of the image generation process. The only scripts you need to know about, however, are mkworkspace.py, which copies your product files into your workspace (see Prepare the work environment), and the mksysimage script, which manages the image generation process and final image assembly.

To generate an image, you only need to run the mksysimage Python script (*.py), which manages the overall image generation process. When you run this script, set the -P option to specify your product; for example: -P ADAS (for the QNX Platform for ADAS). For more information about the mksysimage script, see mksysimage in the Utility Scripts chapter, and The mksysimage process in the Image Generation and Assembly chapter.

Generate the target image

To generate a target image, on your host system:

  1. If you haven't done so already, prepare your working environment (see Prepare the work environment).
  2. Create an output directory where you want to have the image generated. For example:
    mkdir output_dir
  3. Run mksysimage to generate a system image file (.img). For example:

    mksysimage.py -P ADAS -o output_dir board.variant
    

    where output_dir is the location for the new image. Or, more specifically:

    mksysimage.py -P ADAS -o /tmp jacinto6evm.ext

    where /tmp is the location of the new image, and jacinto6evm.ext is the board and board variant.

You should now have a target image file ready to write to a USB key or micro SD card (e.g., jacinto6evm-sd.img if you used jacinto6evm.ext for your board). You can transfer this image to your target, as instructed in the Getting Started guide for your product.