8.6 Binary Modules
EDK II accommodates distribution of binary module code for inclusion into a firmware volume. This feature is used by vendors who have a proprietary code base, but need to provide their customers with the ability to use that code in a platform. Vendors may protect their IP by distributing only module code in either lib, bin, or efi format, without distributing debug files or sources.
No Makefile is generated for binary only modules.
A binary module must have a [Binaries]
section. It is recommended that binary
INF files not be listed in DSC file so that the build tools will not try to do
a module build for a binary module. The INF file of a binary module is always
put in FDF file for flash image generation. The binary files can also be
referenced directly in FDF. Please refer to Section 10 (Post-Build ImageGen
Stage - FLASH Images) for details.
Binary modules are used only with FDF files unless a PCD using PatchableInModule access method is used by the binary module and the platform developer wants to change the value for this PCD in the binary module.
The build command has an option flag, --ignore-sources
, that will treat all
INF files listed in the DSC file as though they were binary INF files. The
build will not generate any Makefiles, totally ignoring any files listed in a
[Sources]
section. If a module is specified in the DSC file that does not
contain a [Binaries] section, the build will provide an appropriate error
message and terminate. This mode allows distribution of binary modules with
source files that can be used during debugging.