Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseTools: Modify FMMT import path for pip module calling #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion edk2basetools/FMMT/FMMT.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Import Modules
#
import argparse
from core.FMMTOperation import *
from edk2basetools.FMMT.core.FMMTOperation import *

parser = argparse.ArgumentParser(description='''
View the Binary Structure of FD/FV/Ffs/Section, and Delete/Extract/Add/Replace a Ffs from/into a FV.
Expand Down
10 changes: 5 additions & 5 deletions edk2basetools/FMMT/core/BinaryFactoryProduct.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import copy
import os
import sys
from FirmwareStorageFormat.Common import *
from core.BiosTreeNode import *
from core.BiosTree import *
from core.GuidTools import GUIDTools
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FirmwareStorageFormat.Common import *
from edk2basetools.FMMT.core.BiosTreeNode import *
from edk2basetools.FMMT.core.BiosTree import *
from edk2basetools.FMMT.core.GuidTools import GUIDTools
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger

ROOT_TREE = 'ROOT'
ROOT_ELF_TREE = 'ROOT_ELF_TREE'
Expand Down
4 changes: 2 additions & 2 deletions edk2basetools/FMMT/core/BiosTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import collections
from FirmwareStorageFormat.Common import *
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FirmwareStorageFormat.Common import *
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger

ROOT_TREE = 'ROOT'
ROOT_FV_TREE = 'ROOT_FV_TREE'
Expand Down
12 changes: 6 additions & 6 deletions edk2basetools/FMMT/core/BiosTreeNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from FirmwareStorageFormat.UPLHeader import *
from FirmwareStorageFormat.FvHeader import *
from FirmwareStorageFormat.FfsFileHeader import *
from FirmwareStorageFormat.SectionHeader import *
from FirmwareStorageFormat.Common import *
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FirmwareStorageFormat.UPLHeader import *
from edk2basetools.FirmwareStorageFormat.FvHeader import *
from edk2basetools.FirmwareStorageFormat.FfsFileHeader import *
from edk2basetools.FirmwareStorageFormat.SectionHeader import *
from edk2basetools.FirmwareStorageFormat.Common import *
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger
import uuid

SectionHeaderType = {
Expand Down
8 changes: 4 additions & 4 deletions edk2basetools/FMMT/core/FMMTOperation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from core.FMMTParser import *
from core.FvHandler import *
from utils.FvLayoutPrint import *
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FMMT.core.FMMTParser import *
from edk2basetools.FMMT.core.FvHandler import *
from edk2basetools.FMMT.utils.FvLayoutPrint import *
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger

global Fv_count
Fv_count = 0
Expand Down
12 changes: 6 additions & 6 deletions edk2basetools/FMMT/core/FMMTParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from FirmwareStorageFormat.Common import *
from core.BinaryFactoryProduct import ParserEntry
from core.BiosTreeNode import *
from core.BiosTree import *
from core.GuidTools import *
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FirmwareStorageFormat.Common import *
from edk2basetools.FMMT.core.BinaryFactoryProduct import ParserEntry
from edk2basetools.FMMT.core.BiosTreeNode import *
from edk2basetools.FMMT.core.BiosTree import *
from edk2basetools.FMMT.core.GuidTools import *
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger

class FMMTParser:
def __init__(self, name: str, TYPE: str) -> None:
Expand Down
10 changes: 5 additions & 5 deletions edk2basetools/FMMT/core/FvHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
from core.BiosTree import *
from core.GuidTools import GUIDTools
from core.BiosTreeNode import *
from FirmwareStorageFormat.Common import *
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FMMT.core.BiosTree import *
from edk2basetools.FMMT.core.GuidTools import GUIDTools
from edk2basetools.FMMT.core.BiosTreeNode import *
from edk2basetools.FirmwareStorageFormat.Common import *
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger

EFI_FVB2_ERASE_POLARITY = 0x00000800

Expand Down
4 changes: 2 additions & 2 deletions edk2basetools/FMMT/core/GuidTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import sys
import tempfile
import uuid
from FirmwareStorageFormat.Common import *
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FirmwareStorageFormat.Common import *
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger
import subprocess

def ExecuteCommand(cmd: list) -> None:
Expand Down
4 changes: 2 additions & 2 deletions edk2basetools/FMMT/utils/FvLayoutPrint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from utils.FmmtLogger import FmmtLogger as logger
from edk2basetools.FMMT.utils.FmmtLogger import FmmtLogger as logger

def GetFormatter(layout_format: str):
if layout_format == 'json':
Expand Down Expand Up @@ -52,4 +52,4 @@ def dump(self,layoutdict, layoutlist, outputfile = None):

class HtmlFormatter(Formatter):
def dump(self,layoutdict, layoutlist, outputfile = None):
TxtFormatter().dump(layoutdict, layoutlist, outputfile)
TxtFormatter().dump(layoutdict, layoutlist, outputfile)
2 changes: 1 addition & 1 deletion edk2basetools/FirmwareStorageFormat/FfsFileHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
##
from struct import *
from ctypes import *
from FirmwareStorageFormat.Common import *
from edk2basetools.FirmwareStorageFormat.Common import *

EFI_FFS_FILE_HEADER_LEN = 24
EFI_FFS_FILE_HEADER2_LEN = 32
Expand Down
2 changes: 1 addition & 1 deletion edk2basetools/FirmwareStorageFormat/FvHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ast import Str
from struct import *
from ctypes import *
from FirmwareStorageFormat.Common import *
from edk2basetools.FirmwareStorageFormat.Common import *

class EFI_FV_BLOCK_MAP_ENTRY(Structure):
_pack_ = 1
Expand Down
2 changes: 1 addition & 1 deletion edk2basetools/FirmwareStorageFormat/SectionHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
##
from struct import *
from ctypes import *
from FirmwareStorageFormat.Common import *
from edk2basetools.FirmwareStorageFormat.Common import *

EFI_COMMON_SECTION_HEADER_LEN = 4
EFI_COMMON_SECTION_HEADER2_LEN = 8
Expand Down
2 changes: 1 addition & 1 deletion edk2basetools/FirmwareStorageFormat/UPLHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
##
from struct import *
from ctypes import *
from FirmwareStorageFormat.Common import *
from edk2basetools.FirmwareStorageFormat.Common import *

EFI_COMMON_SECTION_HEADER_LEN = 4
EFI_COMMON_SECTION_HEADER2_LEN = 8
Expand Down