The mksysimage.py process

The following describes what mksysimage.py does when it generates and assembles an image.

This description assumes that you have followed the instructions in Prepare the work environment in the Generating a Target Image chapter to set up your workspace and working environment on your host system, and that you haven't modified your search paths (see Search paths in the Modifying Content chapter).

The diagram below shows the process used to generate a target image, and the inputs that determine what goes into the final target image. You modify the files on the left (under “Configuration”) to configure the IFS, partitions, and target image. The files on the right (under “Artifacts”) are created by the image generation process.



Figure 1. An overview of the inputs that determine the contents and configuration of a target image.

When you run the mksysimage.py script to create an image, the script completes the following tasks:

  1. Write a file with information about the image, including date and time, the build number, supported architecture and board variants (see os.version files in the “Artifacts” section).
  2. Read the searchpaths.cfg file from its default location: $QNX_DEPLOYMENT_WORKSPACE/infra/utils/, or from the path specified by the script's -c option (see Search paths in the Modifying Content chapter).
  3. Scan the search paths specified by the [infra] section of the searchpaths.cfg file to get the mksysimage.py configuration file (e.g., rcarh3spre-mksysimage.cfg), the IFS configuration files (e.g., rcarh3spre-ifs.cfg), and the buildfiles (e.g., carh3spre-sd.build).

    The mksysimage.py configuration files specify the:

    • images (e.g., [sd], [sd-emmc-boot])
    • image configuration file (e.g., image-config=rcarh3spre-sd.cfg), which specifies the image partitions
    • IFS to generate for the image (e.g., default-ifs=rcarh3spre-sd.ifs), which mksysimage.py renames to qnx-ifs (the default IFS)
    • the profile file or files to use to get the filesets for the content (eg., image-profiles=os.xml,dos-sd.xml, image-profiles=dos-sd-emmc.xml)
  4. Read the IFS configuration file (e.g., $QNX_DEPLOYMENT_WORKSPACE/infra/boards/rcarh3spre/ifs/rcarh3spre-ifs.cfg) and use the listed build file or files to to generate the IFS or IFSs.
  5. Read the profile files specified in the image configuration files (see Profiles in the Modifying Content chapter) to get the filesets which specify the files to include in the image.
  6. Scan the paths listed in the [infra] section of the searchpaths.cfg configuration file to find the specified filesets (see Filesets in the Modifying Content chapter).
  7. Use the filesets to generate filesystem build files (*fs.build), which list the files to be included in the partition images (see the Configuring Partitions and Images chapter).
  8. Generate the partition (or, for some products, partitions) according to the configurations in the filesystem build files (see Build files in the Configuring Partitions and Images chapter).

    The script generates the following image types: fatfsimg and qnx6fsimg. For information about image types, see mkxfs in the Utilities Reference.

  9. Assemble the partitions into a single image, as specified by the information in the board-mksysimage.cfg configuration file.
Note:

Typically, you will make most of your changes to filesets, because filesets define what files (such as apps) get included in your image, so you won't need to know all the details about what mksysimage.py does when it generates and assembles an image.

For more information about the mksysimage.py script, see mksysimage.py in the Utility Scripts chapter.