BaseTools: Move ImageBinDict to GenFdsGlobalVariable.py
Move "ImageBinDict" from GenFds.py to GenFdsGlobalVariable.py so that we can remove the requirement to import GenFds.GenFds in Capsule.py, Fd.py and Fv.py. This breaks the following circular imports: * GenFds.FdfParser => GenFds.Capsule => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.GenFds => GenFds.FdfParser Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
@ -201,9 +201,8 @@ class Capsule (CapsuleClassObject) :
|
||||
# @retval string Generated Capsule file path
|
||||
#
|
||||
def GenCapsule(self):
|
||||
from .GenFds import GenFds
|
||||
if self.UiCapsuleName.upper() + 'cap' in GenFds.ImageBinDict:
|
||||
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
|
||||
if self.UiCapsuleName.upper() + 'cap' in GenFdsGlobalVariable.ImageBinDict:
|
||||
return GenFdsGlobalVariable.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
|
||||
|
||||
GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
|
||||
if ('CAPSULE_GUID' in self.TokensDict and
|
||||
@ -237,7 +236,7 @@ class Capsule (CapsuleClassObject) :
|
||||
|
||||
GenFdsGlobalVariable.VerboseLogger( "\nGenerate %s Capsule Successfully" %self.UiCapsuleName)
|
||||
GenFdsGlobalVariable.SharpCounter = 0
|
||||
GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap'] = CapOutputFile
|
||||
GenFdsGlobalVariable.ImageBinDict[self.UiCapsuleName.upper() + 'cap'] = CapOutputFile
|
||||
return CapOutputFile
|
||||
|
||||
## Generate inf file for capsule
|
||||
|
Reference in New Issue
Block a user