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