]> git.proxmox.com Git - mirror_edk2.git/blame - FmpDevicePkg/FmpDevicePkg.dsc
FmpDevicePkg: Consume MdeLibs.dsc.inc for RegisterFilterLib
[mirror_edk2.git] / FmpDevicePkg / FmpDevicePkg.dsc
CommitLineData
262b7a31
KM
1## @file\r
2# Firmware Management Protocol Device Package\r
3#\r
4# This package provides an implementation of a Firmware Management Protocol\r
5# instance that supports the update of firmware storage devices using UEFI\r
6# Capsules. The behavior of the Firmware Management Protocol instance is\r
7# customized using libraries and PCDs.\r
8#\r
92e9c44f 9# Copyright (c) Microsoft Corporation.<BR>\r
8e03191d 10# Copyright (c) 2018 - 2021, Intel Corporation. All rights reserved.<BR>\r
9817d442 11# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
262b7a31 12#\r
bcef758c 13# SPDX-License-Identifier: BSD-2-Clause-Patent\r
262b7a31
KM
14#\r
15##\r
16\r
17[Defines]\r
18 PLATFORM_NAME = FmpDevicePkg\r
19 PLATFORM_GUID = 0af3d540-27c6-11e8-828b-f8597177a00a\r
20 PLATFORM_VERSION = 0.1\r
21 DSC_SPECIFICATION = 0x00010005\r
22 OUTPUT_DIRECTORY = Build/FmpDevicePkg\r
9817d442 23 SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64|RISCV64\r
e23366d3 24 BUILD_TARGETS = DEBUG|RELEASE|NOOPT\r
262b7a31
KM
25 SKUID_IDENTIFIER = DEFAULT\r
26\r
27 #\r
28 # Define ESRT GUIDs for Firmware Management Protocol instances\r
29 #\r
ee48361c
SZ
30 DEFINE SYSTEM_FMP_ESRT_GUID = B461B3BD-E62A-4A71-841C-50BA4E500267\r
31 DEFINE DEVICE_FMP_ESRT_GUID = 226034C4-8B67-4536-8653-D6EE7CE5A316\r
262b7a31 32\r
11d35494
EJ
33 #\r
34 # TRUE - Build FmpDxe module for with storage access enabled\r
35 # FALSE - Build FmpDxe module for with storage access disabled\r
36 #\r
37 DEFINE DEVICE_FMP_STORAGE_ACCESS_ENABLE = TRUE\r
38\r
ff306cfd
WX
39!include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc\r
40\r
8e03191d
DB
41!include MdePkg/MdeLibs.dsc.inc\r
42\r
262b7a31
KM
43[LibraryClasses]\r
44 UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
262b7a31
KM
45 UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
46 UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
47 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
262b7a31
KM
48 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
49 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
262b7a31
KM
50 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
51 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
262b7a31
KM
52 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
53 DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
54 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
262b7a31 55 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
8bc648fe
MK
56!ifdef CONTINUOUS_INTEGRATION\r
57 BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
58!else\r
262b7a31 59 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
8bc648fe 60 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
262b7a31 61 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
92e9c44f 62 RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf\r
8bc648fe 63!endif\r
262b7a31 64 FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf\r
262b7a31
KM
65 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
66 FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
67 FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
a93bf06b 68 FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf\r
6c496642 69 FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf\r
ba86bb2c 70 FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf\r
4ff8b6b1 71 TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
262b7a31
KM
72\r
73[LibraryClasses.ARM, LibraryClasses.AARCH64]\r
74 #\r
75 # It is not possible to prevent the ARM compiler for generic intrinsic functions.\r
95d28836 76 # This library provides the intrinsic functions generate by a given compiler.\r
262b7a31
KM
77 # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this library\r
78 # into all ARM and AARCH64 images.\r
79 #\r
80 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf\r
81\r
82 # Add support for stack protector\r
83 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf\r
84\r
85[LibraryClasses.ARM]\r
86 ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf\r
87\r
278c3d48
EJ
88[PcdsPatchableInModule]\r
89 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{0}\r
90\r
262b7a31
KM
91[Components]\r
92 #\r
93 # Libraries\r
94 #\r
95 FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
c40f7cc7 96 FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf\r
262b7a31
KM
97 FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
98 FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
a93bf06b 99 FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf\r
6c496642
WX
100 FmpDevicePkg/Library/FmpDependencyCheckLib/FmpDependencyCheckLib.inf\r
101 FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf\r
ba86bb2c 102 FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf\r
262b7a31
KM
103 FmpDevicePkg/FmpDxe/FmpDxeLib.inf\r
104\r
105 #\r
106 # Modules\r
107 #\r
c40f7cc7
EJ
108 FmpDevicePkg/CapsuleUpdatePolicyDxe/CapsuleUpdatePolicyDxe.inf {\r
109 <LibraryClasses>\r
110 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
111 }\r
262b7a31
KM
112 FmpDevicePkg/FmpDxe/FmpDxe.inf {\r
113 <Defines>\r
114 #\r
ee48361c 115 # FILE_GUID is used as ESRT GUID\r
262b7a31 116 #\r
ee48361c 117 FILE_GUID = $(SYSTEM_FMP_ESRT_GUID)\r
278c3d48
EJ
118 <PcdsFixedAtBuild>\r
119 #\r
120 # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
121 #\r
122 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
123 #\r
124 # Certificates used to authenticate capsule update image\r
125 #\r
126 !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc\r
127 <PcdsPatchableInModule>\r
128 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(SYSTEM_FMP_ESRT_GUID)")}\r
c40f7cc7
EJ
129 <LibraryClasses>\r
130 #\r
131 # Use CapsuleUpdatePolicyLib that calls the Capsule Update Policy Protocol.\r
132 # Depends on the CapsuleUpdatePolicyDxe module to produce the protocol.\r
133 # Required for FmpDxe modules that are intended to be platform independent.\r
134 #\r
135 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf\r
262b7a31
KM
136 }\r
137\r
138 FmpDevicePkg/FmpDxe/FmpDxe.inf {\r
139 <Defines>\r
140 #\r
141 # FILE_GUID is used as ESRT GUID\r
142 #\r
ee48361c 143 FILE_GUID = $(DEVICE_FMP_ESRT_GUID)\r
11d35494
EJ
144 <PcdsFeatureFlag>\r
145 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable|$(DEVICE_FMP_STORAGE_ACCESS_ENABLE)\r
278c3d48 146 <PcdsFixedAtBuild>\r
11d35494
EJ
147!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == FALSE\r
148 #\r
149 # Disable test key detection\r
150 #\r
151 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}\r
152!endif\r
278c3d48
EJ
153 #\r
154 # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
155 #\r
11d35494 156!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == TRUE\r
278c3d48 157 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
11d35494
EJ
158!else\r
159 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device No Storage Access"\r
160!endif\r
278c3d48
EJ
161 #\r
162 # Certificates used to authenticate capsule update image\r
163 #\r
164 !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc\r
165 <PcdsPatchableInModule>\r
166 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(DEVICE_FMP_ESRT_GUID)")}\r
c40f7cc7
EJ
167 <LibraryClasses>\r
168 #\r
169 # Directly use a platform specific CapsuleUpdatePolicyLib instance.\r
170 # Only works for FmpDxe modules that are build from sources and included\r
171 # in a system firmware image.\r
172 #\r
173 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
262b7a31 174 }\r
4da45e20 175\r
ff306cfd
WX
176 #\r
177 # Add UEFI Target Based Unit Tests\r
178 #\r
179 FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/FmpDependencyLibUnitTestsUefi.inf\r
180\r
4da45e20
SZ
181[BuildOptions]\r
182 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES\r