10.1 Overview of Flash Device Layout

The GenFds tool is typically called after a platform build's $(MAKE) Stage completes. The build.exe command will call GenFds. The GenFds program can also be executed by the developer from the command line.

In order to execute from the command-line, the tool needs to have its environment setup. The following is an example of executing GenFds as a stand-alone command.

GenFds -f $(WORKSPACE)\Nt32Pkg\Nt32Pkg.fdf \
  -o $(WORKSPACE)\Build\NT32\DEBUG_MYTOOLS -t MYTOOLS -b DEBUG -v \
  -p $(WORKSPACE)\Nt32Pkg\Nt32Pkg.dsc -a IA32

GenFds

calls several other tools during the generation of an FD image:

GenSec

This application is used to generate valid EFI_SECTION type files from PE32/PE32+/ COFF image files or other binary files. The utility will attach a valid section or PEIM header to the input file as defined in the PI specification.

GenFfs

This application is used to generate FFS files for inclusion in a firmware volume. Rules specified in the FDF file stipulate how the FFS file will be organized (what kind of sections should reside in it and in what format).

GenFv

This application is used to generate FV image by taking what and how to place FFS into it from the corresponding FV.inf file.

GenFw

This application is used to generate UEFI Firmware Image files based on Component or Module types listed in the INF files from the PE/PE32+/COFF images generated by the third party tool chains.

GenVtf

This application generates the Boot Strap File (AKA Volume Top File, or VTF) for IA32 X64, and IPF images.

Figure 22 shows how the above tools involved in the GenFds process.

Figure 22 FD Image Generation Process