mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
BaseTools: Use absolute import in GenFds
Based on "futurize -f libfuturize.fixes.fix_absolute_import" Since circular import is not allowed after adopting absolute import, the following changes are applied to break the circles. * BaseTools/Source/Python/GenFds/Capsule.py - Delay "from .GenFds import GenFds" until GenCapsule() - Delay "from .GenFds import FindExtendTool" until GenFmpCapsule() To break the circle: AutoGen.AutoGen => GenFds.FdfParser => GenFds.Capsule => GenFds.GenFds => GenFds.FdfParser * BaseTools/Source/Python/GenFds/Fd.py - Delay "from .GenFds import GenFds" until GenFd() To break the circle: AutoGen.AutoGen => GenFds.FdfParser => GenFds.Fd => GenFds.GenFds => GenFds.FdfParser * BaseTools/Source/Python/GenFds/Fv.py - Delay "from .GenFds import GenFds" until AddToBuffer() To break the circle: AutoGen.AutoGen => GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.GenFds => GenFds.FdfParser * BaseTools/Source/Python/GenFds/GuidSection.py - Delay "from .GenFds import FindExtendTool" until GuidSection() To break the circle: AutoGen.AutoGen => GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.AprioriSection => GenFds.FfsFileStatement => GenFds.GuidSection => GenFds.GenFds => GenFds.FdfParser * BaseTools/Source/Python/GenFds/OptRomInfStatement.py - Delay "from . import OptionRom" until __GetOptRomParams() To break the circle: AutoGen.AutoGen => GenFds.FdfParser => GenFds.OptionRom => GenFds.OptRomInfStatement => GenFds.OptionRom * BaseTools/Source/Python/GenFds/OptionRom.py - Remove the unused "from GenFds import GenFds" To break the circle: AutoGen.AutoGen => GenFds.FdfParser => GenFds.OptionRom => 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:
parent
15e2022825
commit
bfa65b61dd
@ -15,11 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
from struct import *
|
from struct import *
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import FfsFileStatement
|
from . import FfsFileStatement
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import AprioriSectionClassObject
|
from CommonDataClass.FdfClass import AprioriSectionClassObject
|
||||||
from Common.StringUtils import *
|
from Common.StringUtils import *
|
||||||
from Common.Misc import SaveFileOnChange, PathClass
|
from Common.Misc import SaveFileOnChange, PathClass
|
||||||
|
@ -15,17 +15,16 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from __future__ import absolute_import
|
||||||
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import CapsuleClassObject
|
from CommonDataClass.FdfClass import CapsuleClassObject
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import subprocess
|
import subprocess
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
from GenFds import GenFds
|
|
||||||
from Common.Misc import PackRegistryFormatGuid
|
from Common.Misc import PackRegistryFormatGuid
|
||||||
import uuid
|
import uuid
|
||||||
from struct import pack
|
from struct import pack
|
||||||
from GenFds import FindExtendTool
|
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
|
||||||
@ -66,6 +65,7 @@ class Capsule (CapsuleClassObject) :
|
|||||||
# UINT32 CapsuleImageSize;
|
# UINT32 CapsuleImageSize;
|
||||||
# } EFI_CAPSULE_HEADER;
|
# } EFI_CAPSULE_HEADER;
|
||||||
#
|
#
|
||||||
|
from .GenFds import FindExtendTool
|
||||||
Header = BytesIO()
|
Header = BytesIO()
|
||||||
#
|
#
|
||||||
# Use FMP capsule GUID: 6DCBD5ED-E82D-4C44-BDA1-7194199AD92A
|
# Use FMP capsule GUID: 6DCBD5ED-E82D-4C44-BDA1-7194199AD92A
|
||||||
@ -201,6 +201,7 @@ class Capsule (CapsuleClassObject) :
|
|||||||
# @retval string Generated Capsule file path
|
# @retval string Generated Capsule file path
|
||||||
#
|
#
|
||||||
def GenCapsule(self):
|
def GenCapsule(self):
|
||||||
|
from .GenFds import GenFds
|
||||||
if self.UiCapsuleName.upper() + 'cap' in GenFds.ImageBinDict:
|
if self.UiCapsuleName.upper() + 'cap' in GenFds.ImageBinDict:
|
||||||
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
|
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
|
||||||
|
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Ffs
|
from __future__ import absolute_import
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from . import Ffs
|
||||||
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from struct import pack
|
from struct import pack
|
||||||
import os
|
import os
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from Ffs import Ffs
|
from __future__ import absolute_import
|
||||||
import Section
|
from .Ffs import Ffs
|
||||||
|
from . import Section
|
||||||
import subprocess
|
import subprocess
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import CompressSectionClassObject
|
from CommonDataClass.FdfClass import CompressSectionClassObject
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
|
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Section
|
from __future__ import absolute_import
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from . import Section
|
||||||
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from .Ffs import Ffs
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import DataSectionClassObject
|
from CommonDataClass.FdfClass import DataSectionClassObject
|
||||||
from Common.Misc import PeImageClass
|
from Common.Misc import PeImageClass
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Section
|
from __future__ import absolute_import
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from . import Section
|
||||||
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from .Ffs import Ffs
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import DepexSectionClassObject
|
from CommonDataClass.FdfClass import DepexSectionClassObject
|
||||||
from AutoGen.GenDepex import DependencyExpression
|
from AutoGen.GenDepex import DependencyExpression
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
from struct import *
|
from struct import *
|
||||||
import Section
|
from . import Section
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from .Ffs import Ffs
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import EfiSectionClassObject
|
from CommonDataClass.FdfClass import EfiSectionClassObject
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
|
@ -15,18 +15,18 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Region
|
from __future__ import absolute_import
|
||||||
import Fv
|
from . import Region
|
||||||
|
from . import Fv
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import sys
|
import sys
|
||||||
from struct import *
|
from struct import *
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import FDClassObject
|
from CommonDataClass.FdfClass import FDClassObject
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
from GenFds import GenFds
|
|
||||||
from Common.DataType import BINARY_FILE_TYPE_FV
|
from Common.DataType import BINARY_FILE_TYPE_FV
|
||||||
|
|
||||||
## generate FD
|
## generate FD
|
||||||
@ -47,6 +47,7 @@ class FD(FDClassObject):
|
|||||||
# @retval string Generated FD file name
|
# @retval string Generated FD file name
|
||||||
#
|
#
|
||||||
def GenFd (self, Flag = False):
|
def GenFd (self, Flag = False):
|
||||||
|
from .GenFds import GenFds
|
||||||
if self.FdUiName.upper() + 'fd' in GenFds.ImageBinDict:
|
if self.FdUiName.upper() + 'fd' in GenFds.ImageBinDict:
|
||||||
return GenFds.ImageBinDict[self.FdUiName.upper() + 'fd']
|
return GenFds.ImageBinDict[self.FdUiName.upper() + 'fd']
|
||||||
|
|
||||||
|
@ -17,35 +17,36 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import Fd
|
from . import Fd
|
||||||
import Region
|
from . import Region
|
||||||
import Fv
|
from . import Fv
|
||||||
import AprioriSection
|
from . import AprioriSection
|
||||||
import FfsInfStatement
|
from . import FfsInfStatement
|
||||||
import FfsFileStatement
|
from . import FfsFileStatement
|
||||||
import VerSection
|
from . import VerSection
|
||||||
import UiSection
|
from . import UiSection
|
||||||
import FvImageSection
|
from . import FvImageSection
|
||||||
import DataSection
|
from . import DataSection
|
||||||
import DepexSection
|
from . import DepexSection
|
||||||
import CompressSection
|
from . import CompressSection
|
||||||
import GuidSection
|
from . import GuidSection
|
||||||
import Capsule
|
from . import Capsule
|
||||||
import CapsuleData
|
from . import CapsuleData
|
||||||
import Rule
|
from . import Rule
|
||||||
import RuleComplexFile
|
from . import RuleComplexFile
|
||||||
import RuleSimpleFile
|
from . import RuleSimpleFile
|
||||||
import EfiSection
|
from . import EfiSection
|
||||||
import Vtf
|
from . import Vtf
|
||||||
import ComponentStatement
|
from . import ComponentStatement
|
||||||
import OptionRom
|
from . import OptionRom
|
||||||
import OptRomInfStatement
|
from . import OptRomInfStatement
|
||||||
import OptRomFileStatement
|
from . import OptRomFileStatement
|
||||||
import string
|
import string
|
||||||
|
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.Misc import PathClass
|
from Common.Misc import PathClass
|
||||||
@ -60,8 +61,8 @@ from Common.Misc import tdict
|
|||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from Capsule import EFI_CERT_TYPE_PKCS7_GUID
|
from .Capsule import EFI_CERT_TYPE_PKCS7_GUID
|
||||||
from Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID
|
from .Capsule import EFI_CERT_TYPE_RSA2048_SHA256_GUID
|
||||||
from Common.RangeExpression import RangeExpression
|
from Common.RangeExpression import RangeExpression
|
||||||
|
|
||||||
##define T_CHAR_SPACE ' '
|
##define T_CHAR_SPACE ' '
|
||||||
|
@ -15,19 +15,20 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Ffs
|
from __future__ import absolute_import
|
||||||
import Rule
|
from . import Ffs
|
||||||
|
from . import Rule
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import FileStatementClassObject
|
from CommonDataClass.FdfClass import FileStatementClassObject
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from Common.Misc import GuidStructureByteArrayToGuidString
|
from Common.Misc import GuidStructureByteArrayToGuidString
|
||||||
from GuidSection import GuidSection
|
from .GuidSection import GuidSection
|
||||||
from FvImageSection import FvImageSection
|
from .FvImageSection import FvImageSection
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
from struct import *
|
from struct import *
|
||||||
|
|
||||||
|
@ -16,17 +16,18 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Rule
|
from __future__ import absolute_import
|
||||||
|
from . import Rule
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from struct import *
|
from struct import *
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import Ffs
|
from . import Ffs
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import Section
|
from . import Section
|
||||||
import RuleSimpleFile
|
from . import RuleSimpleFile
|
||||||
import RuleComplexFile
|
from . import RuleComplexFile
|
||||||
from CommonDataClass.FdfClass import FfsInfStatementClassObject
|
from CommonDataClass.FdfClass import FfsInfStatementClassObject
|
||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
from Common.StringUtils import *
|
from Common.StringUtils import *
|
||||||
@ -36,15 +37,15 @@ from Common.Misc import ProcessDuplicatedInf
|
|||||||
from Common.Misc import GetVariableOffset
|
from Common.Misc import GetVariableOffset
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from GuidSection import GuidSection
|
from .GuidSection import GuidSection
|
||||||
from FvImageSection import FvImageSection
|
from .FvImageSection import FvImageSection
|
||||||
from Common.Misc import PeImageClass
|
from Common.Misc import PeImageClass
|
||||||
from AutoGen.GenDepex import DependencyExpression
|
from AutoGen.GenDepex import DependencyExpression
|
||||||
from PatchPcdValue.PatchPcdValue import PatchBinaryFile
|
from PatchPcdValue.PatchPcdValue import PatchBinaryFile
|
||||||
from Common.LongFilePathSupport import CopyLongFilePath
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
import Common.GlobalData as GlobalData
|
import Common.GlobalData as GlobalData
|
||||||
from DepexSection import DepexSection
|
from .DepexSection import DepexSection
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
from Common.Expression import *
|
from Common.Expression import *
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import absolute_import
|
||||||
## @file
|
## @file
|
||||||
# process FV generation
|
# process FV generation
|
||||||
#
|
#
|
||||||
@ -20,11 +21,10 @@ import subprocess
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from struct import *
|
from struct import *
|
||||||
|
|
||||||
import Ffs
|
from . import Ffs
|
||||||
import AprioriSection
|
from . import AprioriSection
|
||||||
import FfsFileStatement
|
from . import FfsFileStatement
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from GenFds import GenFds
|
|
||||||
from CommonDataClass.FdfClass import FvClassObject
|
from CommonDataClass.FdfClass import FvClassObject
|
||||||
from Common.Misc import SaveFileOnChange, PackGUID
|
from Common.Misc import SaveFileOnChange, PackGUID
|
||||||
from Common.LongFilePathSupport import CopyLongFilePath
|
from Common.LongFilePathSupport import CopyLongFilePath
|
||||||
@ -70,6 +70,7 @@ class FV (FvClassObject):
|
|||||||
#
|
#
|
||||||
def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}, Flag=False) :
|
def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}, Flag=False) :
|
||||||
|
|
||||||
|
from .GenFds import GenFds
|
||||||
if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict:
|
if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict:
|
||||||
return GenFds.ImageBinDict[self.UiFvName.upper() + 'fv']
|
return GenFds.ImageBinDict[self.UiFvName.upper() + 'fv']
|
||||||
|
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Section
|
from __future__ import absolute_import
|
||||||
|
from . import Section
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from Ffs import Ffs
|
from .Ffs import Ffs
|
||||||
import subprocess
|
import subprocess
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import FvImageSectionClassObject
|
from CommonDataClass.FdfClass import FvImageSectionClassObject
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
|
@ -16,17 +16,18 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import sys
|
import sys
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import linecache
|
import linecache
|
||||||
import FdfParser
|
from . import FdfParser
|
||||||
import Common.BuildToolError as BuildToolError
|
import Common.BuildToolError as BuildToolError
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from Workspace.WorkspaceDatabase import WorkspaceDatabase
|
from Workspace.WorkspaceDatabase import WorkspaceDatabase
|
||||||
from Workspace.BuildClassObject import PcdClassObject
|
from Workspace.BuildClassObject import PcdClassObject
|
||||||
import RuleComplexFile
|
from . import RuleComplexFile
|
||||||
from EfiSection import EfiSection
|
from .EfiSection import EfiSection
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import Common.TargetTxtClassObject as TargetTxtClassObject
|
import Common.TargetTxtClassObject as TargetTxtClassObject
|
||||||
import Common.ToolDefClassObject as ToolDefClassObject
|
import Common.ToolDefClassObject as ToolDefClassObject
|
||||||
@ -40,7 +41,7 @@ from Common.Misc import ClearDuplicatedInf
|
|||||||
from Common.Misc import GuidStructureStringToGuidString
|
from Common.Misc import GuidStructureStringToGuidString
|
||||||
from Common.BuildVersion import gBUILD_VERSION
|
from Common.BuildVersion import gBUILD_VERSION
|
||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
import FfsFileStatement
|
from . import FfsFileStatement
|
||||||
import glob
|
import glob
|
||||||
from struct import unpack
|
from struct import unpack
|
||||||
|
|
||||||
|
@ -16,19 +16,19 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Section
|
from __future__ import absolute_import
|
||||||
|
from . import Section
|
||||||
import subprocess
|
import subprocess
|
||||||
from Ffs import Ffs
|
from .Ffs import Ffs
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import GuidSectionClassObject
|
from CommonDataClass.FdfClass import GuidSectionClassObject
|
||||||
from Common import ToolDefClassObject
|
from Common import ToolDefClassObject
|
||||||
import sys
|
import sys
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
from FvImageSection import FvImageSection
|
from .FvImageSection import FvImageSection
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from GenFds import FindExtendTool
|
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
|
|
||||||
## generate GUIDed section
|
## generate GUIDed section
|
||||||
@ -131,6 +131,7 @@ class GuidSection(GuidSectionClassObject) :
|
|||||||
ExternalTool = None
|
ExternalTool = None
|
||||||
ExternalOption = None
|
ExternalOption = None
|
||||||
if self.NameGuid is not None:
|
if self.NameGuid is not None:
|
||||||
|
from .GenFds import FindExtendTool
|
||||||
ExternalTool, ExternalOption = FindExtendTool(self.KeyStringList, self.CurrentArchList, self.NameGuid)
|
ExternalTool, ExternalOption = FindExtendTool(self.KeyStringList, self.CurrentArchList, self.NameGuid)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -15,9 +15,10 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -15,16 +15,16 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import RuleSimpleFile
|
from __future__ import absolute_import
|
||||||
import RuleComplexFile
|
from . import RuleSimpleFile
|
||||||
import Section
|
from . import RuleComplexFile
|
||||||
import OptionRom
|
from . import Section
|
||||||
import Common.GlobalData as GlobalData
|
import Common.GlobalData as GlobalData
|
||||||
|
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
from Common.StringUtils import *
|
from Common.StringUtils import *
|
||||||
from FfsInfStatement import FfsInfStatement
|
from .FfsInfStatement import FfsInfStatement
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
@ -45,7 +45,7 @@ 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 = OptionRom.OverrideAttribs()
|
||||||
|
|
||||||
@ -150,5 +150,3 @@ class OptRomInfStatement (FfsInfStatement):
|
|||||||
OutputFileList.extend(FileList)
|
OutputFileList.extend(FileList)
|
||||||
|
|
||||||
return OutputFileList
|
return OutputFileList
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,12 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import OptRomInfStatement
|
from . import OptRomInfStatement
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from GenFds import GenFds
|
|
||||||
from CommonDataClass.FdfClass import OptionRomClassObject
|
from CommonDataClass.FdfClass import OptionRomClassObject
|
||||||
from Common.Misc import SaveFileOnChange
|
from Common.Misc import SaveFileOnChange
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
from struct import *
|
from struct import *
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import string
|
import string
|
||||||
from CommonDataClass.FdfClass import RegionClassObject
|
from CommonDataClass.FdfClass import RegionClassObject
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Rule
|
from __future__ import absolute_import
|
||||||
|
from . import Rule
|
||||||
from CommonDataClass.FdfClass import RuleComplexFileClassObject
|
from CommonDataClass.FdfClass import RuleComplexFileClassObject
|
||||||
|
|
||||||
## complex rule
|
## complex rule
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Rule
|
from __future__ import absolute_import
|
||||||
|
from . import Rule
|
||||||
from CommonDataClass.FdfClass import RuleSimpleFileClassObject
|
from CommonDataClass.FdfClass import RuleSimpleFileClassObject
|
||||||
|
|
||||||
## simple rule
|
## simple rule
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
from CommonDataClass.FdfClass import SectionClassObject
|
from CommonDataClass.FdfClass import SectionClassObject
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import Common.LongFilePathOs as os, glob
|
import Common.LongFilePathOs as os, glob
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from Common.BuildToolError import *
|
from Common.BuildToolError import *
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
import Section
|
from __future__ import absolute_import
|
||||||
from Ffs import Ffs
|
from . import Section
|
||||||
|
from .Ffs import Ffs
|
||||||
import subprocess
|
import subprocess
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import UiSectionClassObject
|
from CommonDataClass.FdfClass import UiSectionClassObject
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from Ffs import Ffs
|
from __future__ import absolute_import
|
||||||
import Section
|
from .Ffs import Ffs
|
||||||
|
from . import Section
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import subprocess
|
import subprocess
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
from CommonDataClass.FdfClass import VerSectionClassObject
|
from CommonDataClass.FdfClass import VerSectionClassObject
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from Common.DataType import SUP_MODULE_SEC
|
from Common.DataType import SUP_MODULE_SEC
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
from __future__ import absolute_import
|
||||||
|
from .GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.FdfClass import VtfClassObject
|
from CommonDataClass.FdfClass import VtfClassObject
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
Loading…
x
Reference in New Issue
Block a user