Including files in the image

Updated: April 19, 2023

When it looks for files to include in the OS image it is building, mkifs resolves the file paths specified in the build file by searching host paths in a preferred order. This order is based on whether these specified paths are absolute or relative, the search attribute setting, and the MKIFS_PATH environment variable setting.

mkifs search paths

The process used by mkifs to resolve a file path in the buildfile is as follows:
  • If the path is absolute, mkifs looks for the file at that exact host location; if it's not found, an error is indicated.
  • If the path is relative and can be resolved relative to the current working directory (CWD), mkifs includes the resulting file in the image.
  • If a relative path can't be resolved in the CWD, mkifs looks for the file in each directory defined by the search attribute. You can define your own search path order within this attribute. If you don't specify this attribute, mkifs uses the ${MKIFS_PATH} value as the default setting. If the specified file isn't found in any of these search paths on the host, an error is indicated.

For details on the required path syntax to indicate an absolute versus a relative path, see the buildfile path description in the mkifs reference. For information on how MKIFS_PATH is defined and how it affects the search attribute, see the MKIFS_PATH description in the same reference.

Details on overriding the default search paths are given in the next topic.