Process to Generate an Image

The process for generating a target image for the QNX CAR platform is described below.

Overall image generation process

The following illustration shows the process used to generate a QNX CAR platform target image:

Figure 1. Image generation process for the QNX CAR platform

mksysimage.py

The first utility to run in the image-generation process is the mksysimage.py utility script. This Python script invokes other utilities to generate tar files and images for each platform. The script is located at:

where %QNX_CAR_DEPLOYMENT% is <install_location>/qnx660/deployment/qnx-car.

By default, mksysimage.py reads a platform-specific configuration file from:

where QNX_TARGET is <install_location>/qnx660/deployment.

The configuration files for the supported platforms are:

For detailed information about changing the values in a config file for mksysimage.py, see "Configuration file for mksysimage.py".

These configuration files define which tar files and images are generated. The image variants for each platform are defined within this configuration file. By default, for each image variant, mksysimage.py generates two tar files and one image:

Filename Description
<platform>-os.tar This tar file contains two QNX CAR2 filesystems that include all files except MLO and IFS files.
<platform>-dos-<image_variant>.tar This tar file contains a FAT16 filesystem that includes all bootup files, such as MLO and IFS files.

The generated image includes the two tar files indicated above. You can change the default configuration file, or specify your own by using the -c option in mksysimage.py to customize your tar files and images. For more information about this utility, see mksysimage.py in the System Services Reference. To see an example of the basic directory structure of an image generated for this release of the QNX CAR platform, see "Sample image directory structure".

gen-osversion

The gen-osversion utility generates the /etc/os.version file based on the specified build environments. For more information about this utility, see gen-osversion in the System Services Reference.

gen-ifs

The gen-ifs utility calls the mkifs utility to create the .ifs file(s) that are included in the final target image. An IFS is a bootable image filesystem that contains the procnto module, your boot script, and possibly other components such as drivers and shared objects. For more information about this utility, see gen-ifs in the System Services Reference.

mktar

The mktar utility creates a tar file containing the filesystem for a specified variant. The result from running this utility is a file called platform.tar that contains the QNX CAR filesystem for the specified platform variant. This resulting file will be included in the QNX CAR2 image. In order to run, the mktar utility will require binary content from the installed QNX CAR2 SDP. As input, the mktar utility uses the dos-varian.xml and os.xml files; otherwise, it uses the default profile.xml file.

mkimage.py

The mkimage utility builds an image from each partition called <partition_name>.image. The QNX CAR-specific Python script mkimage.py uses a configuration file (<platform>-<variant>.cfg) to define session variants, partitions, and image size:

Final image

The final step in the image-generation process for mksysimage.py is the creation of the OS image (.img) for the platform. The resulting tar file will also be located in the same output directory as the image.