]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDevicePkg.dsc
FmpDevicePkg: Add Capsule Update Policy Protocol
[mirror_edk2.git] / FmpDevicePkg / FmpDevicePkg.dsc
index 444cd1ffa78761a598d317a6aca8ec3c6041ab4a..3356571fffc65e75c744b3c6bfd296df861fe1fc 100644 (file)
@@ -7,26 +7,9 @@
 # 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 - 2019, Intel Corporation. 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
@@ -37,7 +20,7 @@
   DSC_SPECIFICATION              = 0x00010005\r
   OUTPUT_DIRECTORY               = Build/FmpDevicePkg\r
   SUPPORTED_ARCHITECTURES        = IA32|X64|ARM|AARCH64\r
-  BUILD_TARGETS                  = DEBUG|RELEASE\r
+  BUILD_TARGETS                  = DEBUG|RELEASE|NOOPT\r
   SKUID_IDENTIFIER               = DEFAULT\r
 \r
   #\r
@@ -66,6 +49,7 @@
   CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
   FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
   FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf\r
+  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
 \r
 [LibraryClasses.ARM, LibraryClasses.AARCH64]\r
   #\r
@@ -87,6 +71,7 @@
   # 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/FmpDxe/FmpDxeLib.inf\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 used as ESRT GUID\r
       #\r
       FILE_GUID = $(SYSTEM_FMP_ESRT_GUID)\r
+    <LibraryClasses>\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
       # FILE_GUID is used as ESRT GUID\r
       #\r
       FILE_GUID = $(DEVICE_FMP_ESRT_GUID)\r
+    <LibraryClasses>\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
 [BuildOptions]\r