Understanding search paths

To find the files needed to build an image, mksysimage searches a specific set of paths.

Search paths are a simple method for specifying which files get included in an image when it is built. When mksysimage.sh or mksysimage.bat calls mksysimage.py, this Python script uses mktar.py and gen-ifs.py to build an image, these scripts examine the search paths in sequence and use the first instance found of the file they need.

For example, if gen-ifs.py needs foo.bin to build an image and there are two copies of this file:




assuming that these search paths are in the order above, mksysimage.py will use the file in:


because this search path is first in the list.

Search paths for QNX Apps and Media start from the most specific (product and board) and work down to the most general (the QNX Neutrino OS). If a file foo.bin is available for both a specific product and board but also the OS, mksysimage.py will use the product and board version of the file (because it is in a search path listed earlier).

Thus, when customizing your target image, you can add files to paths at the top of the list to replace files found in paths listed later.

Organization of search paths

For QNX Apps and Media, search paths are generally organized as follows:

  1. product-specific files
    1. board-specific files
      1. cpu_dir
    2. non-board-specific files
      1. cpu_dir
  2. non-product-specific files
    1. board-specific files
      1. cpu_dir
    2. non-board-specific files
      1. cpu_dir
    3. cpu_dir
  3. deployment files and SDP-specific files (those located in qnx660/target/qnx6)
    1. CPU-specific

Example search path list

Below is an example list of search paths. Note that the QNX_TARGET enviroment variable is set to base_dir/target, and that the paths for the OS and Qt are last in the list, so the build will use files in these paths only if no file of the same name has been found in the more specific paths.


To see all the paths used for the files that mksysimage.py uses, specify a verbosity greater than six. For example, use -vvvvvvv, and the output will display the search paths used by gen-ifs.py and mktar.py.

Note: The mktar.py and gen-ifs.py scripts will not display a search path if it doesn't exist. In otherwords, they don't issue any kind of "Missing search path!" error.