## @file\r
# generate capsule\r
#\r
-# Copyright (c) 2007-2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
def GenCapsuleSubItem(self, AuthData=[]):\r
if not self.Version:\r
- self.Version = 0x00000002\r
+ self.Version = '0x00000002'\r
+ if not self.ImageIndex:\r
+ self.ImageIndex = '0x1'\r
+ if not self.HardwareInstance:\r
+ self.HardwareInstance = '0x0'\r
ImageFileSize = os.path.getsize(self.ImageFile)\r
if AuthData:\r
# the ImageFileSize need include the full authenticated info size. From first bytes of MonotonicCount to last bytes of certificate.\r
## @file\r
# parse FDF file\r
#\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
# Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.<BR>\r
#\r
# This program and the accompanying materials\r
\r
if (FmpData.MonotonicCount and not FmpData.Certificate_Guid) or (not FmpData.MonotonicCount and FmpData.Certificate_Guid):\r
EdkLogger.error("FdfParser", FORMAT_INVALID, "CERTIFICATE_GUID and MONOTONIC_COUNT must be work as a pair.")\r
- # remove CERTIFICATE_GUID and MONOTONIC_COUNT from FmpKeyList, since these keys are optional\r
- if 'CERTIFICATE_GUID' in FmpKeyList:\r
- FmpKeyList.remove('CERTIFICATE_GUID')\r
- if 'MONOTONIC_COUNT' in FmpKeyList:\r
- FmpKeyList.remove('MONOTONIC_COUNT')\r
- if FmpKeyList:\r
- raise Warning("Missing keywords %s in FMP payload section." % ', '.join(FmpKeyList), self.FileName, self.CurrentLineNumber)\r
+\r
+ # Only the IMAGE_TYPE_ID is required item\r
+ if FmpKeyList and 'IMAGE_TYPE_ID' in FmpKeyList:\r
+ raise Warning("Missing keywords IMAGE_TYPE_ID in FMP payload section.", self.FileName, self.CurrentLineNumber)\r
# get the Image file and Vendor code file\r
self.__GetFMPCapsuleData(FmpData)\r
if not FmpData.ImageFile:\r