summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2018-07-13 18:18:34 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-07-16 11:22:13 +0800
commit8f3f5794b4b0027ee118fc6e03ea01620e6cd9d4 (patch)
tree58e430bf5c238cc87e0ff95f4fbb08c8d9f77c23 /BaseTools/Source/Python/GenFds/OptRomInfStatement.py
parentbfa65b61dde887a9586e070101202bd37e3221fd (diff)
downloadedk2-8f3f5794b4b0027ee118fc6e03ea01620e6cd9d4.tar.gz
edk2-8f3f5794b4b0027ee118fc6e03ea01620e6cd9d4.tar.bz2
edk2-8f3f5794b4b0027ee118fc6e03ea01620e6cd9d4.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/OptRomInfStatement.py')
-rw-r--r--BaseTools/Source/Python/GenFds/OptRomInfStatement.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
index dfeba5d0b1..e416b838d1 100644
--- a/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/OptRomInfStatement.py
@@ -45,9 +45,8 @@ class OptRomInfStatement (FfsInfStatement):
# @param self The object pointer
#
def __GetOptRomParams(self):
- from . import OptionRom
if self.OverrideAttribs is None:
- self.OverrideAttribs = OptionRom.OverrideAttribs()
+ self.OverrideAttribs = OverrideAttribs()
if self.OverrideAttribs.NeedCompress is None:
self.OverrideAttribs.NeedCompress = self.OptRomDefs.get ('PCI_COMPRESS')
@@ -150,3 +149,17 @@ class OptRomInfStatement (FfsInfStatement):
OutputFileList.extend(FileList)
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