Create a tar file containing a filesystem for a specified board variant


 mktar  [-o output] [options] ... [board_name_argument]

Runs on:

QNX Neutrino


Include new-style (BAR) applications (implies --no-defaults)
Use the given compression method: auto (default), none, gzip, or bzip2.
Set the system architecture (e.g., \"armle-v7\").
-f, --fileset
Include the specified fileset.
Display a help message showing mktar usage information.
Don't include the board's default filesets/applications.
-o output
Write to the specified output file.
-p, --package
Include the given package (implies --no-defaults).
Prefix each path with the given string.
Specify the profile xml file (default: \"profile.xml\").
-s, --symbols
Search in the runtime-symbols/ folder for the unstripped binaries.
-v, --verbose
Increase verbosity.
Compress with gzip.

If you specify both the -p and -m options, any intermediate directories you have created have mode u+wx.


The mktar utility creates a tar file containing the filesets listed in the board-specific profile, resulting in proper ownership and permissions. Don't use mktar on its own to create a tar file. Instead, use the Python script, with the --no-mkimage option to create .tar files and no image.

Note: If you use mktar without specifying the profile option --profile, then by default, the mktar utility will use the file profile.xml located in /boards/board.external.

The mktar utility creates a tar file containing the filesystem for a specified variant, typically used by to include in the resulting image that's generated. It currently requires binary content from your installed software as well as source and deployment files.

Before you can use this utility, you must have the following prerequisites:

The mktar uses Python's tarfile module to generate a tar file with the appropriate permissions. The list of included files is determined by a board profile, which is stored as profile.xml in the board directory (e.g., %QNX_CAR_DEPLOYMENT%/boards/omap5uevm.car2/profile.xml). For more information and for details about dependencies, see the file located at %QNX_TARGET%/pymodules/qnxcar/

You can overwrite the default profile by using the --profile option.

The mktar utility with the -vvv option will show the search path used to find files. The typical search path (implemented in deployment/pymodules/qnxcar/ is as follows:

Overriding files to create custom mktar images

The mktar utility will search the search paths identified above to find all files defined in a particular board's profile.xml file. To include a new version of any file (e.g., a driver, configuration file, etc.), you would copy the file into the appropriate search path, and then rerun mktar.

To choose the appropriate search path, you need to determine the following:

Note: If you're attempting to update, for example, %QNX_CAR_DEPLOYMENT%/armle-v7/usr/bin/devi-hid, but the same file is currently overridden for the board you're interested in (e.g. %QNX_CAR_DEPLOYMENT%/boards/target_name /armle-v7/usr/bin/devi-hid), you'd have to remove the overridden file for your new copy in %QNX_CAR_DEPLOYMENT%/armle-v7/usr/bin/devi-hid to be picked up. This is because the utility searches the paths in a certain order for any given file defined in profile.xml.


To create a tar file for OMAP5432:

%QNX_TARGET%/scripts/mktar -o omap5uevm_external.tar 

This command creates a file named omap5uevm_external.tar that contains the QNX CAR filesystem for the OMAP5432 board.

To create a tar file for SABRE Lite:

%QNX_TARGET%/scripts/mktar -o imx61sabre_external.tar

This command creates a file named imx61sabre_external.tar that contains the QNX CAR filesystem for SABRE Lite. To list all available platform.variant pairs, you can run:

ls -d %QNX_CAR_DEPLOYMENT%/boards/*.* 

The output is compressed if the filename in the mktar command ends with .gz or .bz2. The utility can also be used without a board configuration, by manually specifying filesets (and a CPU type if applicable). You can also add extra filesets to a board's default configuration.

Exit status:

A tar file was generated successfully.
An error occurred.