Build Step: Create Image (Compact 7)
3/12/2014
The step that creates the OS image reads configuration files from the flat release directory and combines modules into a single image file. It calls several different tools to accomplish this task, as explained in more detail in Make Binary Image Tool (Makeimg.exe). Although makeimg 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 they will be placed 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 follow simple IF logic, and 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 will be 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 may instruct makeimg to name files in the image differently than their original names in the flat release directory, as 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 may contain fix-up variables - data substitutions that occur at makeimg time and 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.