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