Several scripts and utilities are used by mksysimage.sh (Linux) or mksysimage.bat (Windows) to build an Apps and Media image.
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:
$QNX_DEPLOYMENT_WORKSPACE/infra/utils/scripts/mksysimage.py
where QNX_DEPLOYMENT_WORKSPACE is the location where you copied:
base_dir/product_deployment/QSAM/1.1/deployment
By default, mksysimage.py reads a platform-specific configuration file (platform.variant/mksysimage/platform-mksysimage.cfg) from the following directory:
QNX_DEPLOYMENT_WORKSPACE/infra/product/AnM/boards/
Configuration files specify image variants for each platform; they specify which tar (.tar) files and images are generated. These tar files are intermediate containers used in the image generation process. For information, see "Image configuration settings" and "Filesets and profiles."
For all platforms, mksysimage.py generates a tar file and an image:
For ARM platforms only, mksysimage.py also generates a second tar file:
The generated image includes the tar files mentioned above. Linux and Windows hosts can't read the final image, so the tar files allow you to see what will be included in an image.
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.
The gen-osversion.py utility script generates the /etc/os.version file based on the specified build environment. For more information about this utility, see gen-osversion.py in the System Services Reference.
The gen-ifs.py utility script consolidates various .build file segments into a single buildfile before calling the mkifs utility to create the .ifs file(s) that will be 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.py in the System Services Reference.
The mktar.py utility creates a tar file containing the files, directories, symbolic links, and their permissions as specified in the filesets. These tar files contain the QNX Apps and Media files for the specified platform variant and are used to generate the QNX Power-Safe and FAT32 filesystems included in the QNX Apps and Media target image.
As input, the mktar.py utility uses the dos-variant.xml and os.xml files; otherwise, it uses the default profile.xml file. These files specify which filesets to include, and for os.xml, the .bar files to pre-install.
The mkimage.py utility script calls the mkimage utility, and builds an image called partition_name.image from each partition. The Python script mkimage.py uses a configuration file (platform-variant.cfg) to define session variants, partitions, and image size:
The mkimage.py utility script processes and parses the command line, places the bootable image file(s) first in the resulting output file, followed by embedded filesystem files, and any other files that were on the command line.
The mkimage.py script uses mkxfs to create the image files (.image files) for each partition specified in the mkimage configuration file. The diskimage utility creates the final image that combines all the partition image files (partition_name.image) into a single image.
The mkflashimage script is included in BSPs for the i.MX6x SABRE Smart Devices and OMAP5 platforms. It is used to generate IPLs for these targets.