]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDevicePkg.dsc
.pytool: Avoid "is" with a literal Python 3.8 warnings in CI plugins
[mirror_edk2.git] / FmpDevicePkg / FmpDevicePkg.dsc
index 3356571fffc65e75c744b3c6bfd296df861fe1fc..f4093d3837c65fd71ad0264aa6cc6d91754d320f 100644 (file)
   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
 [LibraryClasses]\r
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf\r
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf\r
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.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
   CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf\r
   FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf\r
@@ -54,7 +64,7 @@
 [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
@@ -66,6 +76,9 @@
 [LibraryClasses.ARM]\r
   ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf\r
 \r
+[PcdsPatchableInModule]\r
+  gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{0}\r
+\r
 [Components]\r
   #\r
   # Libraries\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
+      # 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
       #\r
       # Use CapsuleUpdatePolicyLib that calls the Capsule Update Policy Protocol.\r
       # FILE_GUID is used as ESRT GUID\r
       #\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
       #\r
       # Directly use a platform specific CapsuleUpdatePolicyLib instance.\r