Combining multiple image files

Combining the IPL, an OS image (IFS) created by mkifs and a flash filesystem image created with mkefs can be useful or even required.

In particular:

Figure 1. The IPL, OS image and flash filesystem combined into a single image. Note the padding used to align the different image components. with the block sizes required by the board.

When you build an OS filesystem with mkifs, you can specify whether executables will be copied to RAM and execute there, or execute in place (XIP), usually in flash storage (see “Notes on XIP versus copy”, in the Utilities Reference mkifs entry).

XIP saves a bit of RAM by avoiding the copying of the code and/or data segment of an object from one RAM location to another.

Assuming that your board can support this configuration, you may decide to run some executables as XIP, and others from RAM

Combining the images

To enable configurations like the one above (XIP, and run in RAM), create two, separate images, then combine them. You can use the diskimage utility to create a single, combined image for a partitioned medium, such as a hard drive, SD card, or MMC on your host, then transfer the image to your target (see diskimage utility and diskimage configuration file in the Utilities Reference, and your BSP User's Guide).

The boot image filesystem will be run from RAM to improve performance, and the XIP image filesystem will be run from flash to conserve RAM.

  • Each section of your combined image (IPL, IFS (XIP), EFS (run in RAM) must begin at a memory page boundary (typically 4 KB; see the diagram above).
  • The IPL code will hand execution to the startup code and OS in the first image.

Instead of using diskimage, you can use a hardware flash or EPROM programmer to burn the separate images with appropriate alignment, or other utilities, such as:


QNX recommends that you use diskimage to combine images.

For another approach to mounting a secondary image filesystem, see the Reloadable Image Filesystems technote.

Restrictions to using XIP

The following restrictions apply to XIP image filesystems: