4.4 Creating Binary EFI Images - $(MAKE) stage
Binary EFI images are created in two steps; the first step uses 3rd party
assemblers, compilers and linkers to generate a PE32/PE32+/COFF image file,
while the second step uses code from the GenFw application provided in EDK II
to modify the PE32/PE32+/COFF image file to create an EFI file with an
EFI_IMAGE_SECTION_HEADER
structure. Since different EFI_SECTION
types may
require different values for alignment offsets, the GenFw tool must specify the
component type, which is derived from the INF metadata's ModuleType statement.
This stage is executed by the build tool calling either the NMAKE
or the MAKE
tool for each module. The Makefiles (Makefile
or GNUMakefile
) are created
during the metadata processing stage. The Makefiles specify the compiler,
linker, assembler, and GenFw
tool commands and options. Once all modules have
been built by the 3rd party tools, the build tool will call the GenFds
application to initiate the third stage of a build, if there is a Flash
Definition File (FDF) specified in the DSC file. If no FDF file is specified,
then the build will terminate with the creation of individual module EFI
formatted (EFI) images.