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