diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-18 12:17:25 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-18 12:17:25 +0000 |
commit | b36d134faf4305247830522b8e2bb255e98c5699 (patch) | |
tree | ec37795cbc86b693528a062030cb516039bcb1c2 /BaseTools/Source/Python/GenFds/CapsuleData.py | |
parent | e7fe4028631b6a7d70e3c02c7c40ff1504321daa (diff) | |
download | edk2-platforms-b36d134faf4305247830522b8e2bb255e98c5699.tar.xz |
Sync BaseTools Branch (version r2321) to EDKII main trunk.
Signed-off-by: lgao4
Reviewed-by: gikidy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/CapsuleData.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/CapsuleData.py | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/CapsuleData.py b/BaseTools/Source/Python/GenFds/CapsuleData.py index 85307b90c6..aef8df0e16 100644 --- a/BaseTools/Source/Python/GenFds/CapsuleData.py +++ b/BaseTools/Source/Python/GenFds/CapsuleData.py @@ -43,7 +43,7 @@ class CapsuleFfs (CapsuleData): #
# @param self The object pointer
#
- def __init_(self) :
+ def __init__(self) :
self.Ffs = None
self.FvName = None
@@ -87,3 +87,51 @@ class CapsuleFv (CapsuleData): else:
FvFile = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FvName)
return FvFile
+
+## FD class for capsule data
+#
+#
+class CapsuleFd (CapsuleData):
+ ## The constructor
+ #
+ # @param self The object pointer
+ #
+ def __init__(self) :
+ self.Ffs = None
+ self.FdName = None
+ self.CapsuleName = None
+
+ ## generate FD capsule data
+ #
+ # @param self The object pointer
+ # @retval string Generated file name
+ #
+ def GenCapsuleSubItem(self):
+ if self.FdName.find('.fd') == -1:
+ if self.FdName.upper() in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():
+ FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict.get(self.FdName.upper())
+ FdFile = FdObj.GenFd()
+ return FdFile
+ else:
+ FdFile = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FdName)
+ return FdFile
+
+## AnyFile class for capsule data
+#
+#
+class CapsuleAnyFile (CapsuleData):
+ ## The constructor
+ #
+ # @param self The object pointer
+ #
+ def __init__(self) :
+ self.Ffs = None
+ self.FileName = None
+
+ ## generate AnyFile capsule data
+ #
+ # @param self The object pointer
+ # @retval string Generated file name
+ #
+ def GenCapsuleSubItem(self):
+ return self.FileName
\ No newline at end of file |