10 Post-Build ImageGen Stage - FLASH
This chapter describes the processing of the EFI files generated by the $(MAKE) Stage into FLASH binary images. Some of the PCDs defined or used in conditional directives in the FDF are set in the platform's DSC file. The tools must make at least one pass over the DSC file to get PCD values for conditional directives and other PCD entries used in the FDF file. If a FeatureFlag or FixedAtBuild PCD value, used in a conditional directive, cannot be determined the build must break.
For the remainder of this chapter, the WORKSPACE and $(WORKSPACE) refer to the ordered list of directories specified by the combination of WORKSPACE + PACKAGES_PATH.

10.0.1 ImageGen File Extensions

Table 19 and Table 20 describe intermediate file extensions and final file extensions in the ImageGen stage of the build for a platform. The ImageGen stage takes the output of the $(MAKE) stage (typically the .efi files) and converts the files into EFI section files using the GenSec tool. The next step combines the section files into FFS files using the GenFfs tool. Once the Ffs files have been generated, they are combined into an FV image file using the GenFv tool. FV image files are combined into FD image files by the GenFds tool (which also controls all of the other steps in this stage).
Binary files listed in the FDF file's [FD] region section are included without processing. This allows for the addition of VPD data files (generated during the AutoGen Stage) to be included in the FD output file.

Table 19 GenFds Image Generation: Intermediate File Extensions

Input Extension
Output Extension
.pe32, .ui, .ver
.tmp, .sec
.acpi, .aml, .bin, .bmp
SAME as Input
.com, .dpx, .guided, .pe32, .ui, .ver
FFS file images
Firmware Volume Image files
Microcode Binary File generated from the Microcode text files
VPD binary image file (created by VPD_TOOL) where the file name is the GUID of the VPD tool.

Table 20 ImageGen Final Output File Extensions

Input Extensions
Output Extension
.fv, .mcb
Firmware Device Images
.efi, .pe32
UEFI PCI Option ROM Images
For UEFI compliant PCI Option ROMs, the EfiRom tool is used to process .efi or .pe32 files into the .rom file.
For UEFI applications, the .efi file generated at the end of the $(MAKE) stage can be used directly, or, if the application will be included as part of a flash device image (all of the shell applications) the .efi file is processed using the standard steps for including a driver in an image.
Last modified 1yr ago