30.4 Adding a UEFI Driver to DSC File

The list of UEFI Drivers that need to be built must be added to the [Components] section of a DSC file. Once a UEFI Driver has been added to the [Components] section, an attempt is made to build the UEFI Driver every time the EDK II build tool called build.exe is invoked with the appropriate parameters.

This example shows the same example DSC file MyDriverPkg/MyDriverPkg.dsc, except it has now been updated to list MyDriverPkg/MyDriver/MyDriver.inf in the [Components] section.

Example 263-EDK II Package DSC File

[Defines]
PLATFORM_NAME = MyDriverPkg
PLATFORM_GUID = 7C297DD4-65D9-4dfe-B609-94330E607888
PLATFORM_VERSION = 0.10
DSC_SPECIFICATION = 0x00010005
OUTPUT_DIRECTORY = Build/MyDriverPkg
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
[LibraryClasses]
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
PostCodeLib|MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
[Components]
MyDriverPkg/MyDriver/MyDriver.inf