BaseTools: Move OverrideAttribs to OptRomInfStatement.py
Move "class OverrideAttribs" to OptRomInfStatement.py to remove "import OptionRom" which may form a circular import: GenFds.OptionRom => GenFds.OptRomInfStatement => GenFds.OptionRom 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:
@ -4493,7 +4493,7 @@ class FdfParser:
|
|||||||
#
|
#
|
||||||
def __GetOptRomOverrides(self, Obj):
|
def __GetOptRomOverrides(self, Obj):
|
||||||
if self.__IsToken('{'):
|
if self.__IsToken('{'):
|
||||||
Overrides = OptionRom.OverrideAttribs()
|
Overrides = OptRomInfStatement.OverrideAttribs()
|
||||||
while True:
|
while True:
|
||||||
if self.__IsKeyword( "PCI_VENDOR_ID"):
|
if self.__IsKeyword( "PCI_VENDOR_ID"):
|
||||||
if not self.__IsToken( "="):
|
if not self.__IsToken( "="):
|
||||||
|
@ -45,9 +45,8 @@ class OptRomInfStatement (FfsInfStatement):
|
|||||||
# @param self The object pointer
|
# @param self The object pointer
|
||||||
#
|
#
|
||||||
def __GetOptRomParams(self):
|
def __GetOptRomParams(self):
|
||||||
from . import OptionRom
|
|
||||||
if self.OverrideAttribs is None:
|
if self.OverrideAttribs is None:
|
||||||
self.OverrideAttribs = OptionRom.OverrideAttribs()
|
self.OverrideAttribs = OverrideAttribs()
|
||||||
|
|
||||||
if self.OverrideAttribs.NeedCompress is None:
|
if self.OverrideAttribs.NeedCompress is None:
|
||||||
self.OverrideAttribs.NeedCompress = self.OptRomDefs.get ('PCI_COMPRESS')
|
self.OverrideAttribs.NeedCompress = self.OptRomDefs.get ('PCI_COMPRESS')
|
||||||
@ -150,3 +149,17 @@ class OptRomInfStatement (FfsInfStatement):
|
|||||||
OutputFileList.extend(FileList)
|
OutputFileList.extend(FileList)
|
||||||
|
|
||||||
return OutputFileList
|
return OutputFileList
|
||||||
|
|
||||||
|
class OverrideAttribs:
|
||||||
|
|
||||||
|
## The constructor
|
||||||
|
#
|
||||||
|
# @param self The object pointer
|
||||||
|
#
|
||||||
|
def __init__(self):
|
||||||
|
|
||||||
|
self.PciVendorId = None
|
||||||
|
self.PciClassCode = None
|
||||||
|
self.PciDeviceId = None
|
||||||
|
self.PciRevision = None
|
||||||
|
self.NeedCompress = None
|
||||||
|
Reference in New Issue
Block a user