diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-11 03:14:43 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-09-11 03:14:43 +0000 |
commit | fd171542e0aa89ac12a09d79608173f48019b14b (patch) | |
tree | b4e1320ab3bc1cb59355f9fcbc361f84ae0c4f0a /BaseTools/Source/Python/GenFds/Capsule.py | |
parent | f22911b49e8be58d364f9e21f5af6bd3f0513cf7 (diff) | |
download | edk2-platforms-fd171542e0aa89ac12a09d79608173f48019b14b.tar.xz |
Sync basetools' source and binary files with r1707 of the basetools project.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/Capsule.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/Capsule.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/Capsule.py b/BaseTools/Source/Python/GenFds/Capsule.py index 7f17fcda68..961b88a458 100644 --- a/BaseTools/Source/Python/GenFds/Capsule.py +++ b/BaseTools/Source/Python/GenFds/Capsule.py @@ -21,6 +21,7 @@ import os import subprocess
import StringIO
from Common.Misc import SaveFileOnChange
+from GenFds import GenFds
T_CHAR_LF = '\n'
@@ -39,17 +40,26 @@ class Capsule (CapsuleClassObject) : self.BlockSize = None
# For GenFv
self.BlockNum = None
+ self.CapsuleName = None
## Generate capsule
#
# @param self The object pointer
+ # @retval string Generated Capsule file path
#
def GenCapsule(self):
+ if self.UiCapsuleName.upper() + 'cap' in GenFds.ImageBinDict.keys():
+ return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
+
+ GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
CapInfFile = self.GenCapInf()
CapInfFile.writelines("[files]" + T_CHAR_LF)
-
+ CapFileList = []
for CapsuleDataObj in self.CapsuleDataList :
+ CapsuleDataObj.CapsuleName = self.CapsuleName
FileName = CapsuleDataObj.GenCapsuleSubItem()
+ CapsuleDataObj.CapsuleName = None
+ CapFileList.append(FileName)
CapInfFile.writelines("EFI_FILE_NAME = " + \
FileName + \
T_CHAR_LF)
@@ -63,9 +73,14 @@ class Capsule (CapsuleClassObject) : GenFdsGlobalVariable.GenerateFirmwareVolume(
CapOutputFile,
[self.CapInfFileName],
- Capsule=True
+ Capsule=True,
+ FfsList=CapFileList
)
+
+ GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s Capsule Successfully" %self.UiCapsuleName)
GenFdsGlobalVariable.SharpCounter = 0
+ GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap'] = CapOutputFile
+ return CapOutputFile
## Generate inf file for capsule
#
|