BaseTools: Fix the bug use same FMP_PAYLOAD in different capsule file

Fix the bug that use same FMP_PAYLOAD in different capsule file. Because
in previous FMP generation, the FMP already be generated, so we don't
need to regenerate again.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit d4c558e83d)
This commit is contained in:
Yonghong Zhu
2017-06-06 13:28:07 +08:00
parent 41e13d1056
commit d615a3a136
2 changed files with 13 additions and 5 deletions

View File

@ -183,6 +183,8 @@ class CapsulePayload(CapsuleData):
self.VendorCodeFile = []
self.Certificate_Guid = None
self.MonotonicCount = None
self.Existed = False
self.Buffer = None
def GenCapsuleSubItem(self, AuthData=[]):
if not self.Version:
@ -239,4 +241,5 @@ class CapsulePayload(CapsuleData):
VendorFile = open(self.VendorCodeFile, 'rb')
Buffer += VendorFile.read()
VendorFile.close()
self.Existed = True
return Buffer