]> git.proxmox.com Git - mirror_edk2.git/blame - FmpDevicePkg/FmpDevicePkg.dsc
FmpDevicePkg/Test: Add FmpDependencyLib unit test
[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
9# Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>\r
a93bf06b 10# Copyright (c) 2018 - 2020, 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
262b7a31
KM
41[LibraryClasses]\r
42 UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
262b7a31
KM
43 UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
44 UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
45 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
262b7a31
KM
46 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
47 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
262b7a31
KM
48 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
49 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
262b7a31
KM
50 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
51 DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
52 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
262b7a31 53 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
8bc648fe
MK
54!ifdef CONTINUOUS_INTEGRATION\r
55 BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
56!else\r
262b7a31 57 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
8bc648fe 58 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
262b7a31 59 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
8bc648fe 60!endif\r
262b7a31 61 FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf\r
262b7a31
KM
62 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
63 FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
64 FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
a93bf06b 65 FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf\r
4ff8b6b1 66 TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
262b7a31
KM
67\r
68[LibraryClasses.ARM, LibraryClasses.AARCH64]\r
69 #\r
70 # It is not possible to prevent the ARM compiler for generic intrinsic functions.\r
95d28836 71 # This library provides the intrinsic functions generate by a given compiler.\r
262b7a31
KM
72 # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this library\r
73 # into all ARM and AARCH64 images.\r
74 #\r
75 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf\r
76\r
77 # Add support for stack protector\r
78 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf\r
79\r
80[LibraryClasses.ARM]\r
81 ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf\r
82\r
278c3d48
EJ
83[PcdsPatchableInModule]\r
84 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{0}\r
85\r
262b7a31
KM
86[Components]\r
87 #\r
88 # Libraries\r
89 #\r
90 FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
c40f7cc7 91 FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf\r
262b7a31
KM
92 FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
93 FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
a93bf06b 94 FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf\r
262b7a31
KM
95 FmpDevicePkg/FmpDxe/FmpDxeLib.inf\r
96\r
97 #\r
98 # Modules\r
99 #\r
c40f7cc7
EJ
100 FmpDevicePkg/CapsuleUpdatePolicyDxe/CapsuleUpdatePolicyDxe.inf {\r
101 <LibraryClasses>\r
102 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
103 }\r
262b7a31
KM
104 FmpDevicePkg/FmpDxe/FmpDxe.inf {\r
105 <Defines>\r
106 #\r
ee48361c 107 # FILE_GUID is used as ESRT GUID\r
262b7a31 108 #\r
ee48361c 109 FILE_GUID = $(SYSTEM_FMP_ESRT_GUID)\r
278c3d48
EJ
110 <PcdsFixedAtBuild>\r
111 #\r
112 # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
113 #\r
114 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
115 #\r
116 # Certificates used to authenticate capsule update image\r
117 #\r
118 !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc\r
119 <PcdsPatchableInModule>\r
120 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(SYSTEM_FMP_ESRT_GUID)")}\r
c40f7cc7
EJ
121 <LibraryClasses>\r
122 #\r
123 # Use CapsuleUpdatePolicyLib that calls the Capsule Update Policy Protocol.\r
124 # Depends on the CapsuleUpdatePolicyDxe module to produce the protocol.\r
125 # Required for FmpDxe modules that are intended to be platform independent.\r
126 #\r
127 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf\r
262b7a31
KM
128 }\r
129\r
130 FmpDevicePkg/FmpDxe/FmpDxe.inf {\r
131 <Defines>\r
132 #\r
133 # FILE_GUID is used as ESRT GUID\r
134 #\r
ee48361c 135 FILE_GUID = $(DEVICE_FMP_ESRT_GUID)\r
11d35494
EJ
136 <PcdsFeatureFlag>\r
137 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable|$(DEVICE_FMP_STORAGE_ACCESS_ENABLE)\r
278c3d48 138 <PcdsFixedAtBuild>\r
11d35494
EJ
139!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == FALSE\r
140 #\r
141 # Disable test key detection\r
142 #\r
143 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}\r
144!endif\r
278c3d48
EJ
145 #\r
146 # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
147 #\r
11d35494 148!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == TRUE\r
278c3d48 149 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
11d35494
EJ
150!else\r
151 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device No Storage Access"\r
152!endif\r
278c3d48
EJ
153 #\r
154 # Certificates used to authenticate capsule update image\r
155 #\r
156 !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc\r
157 <PcdsPatchableInModule>\r
158 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(DEVICE_FMP_ESRT_GUID)")}\r
c40f7cc7
EJ
159 <LibraryClasses>\r
160 #\r
161 # Directly use a platform specific CapsuleUpdatePolicyLib instance.\r
162 # Only works for FmpDxe modules that are build from sources and included\r
163 # in a system firmware image.\r
164 #\r
165 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
262b7a31 166 }\r
4da45e20 167\r
ff306cfd
WX
168 #\r
169 # Add UEFI Target Based Unit Tests\r
170 #\r
171 FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/FmpDependencyLibUnitTestsUefi.inf\r
172\r
4da45e20
SZ
173[BuildOptions]\r
174 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES\r