Build Step: Create Image (Compact 2013)

3/26/2014

This step creates the Windows Embedded Compact 2013 OS image, reads configuration files from the flat release directory, and combines modules into a single image file. To accomplish this task, it calls several different tools. Although makeimg.exe, the tool that creates the run-time image, uses a number of configuration file types, two are of critical importance: .bib files and .reg files.

The .bib files contain instructions for makeimg about which modules to include and where to place them in the image. These files can have Cesysgen conditionals, just like the dirs files in %_WINCEROOT%\Platform\Common and %_WINCEROOT%\Platform\$(_TGTPLAT). The cefilter.exe tool parses these conditionals and uses them to eliminate unneeded modules. The .bib files also can have BSP and IMG conditionals, which makeimg parses. These conditionals, which follow simple IF logic, are useful for quickly removing or including a module or file in the image.

The FILES section of the .bib file lists all of the files that are included in the image. The MODULES section of the .bib file lists all of the code binaries that are included in the image. Each of these listings can include flags that describe various properties of the file, such as whether it is a system file or whether it is compressible. The .bib files also might instruct makeimg to give files in the image different names than their original names in the flat release directory. This is shown in the following example from (%_WINCEROOT%\Public\Common\Oak\Files\Common.bib):

locale.dll     $(_FLATRELEASEDIR)\Nlslocale.dll            NK  SHQ

In this example, Nlslocale.dll in the flat release directory will be included in the image as locale.dll, a system file (denoted by the S flag) that is hidden (denoted by the H flag) and is available both in user mode and kernel mode (denoted by the Q flag).

Finally, .bib files might contain fix-up variables – data substitutions that occur when makeimg is run and that enable quick adjustment of important startup variables.

The .reg files define the starting registry for the image. Like .bib files, they can have Cesysgen conditionals, which are parsed by cefilter.exe, and BSP or IMG conditionals, which are parsed by makeimg.

Each _DEPTREE and platform has its own .bib and .reg files in its \Files directory. Cefilter filters the SYSGEN tags out of these files, and the resulting file is copied to the following intermediate directories:

  • $(SG_OUTPUT_ROOT)\Oak\Files – for _DEPTREEs
  • $(SG_OUTPUT_ROOT)\Platform\$(_TGTPLAT)\Files – for %_WINCEROOT%\Platform\$(_TGTPLAT)

Makeimg concatenates all of the .bib and .reg files in the flat release directory into ce.bib and reginit.ini, respectively. These two files describe the final image in its entirety.

When the makeimg step is complete, an image is produced in the flat release directory that can be downloaded to the device and run. This completes the build process.

See Also

Concepts

Build from the Top Down