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.py script, which manages the image generation process and final image assembly.

To generate an image, you only need to run the mksysimage.py Python script (*.py), which manages the overall image generation process. For more information about the mksysimage.py script, see mksysimage.py in the Utility Scripts chapter, and The mksysimage.py process in the Image Generation and Assembly chapter.

Note: To run the Python scripts on a Windows host, use Bash shell. To run Bash shell, type bash after you run the batch or shell script to prepare your environment in your Command Prompt window. Running the scripts in Bash shell allow you run the commands as if you were on a Linux host.

Generate the target image

To generate a target image, on your host system:
Note: The examples for for Linux or macOS.
  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.py to generate a system image file (.img). For example:

    mksysimage.py -o output_dir board.variant -i
    					
    where output_dir is the location for the new image and board.variant is one of the following:
    • nuc6.ext
    • denverton.ext
    • rcarh3spre.ext
    • rcarv3m3.ext
    • s32v.ext
    For example:
    mksysimage.py -o /tmp rcarh3spre.ext -i
    					

    where /tmp is the location of the new image, and rcharh3spre.ext is the board and board variant. The new image path that results is located under /tmp/ADAS_platformname.platformvariant, where platformname is the name of the hardware platform and platformvariant is variant of the hardware platform. For example, /tmp/ADAS_rcarh3spre.ext/.

You should now have a target image file (e.g., rcarh3spre-sd.img if you used rcarh3spre.ext for your board). You can transfer this image to your target, as described in the specific Getting Started guide for your board and product.