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