IFS files

Image Filesystems (IFS) files are created by mkifs. An IFS file contains a bootable OS image. In a QNX Apps and Media system, the gen-ifs.py utility generates a build file and then provides it as input to mkifs to build an IFS.

Standard QNX BSPs are built by mkifs, which reads the build information from a single, large build (.build) file. The complexity of the QNX SDK for Apps and Media makes this approach to building an IFS difficult to implement: the same build process must support many different products and platforms.

To make these complex builds easier to manage and configure, QNX Apps and Media uses many small build files, with each file configuring a specific part of the build. These small build files can be re-used and combined for different products and platforms.

IFS directories

In the directory structure defined for generating images, there are five locations where you'll find IFS directories.

Figure 1. The ifs directories in a product image

The preceeding illustration shows the location inside $QNX_DEPLOYMENT_WORKSPACE of various IFS directories related to the generation of IFS files. Instances 1 to 4 in the "Configuration files" part of the diagram are the directories with the input .build files, as follows:

  1. product-specific but non-board-specific files
  2. product-specific and board-specific files
  3. non-board-specific and non-product-specific files
  4. board-specific but non-product-specific files

Instance 5 in the "Candidate content" part of the diagram is the ifs directory where the image generation scripts put the final generated IFS image.

Modifying the IFS for a specific board

To modify the IFS for a specific board, do the following:

  1. Modify this IFS config file:
    • $QNX_DEPLOYMENT_WORKSPACE/infra/product/AnM/boards/platform/ifs/
  2. Modify the appropriate buildfiles, which are located in these directories:
    • $QNX_DEPLOYMENT_WORKSPACE/infra/boards/platform/ifs/
    • $QNX_DEPLOYMENT_WORKSPACE/infra/product/AnM/boards/platform/ifs/

Adding an IFS

If you need to add a new IFS to the build, you can edit the IFS configuration file: platform-ifs.cfg, which is located at:

$QNX_DEPLOYMENT_WORKSPACE/infra/product/AnM/boards/platform/ifs/

In this configuration file, you can add a new IFS, change the order of the buildfile, and add a new buildfile to the IFS.

For example, the configuration file for OMAP5 (omap5uevm-ifs.cfg) contains the following default buildfiles:

[omap5-sd.ifs]
omap5-base.build
omap5-start-i2c.build
omap5-start-disk-sd.build
screen-omap5uevm-diskLibs.build
omap5-apps-and-media.build
apps-and-media.build
omap5-start-audio.build
screen-common-diskLibs.build
omap5uevm.build
generic.build
script.build

To add a new IFS:

  1. Create a new [variant.ifs] section in the configuration file.
  2. Add this section to the fileset file as well.
  3. Run mksysimage to regenerate the image. This script calls other scripts to combine the buildfiles listed in the ifs section (in the order that they are listed), create the .image files for the partitions on the target, and combine these image files to create the target image as a single .img file.

IFS for x86 platforms

The /.boot/ directory contains the generated IFS files.

The current boot support is for x86 PC partition-table-based (the same base system as current booting) with a BIOS that supports INT13X (LBA). Files placed into the .boot directory are assumed to be boot images created with mkifs. The name of the file should describe the boot image.

For more information, see the BSP User Guide for your platform.

Target startup scripts

Buildfiles let you incorporate scripts to be run on your target. The[+script] attribute in the buildfile tells mkifs that the specified file is a script file, which is a sequence of commands that you want procnto to execute when it's completed its own startup. Script files look like regular shell scripts, except that:

To run a command, its executable must be available when the script is executed. You can add the executable to the image or get it from a filesystem that's started before the executable is required. The latter approach results in a smaller image.

For more information about script files, see "The script file" in the Building Embedded Systems User's Guide and mkifs in the Utilities Reference.