]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDevicePkg.dsc
ArmPkg: only attempt buildin MmCommunicationDxe for AArch64
[mirror_edk2.git] / FmpDevicePkg / FmpDevicePkg.dsc
index 525640de2e1b180d7e09ec4ec9a6d1a7258f80a6..bdb73f28288f6cf27425d78d71c41bf2f70a487c 100644 (file)
@@ -7,26 +7,10 @@
 # customized using libraries and PCDs.\r
 #\r
 # Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>\r
-# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 #\r
-# Redistribution and use in source and binary forms, with or without\r
-# modification, are permitted provided that the following conditions are met:\r
-# 1. Redistributions of source code must retain the above copyright notice,\r
-# this list of conditions and the following disclaimer.\r
-# 2. Redistributions in binary form must reproduce the above copyright notice,\r
-# this list of conditions and the following disclaimer in the documentation\r
-# and/or other materials provided with the distribution.\r
-#\r
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r
-# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\r
-# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\r
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 ##\r
 \r
   PLATFORM_VERSION               = 0.1\r
   DSC_SPECIFICATION              = 0x00010005\r
   OUTPUT_DIRECTORY               = Build/FmpDevicePkg\r
-  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64\r
-  BUILD_TARGETS                  = DEBUG|RELEASE\r
+  SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64|RISCV64\r
+  BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT\r
   SKUID_IDENTIFIER               = DEFAULT\r
 \r
   #\r
   # Define ESRT GUIDs for Firmware Management Protocol instances\r
   #\r
-  DEFINE FMP_GRAPHICS_ESRT_GUID  = B461B3BD-E62A-4A71-841C-50BA4E500267\r
-  DEFINE FMP_TEXT_ESRT_GUID      = 226034C4-8B67-4536-8653-D6EE7CE5A316\r
+  DEFINE SYSTEM_FMP_ESRT_GUID   = B461B3BD-E62A-4A71-841C-50BA4E500267\r
+  DEFINE DEVICE_FMP_ESRT_GUID   = 226034C4-8B67-4536-8653-D6EE7CE5A316\r
+\r
+  #\r
+  # TRUE  - Build FmpDxe module for with storage access enabled\r
+  # FALSE - Build FmpDxe module for with storage access disabled\r
+  #\r
+  DEFINE DEVICE_FMP_STORAGE_ACCESS_ENABLE = TRUE\r
+\r
+!include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc\r
 \r
 [LibraryClasses]\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
-  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
-  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf\r
-  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf\r
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf\r
-  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf\r
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
   DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
-  PostCodeLib|MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf\r
-  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf\r
-\r
-  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf\r
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
-  UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf\r
-  DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf\r
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
+!ifdef CONTINUOUS_INTEGRATION\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf\r
+!else\r
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf\r
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
   FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf\r
-\r
   CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
   FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
   FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
-  BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf\r
-  SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf\r
-  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf\r
+  FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf\r
+  FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf\r
+  FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf\r
+  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
 \r
 [LibraryClasses.ARM, LibraryClasses.AARCH64]\r
   #\r
   # It is not possible to prevent the ARM compiler for generic intrinsic functions.\r
-  # This library provides the instrinsic functions generate by a given compiler.\r
+  # This library provides the intrinsic functions generate by a given compiler.\r
   # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this library\r
   # into all ARM and AARCH64 images.\r
   #\r
 [LibraryClasses.ARM]\r
   ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf\r
 \r
+[PcdsPatchableInModule]\r
+  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{0}\r
+\r
 [Components]\r
   #\r
   # Libraries\r
   #\r
   FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
+  FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf\r
   FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
   FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
+  FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf\r
+  FmpDevicePkg/Library/FmpDependencyCheckLib/FmpDependencyCheckLib.inf\r
+  FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf\r
+  FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf\r
   FmpDevicePkg/FmpDxe/FmpDxeLib.inf\r
 \r
   #\r
   # Modules\r
   #\r
+  FmpDevicePkg/CapsuleUpdatePolicyDxe/CapsuleUpdatePolicyDxe.inf {\r
+    <LibraryClasses>\r
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
+  }\r
   FmpDevicePkg/FmpDxe/FmpDxe.inf {\r
     <Defines>\r
       #\r
-      # FILE_GUID is FMP ESRT GUID\r
+      # FILE_GUID is used as ESRT GUID\r
+      #\r
+      FILE_GUID = $(SYSTEM_FMP_ESRT_GUID)\r
+    <PcdsFixedAtBuild>\r
+      #\r
+      # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
+      #\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
       #\r
-      FILE_GUID = $(FMP_GRAPHICS_ESRT_GUID)\r
+      # Certificates used to authenticate capsule update image\r
+      #\r
+      !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc\r
+    <PcdsPatchableInModule>\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(SYSTEM_FMP_ESRT_GUID)")}\r
     <LibraryClasses>\r
-      DisplayUpdateProgressLib|MdeModulePkg/Library/DisplayUpdateProgressLibGraphics/DisplayUpdateProgressLibGraphics.inf\r
+      #\r
+      # Use CapsuleUpdatePolicyLib that calls the Capsule Update Policy Protocol.\r
+      # Depends on the CapsuleUpdatePolicyDxe module to produce the protocol.\r
+      # Required for FmpDxe modules that are intended to be platform independent.\r
+      #\r
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf\r
   }\r
 \r
   FmpDevicePkg/FmpDxe/FmpDxe.inf {\r
       #\r
       # FILE_GUID is used as ESRT GUID\r
       #\r
-      FILE_GUID = $(FMP_TEXT_ESRT_GUID)\r
+      FILE_GUID = $(DEVICE_FMP_ESRT_GUID)\r
+    <PcdsFeatureFlag>\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable|$(DEVICE_FMP_STORAGE_ACCESS_ENABLE)\r
+    <PcdsFixedAtBuild>\r
+!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == FALSE\r
+      #\r
+      # Disable test key detection\r
+      #\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}\r
+!endif\r
+      #\r
+      # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module\r
+      #\r
+!if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == TRUE\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"\r
+!else\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device No Storage Access"\r
+!endif\r
+      #\r
+      # Certificates used to authenticate capsule update image\r
+      #\r
+      !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc\r
+    <PcdsPatchableInModule>\r
+      gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(DEVICE_FMP_ESRT_GUID)")}\r
     <LibraryClasses>\r
-      DisplayUpdateProgressLib|MdeModulePkg/Library/DisplayUpdateProgressLibText/DisplayUpdateProgressLibText.inf\r
+      #\r
+      # Directly use a platform specific CapsuleUpdatePolicyLib instance.\r
+      # Only works for FmpDxe modules that are build from sources and included\r
+      # in a system firmware image.\r
+      #\r
+      CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
   }\r
 \r
+  #\r
+  # Add UEFI Target Based Unit Tests\r
+  #\r
+  FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/FmpDependencyLibUnitTestsUefi.inf\r
+\r
 [BuildOptions]\r
   *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES\r