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