Skip to content

Commit

Permalink
UefiPayloadPkg: strip unused packages
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Żygowski <[email protected]>
  • Loading branch information
miczyg1 committed Oct 26, 2020
1 parent 0319bae commit b018c14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 58 deletions.
38 changes: 7 additions & 31 deletions UefiPayloadPkg/UefiPayloadPkg.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ APRIORI DXE {
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
INF UefiPayloadPkg/SPI/SPI.inf

!if $(SECURE_BOOT_ENABLE) == TRUE
INF UefiPayloadPkg/SPI/SPI.inf
!endif
# Init Test Driver before Secure Boot
# INF UefiPayloadPkg/TestDriverDxe/TestDriver.inf
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
Expand Down Expand Up @@ -123,7 +125,10 @@ INF UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf

INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
INF MdeModulePkg/Logo/LogoDxe.inf
INF UefiPayloadPkg/SPI/SPI.inf

!if $(SECURE_BOOT_ENABLE) == TRUE
INF UefiPayloadPkg/SPI/SPI.inf
!endif

#
# PCI Support
Expand Down Expand Up @@ -167,36 +172,12 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

INF FatPkg/EnhancedFatDxe/Fat.inf

#
# Filesystem drivers
#
!if $(ARCH) == IA32
INF RuleOverride=BINARY USE = IA32 FSDrivers/exfat.inf
INF RuleOverride=BINARY USE = IA32 FSDrivers/ext2.inf
INF RuleOverride=BINARY USE = IA32 FSDrivers/ntfs.inf
INF RuleOverride=BINARY USE = IA32 FSDrivers/ext4.inf
!else
INF RuleOverride=BINARY USE = X64 FSDrivers/exfat.inf
INF RuleOverride=BINARY USE = X64 FSDrivers/ext2.inf
INF RuleOverride=BINARY USE = X64 FSDrivers/ntfs.inf
INF RuleOverride=BINARY USE = X64 FSDrivers/ext4.inf
!endif

#
# SD/eMMC Support
#
INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf

#
# Usb Support
#
INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf

#
Expand Down Expand Up @@ -245,11 +226,6 @@ INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
}
!endif

#
# Random Number Generator
#
INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf

#
# Security
#
Expand Down
30 changes: 3 additions & 27 deletions UefiPayloadPkg/UefiPayloadPkgIa32.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@
!endif
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf

[LibraryClasses.common.DXE_DRIVER]
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
Expand All @@ -308,7 +307,6 @@
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf

[LibraryClasses.common.DXE_RUNTIME_DRIVER]
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
Expand Down Expand Up @@ -435,7 +433,9 @@
################################################################################
[Components.IA32]

!if $(SECURE_BOOT_ENABLE) == TRUE
UefiPayloadPkg/SPI/SPI.inf
!endif
#
# SEC Core
#
Expand Down Expand Up @@ -497,7 +497,7 @@
}
!if $(SECURE_BOOT_ENABLE) == TRUE
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.inf
UefiPayloadPkg/SecureBootEnrollDefaultKeys/SecureBootSetup.inf
!endif

UefiCpuPkg/CpuDxe/CpuDxe.inf
Expand Down Expand Up @@ -573,25 +573,15 @@
MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

#
# SD/eMMC Support
#
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf

#
# Usb Support
#
MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf

#
Expand All @@ -603,12 +593,6 @@
MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
!endif

#
# SMBUS Support
#
UefiPayloadPkg/SmbusDxe/SMBusi801Dxe.inf
UefiPayloadPkg/SmbusConfigLoaderDxe/SMBusConfigLoader.inf

#
# Console Support
#
Expand All @@ -633,14 +617,6 @@
}
!endif

#
# Random Number Generator
#
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
<LibraryClasses>
RngLib|UefiPayloadPkg/Library/BaseRngLib/BaseRngLib.inf
}

!if $(TPM_ENABLE) == TRUE
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {
<LibraryClasses>
Expand Down

0 comments on commit b018c14

Please sign in to comment.