python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
## @file
# This file is used to define class objects of INF file header.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfHeaderObject
'''
## INF file header object
#
# A sample file header
#
# ## @file ... | edk2-master | BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py |
## @file
# This file is used to define class objects of INF file [LibraryClasses] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfLibraryClassesObject
'''
from Logger import StringTable as ST
f... | edk2-master | BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py |
## @file
# This file is used to define class objects of INF file [BuildOptions] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfBuildOptionObject
'''
from Library import GlobalData
from Object... | edk2-master | BaseTools/Source/Python/UPT/Object/Parser/InfBuildOptionObject.py |
## @file
# This file is used to define common class objects of [Defines] section for INF file.
# It will consumed by InfParser
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfDefineCommonObject
'''
from Object.Parser.InfCommonObject im... | edk2-master | BaseTools/Source/Python/UPT/Object/Parser/InfDefineCommonObject.py |
## @file
# This file is used to define class objects of INF file [UserExtension] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfUserExtensionsObject
'''
from Logger import StringTable as ST
fr... | edk2-master | BaseTools/Source/Python/UPT/Object/Parser/InfUserExtensionObject.py |
## @file
# This file is used to define class objects of INF file [Protocols] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
'''
InfProtocolObject
'''
from Library.ParserValidate import IsValidCVariab... | edk2-master | BaseTools/Source/Python/UPT/Object/Parser/InfProtocolObject.py |
## @file InfPomAlignmentMisc.py
# This file contained the routines for InfPomAlignment
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
InfPomAlignmentMisc
'''
##
# Import modules
#
import Logger.Log as Logger
from Library import DataTyp... | edk2-master | BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignmentMisc.py |
## @file DecPomAlignment.py
# This file contained the adapter for convert INF parser object to POM Object
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
DecPomAlignment
'''
from __future__ import print_function
##
# Import Modules
#
im... | edk2-master | BaseTools/Source/Python/UPT/PomAdapter/DecPomAlignment.py |
## @file
# Python 'Parser' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
PomAdapter
'''
| edk2-master | BaseTools/Source/Python/UPT/PomAdapter/__init__.py |
## @file InfPomAlignment.py
# This file contained the adapter for convert INF parser object to POM Object
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
InfPomAlignment
'''
##
# Import modules
#
import os.path
from Logger import StringTa... | edk2-master | BaseTools/Source/Python/UPT/PomAdapter/InfPomAlignment.py |
## @file
# Python 'Library' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenMetaFile
'''
| edk2-master | BaseTools/Source/Python/UPT/GenMetaFile/__init__.py |
## @file GenMetaFileMisc.py
#
# This file contained the miscellaneous routines for GenMetaFile usage.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenMetaFileMisc
'''
from Library import DataType as DT
from Library import GlobalData
... | edk2-master | BaseTools/Source/Python/UPT/GenMetaFile/GenMetaFileMisc.py |
## @file GenInfFile.py
#
# This file contained the logical of transfer package object to INF files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenInf
'''
import os
import stat
import codecs
from hashlib import md5
from Core.FileHook ... | edk2-master | BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py |
## @file GenDecFile.py
#
# This file contained the logical of transfer package object to DEC files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenDEC
'''
import os
import stat
import codecs
from hashlib import md5
from Core.FileHook... | edk2-master | BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py |
## @file GenXmlFile.py
#
# This file contained the logical of generate XML files.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenXmlFile
'''
| edk2-master | BaseTools/Source/Python/UPT/GenMetaFile/GenXmlFile.py |
## @file
# Generate a capsule windows driver.
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
GenerateWindowsDriver
'''
import sys
import argparse
import uuid
import struct
import subprocess
import os
import tempfile
import shutil
import platfor... | edk2-master | BaseTools/Source/Python/Capsule/GenerateWindowsDriver.py |
## @file
# Generate a capsule.
#
# This tool generates a UEFI Capsule around an FMP Capsule. The capsule payload
# be signed using signtool or OpenSSL and if it is signed the signed content
# includes an FMP Payload Header.
#
# This tool is intended to be used to generate UEFI Capsules to update the
# system firmware o... | edk2-master | BaseTools/Source/Python/Capsule/GenerateCapsule.py |
##
# UefiBuild Plugin that supports Window Capsule files based on the
# Windows Firmware Update Platform spec.
# Creates INF, Cat, and then signs it
#
# To install run pip install --upgrade edk2-pytool-library
# edk2-pytool-library-0.9.1 is required.
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyr... | edk2-master | BaseTools/Source/Python/Capsule/WindowsCapsuleSupportHelper.py |
## @file
# This file is used to define the FMMT dependent external tool.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
| edk2-master | BaseTools/Source/Python/FMMT/__init__.py |
# @file
# Firmware Module Management Tool.
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import argparse
from core.FMMTOperation import *
parser = argparse.ArgumentParser(description='''
View the Binary Structure of FD/F... | edk2-master | BaseTools/Source/Python/FMMT/FMMT.py |
## @file
# This file is used to define the BIOS Tree Node.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from FirmwareStorageFormat.FvHeader import *
from FirmwareStorageFormat.FfsFileHeader import *
from FirmwareStorageFormat.SectionHeader import... | edk2-master | BaseTools/Source/Python/FMMT/core/BiosTreeNode.py |
## @file
# This file is used to the implementation of Bios layout handler.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
from core.BiosTree import *
from core.GuidTools import GUIDTools
from core.BiosTreeNode import *
from FirmwareStorag... | edk2-master | BaseTools/Source/Python/FMMT/core/FvHandler.py |
## @file
# This file is used to define the functions to operate bios binary file.
#
# 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 impo... | edk2-master | BaseTools/Source/Python/FMMT/core/FMMTOperation.py |
## @file
# This file is used to define the FMMT dependent external tool management class.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import glob
import logging
import os
import shutil
import sys
import tempfile
import uuid
from FirmwareStorageF... | edk2-master | BaseTools/Source/Python/FMMT/core/GuidTools.py |
## @file
# This file is used to implement of the various bianry parser.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from re import T
import copy
import os
import sys
from FirmwareStorageFormat.Common import *
from core.BiosTreeNode import *
from... | edk2-master | BaseTools/Source/Python/FMMT/core/BinaryFactoryProduct.py |
## @file
# This file is used to define the interface of Bios Parser.
#
# 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 co... | edk2-master | BaseTools/Source/Python/FMMT/core/FMMTParser.py |
## @file
# This file is used to define the Bios layout tree structure and related operations.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import collections
from FirmwareStorageFormat.Common import *
from utils.FmmtLogger import FmmtLogger as lo... | edk2-master | BaseTools/Source/Python/FMMT/core/BiosTree.py |
## @file
# This file is used to define the Fmmt Logger.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import sys
import os
logfile = 'FMMT_Build.log'
if os.path.exists(logfile):
os.remove(logfile)
FmmtLogger = logging.getLog... | edk2-master | BaseTools/Source/Python/FMMT/utils/FmmtLogger.py |
## @file
# This file is used to define the printer for Bios layout.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
from utils.FmmtLogger import FmmtLogger as logger
def GetFormatter(layout_format: str):
if layout_format == 'json':
retu... | edk2-master | BaseTools/Source/Python/FMMT/utils/FvLayoutPrint.py |
## @file
# Common routines used by workspace
#
# Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
from collections import OrderedDict, defaultdict
from Common.DataType import SUP_MODULE_USER_DEFINED
from Commo... | edk2-master | BaseTools/Source/Python/Workspace/WorkspaceCommon.py |
## @file
# This file is used to define each component of the build database
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from collections import OrderedDict, namedtuple
from Common.DataType import *
import collections
import re
from collect... | edk2-master | BaseTools/Source/Python/Workspace/BuildClassObject.py |
## @file
# Python 'Workspace' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Workspace/__init__.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_impor... | edk2-master | BaseTools/Source/Python/Workspace/WorkspaceDatabase.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
## Platform build information from DSC file
#
# This class... | edk2-master | BaseTools/Source/Python/Workspace/DscBuildData.py |
## @file
# This file is used to create/update/query/erase a meta file table
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import uuid
import Common.EdkLogger as EdkLogger
from Com... | edk2-master | BaseTools/Source/Python/Workspace/MetaFileTable.py |
## @file
# This file is used to check format of comments
#
# Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from CommonDataClass.DataClass import (
MODEL_PCD_PATCHABLE_IN_MODULE,
MODEL_PCD_DYNAMIC_EX,
MODEL_PCD_DYNAMIC,
MODEL_EFI_GUID,
... | edk2-master | BaseTools/Source/Python/Workspace/MetaFileCommentParser.py |
## @file
# This file is used to create/update/query/erase table for files
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.LongFilePathOs as os
import Common.EdkLogger as EdkLogger
from CommonDataClass impor... | edk2-master | BaseTools/Source/Python/Workspace/MetaDataTable.py |
## @file
# This file is used to parse meta files
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
from __future_... | edk2-master | BaseTools/Source/Python/Workspace/MetaFileParser.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from Common.StringUtils import *
from Common.DataType import... | edk2-master | BaseTools/Source/Python/Workspace/DecBuildData.py |
## @file
# This file is used to create a database used by build tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
from Common.DataType... | edk2-master | BaseTools/Source/Python/Workspace/InfBuildData.py |
# @file
# Split a file into two pieces at the request offset.
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
import unittest
import tempfile
import os
import shutil
import Split.Split as sp
import struct as st
class TestSp... | edk2-master | BaseTools/Source/Python/tests/Split/test_split.py |
## @file
# Python 'PatchPcdValue' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/PatchPcdValue/__init__.py |
## @file
# Patch value into the binary file.
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.LongFilePathOs as os
from Common.LongFilePathSupport import OpenLongFilePath as open
import sys
from optparse imp... | edk2-master | BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py |
## @file
# Trim files preprocessed by compiler
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.LongFilePathOs as os
import sys
import re
from io import BytesIO
import codecs
from optparse import OptionParser... | edk2-master | BaseTools/Source/Python/Trim/Trim.py |
## @file
# This file implements the log mechanism for Python tools.
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# Copyright 2001-2016 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software an... | edk2-master | BaseTools/Source/Python/Common/EdkLogger.py |
## @file
# Common routines used by all tools
#
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import sys
import string
import threading
import time
import re
import pickle
import arr... | edk2-master | BaseTools/Source/Python/Common/Misc.py |
## @file
# This file is used to define each component of Target.txt file
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
from __future__ import absolute_import
import Common.GlobalDa... | edk2-master | BaseTools/Source/Python/Common/TargetTxtClassObject.py |
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
import re
gIsWindows = None
gWorkspace = "."
gOptions = None
gCaseInsensitive = False
gAllFiles = None
gComma... | edk2-master | BaseTools/Source/Python/Common/GlobalData.py |
## @file
# This file is used to define common parsing related functions used in parsing INF/DEC/DSC process
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
from .StringUtils import *... | edk2-master | BaseTools/Source/Python/Common/Parsing.py |
## @file
#
# This file is for build version number auto generation
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
gBUILD_VERSION = "Developer Build based on Revision: Unknown"
| edk2-master | BaseTools/Source/Python/Common/BuildVersion.py |
# # @file
# This file is used to parse and evaluate range expression in Pcd declaration.
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
# # Import Modules
#
from __future__ import print_function
from Common.GlobalData import *
from CommonDataCl... | edk2-master | BaseTools/Source/Python/Common/RangeExpression.py |
## @file
# This file is used to define common string related functions used in parsing process
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import re
from . import DataType
import... | edk2-master | BaseTools/Source/Python/Common/StringUtils.py |
## @file
# Override built in module os to provide support for long file path
#
# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
import os
from . import LongFilePathOsPath
from Common.LongFilePathSupport impo... | edk2-master | BaseTools/Source/Python/Common/LongFilePathOs.py |
## @file
# Python 'Common' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Common/__init__.py |
## @file
# manage multiple workspace file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import Common.LongFilePathOs as os
from Common.DataTyp... | edk2-master | BaseTools/Source/Python/Common/MultipleWorkspace.py |
## @file
# This file is used to define each component of tools_def.txt file
#
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.LongFilePathOs as os
import re
from . import... | edk2-master | BaseTools/Source/Python/Common/ToolDefClassObject.py |
## @file
# help with caching in BaseTools
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
## Import Modules
#
# for class function
class cached_class_function(object):
def __init__(self, function):
self._function = function
def __g... | edk2-master | BaseTools/Source/Python/Common/caching.py |
## @file
# This file is used to define common static strings used by INF/DEC/DSC files
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
# Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights r... | edk2-master | BaseTools/Source/Python/Common/DataType.py |
## @file
#
# This package manage the VPD PCD information file which will be generated
# by build tool's autogen.
# The VPD PCD information file will be input for third-party BPDG tool which
# is pointed by *_*_*_VPD_TOOL_GUID in conf/tools_def.txt
#
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.... | edk2-master | BaseTools/Source/Python/Common/VpdInfoFile.py |
## @file
# Standardized Error Handling infrastructures.
#
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
FILE_OPEN_FAILURE = 1
FILE_WRITE_FAILURE = 2
FILE_PARSE_FAILURE = 3
FILE_READ_FAILURE = 4
FILE_CREATE_FAILURE = 5
FILE_CHECKSUM_FAILURE = 6... | edk2-master | BaseTools/Source/Python/Common/BuildToolError.py |
## @file
# This file is used to parse and evaluate expression in directive or PCD value.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
## Import Modules
#
from __future__ import print_function
from __future__ import absolute_import
from Common... | edk2-master | BaseTools/Source/Python/Common/Expression.py |
## @file
# Override built in function file.open to provide support for long file path
#
# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import os
import platform
import shutil
import codecs
##
# OpenLongPath
# Convert a file path to a long file... | edk2-master | BaseTools/Source/Python/Common/LongFilePathSupport.py |
# # @file
#
# This file is used to handle the variable attributes and property information
#
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
class VariableAttributes(object):
EFI_VARIABLE_NON_VOLATILE = 0x00000001
EFI_VARIABLE_BOOTSERV... | edk2-master | BaseTools/Source/Python/Common/VariableAttributes.py |
## @file
# Override built in module os.path to provide support for long file path
#
# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import os
from Common.LongFilePathSupport import LongFilePath
def isfile(path):
return os.path.isfile(LongFilePath(... | edk2-master | BaseTools/Source/Python/Common/LongFilePathOsPath.py |
## @file
# Python 'Common.Uefi' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Common/Uefi/__init__.py |
## @file
# Module that encodes and decodes a EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER with
# a payload.
#
# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpCapsuleHeader
'''
import struct
import uuid
class FmpCapsuleImageHeaderClass (object... | edk2-master | BaseTools/Source/Python/Common/Uefi/Capsule/FmpCapsuleHeader.py |
## @file
# Module that encodes and decodes a EFI_FIRMWARE_IMAGE_AUTHENTICATION with
# certificate data and payload data.
#
# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpAuthHeader
'''
import struct
import uuid
class FmpAuthHeaderClass... | edk2-master | BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py |
## @file
# Python 'Common.Uefi.Capsule' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Common/Uefi/Capsule/__init__.py |
## @file
# Module that encodes and decodes a EFI_CAPSULE_HEADER with a payload
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
UefiCapsuleHeader
'''
import struct
import uuid
class UefiCapsuleHeaderClass (object):
# typedef struct {
# ... | edk2-master | BaseTools/Source/Python/Common/Uefi/Capsule/UefiCapsuleHeader.py |
## @file
# Module that encodes and decodes a capsule dependency.
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import struct
import json
import sys
import uuid
import re
'''
CapsuleDependency
'''
class OpConvert (object):
def __init__ (self):
... | edk2-master | BaseTools/Source/Python/Common/Uefi/Capsule/CapsuleDependency.py |
## @file
# Python 'Common.Edk2' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Common/Edk2/__init__.py |
## @file
# Python 'Common.Edk2.Capsule' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Common/Edk2/Capsule/__init__.py |
## @file
# Module that encodes and decodes a FMP_PAYLOAD_HEADER with a payload.
# The FMP_PAYLOAD_HEADER is processed by the FmpPayloadHeaderLib in the
# FmpDevicePkg.
#
# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
FmpPayloadHeader
'''
import s... | edk2-master | BaseTools/Source/Python/Common/Edk2/Capsule/FmpPayloadHeader.py |
## @file
# This file is used to create/update/query/erase table for Identifiers
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
from Common.Strin... | edk2-master | BaseTools/Source/Python/Table/TableIdentifier.py |
## @file
# This file is used to create/update/query/erase table for ECC reports
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import Common.Lon... | edk2-master | BaseTools/Source/Python/Table/TableReport.py |
## @file
# This file is used to create/update/query/erase table for data models
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import CommonData... | edk2-master | BaseTools/Source/Python/Table/TableDataModel.py |
## @file
# This file is used to create/update/query/erase table for functions
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
from Table.Table im... | edk2-master | BaseTools/Source/Python/Table/TableFunction.py |
from __future__ import absolute_import
## @file
# This file is used to create/update/query/erase table for dsc datas
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.EdkLogger as EdkLogger
import CommonDataCl... | edk2-master | BaseTools/Source/Python/Table/TableDsc.py |
## @file
# This file is used to create/update/query/erase table for files
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
from Table.Table import... | edk2-master | BaseTools/Source/Python/Table/TableFile.py |
## @file
# Python 'Table' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/Table/__init__.py |
## @file
# This file is used to create/update/query/erase table for dec datas
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import CommonDataCl... | edk2-master | BaseTools/Source/Python/Table/TableDec.py |
## @file
# This file is used to create/update/query/erase table for pcds
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
from Table.Table import ... | edk2-master | BaseTools/Source/Python/Table/TablePcd.py |
## @file
# This file is used to create/update/query/erase table for fdf datas
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import CommonDataCl... | edk2-master | BaseTools/Source/Python/Table/TableFdf.py |
## @file
# This file is used to create/update/query/erase table for Queries
#
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
from Common.StringUtils impo... | edk2-master | BaseTools/Source/Python/Table/TableQuery.py |
## @file
# This file is used to create/update/query/erase table for inf datas
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import CommonDataCl... | edk2-master | BaseTools/Source/Python/Table/TableInf.py |
## @file
# This file is used to create/update/query/erase a common table
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
import Common.EdkLogger as EdkLogger
## TableFile
#
# This class defined a common table
#
# @param ... | edk2-master | BaseTools/Source/Python/Table/Table.py |
## @file
# This file is used to create/update/query/erase table for ECC reports
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import absolute_import
import Common.EdkLogger as EdkLogger
import Common.Lon... | edk2-master | BaseTools/Source/Python/Table/TableEotReport.py |
## @file
# This file is used to define strings used in the BPDG tool
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
#string table starts here...
#strings are classified as following types
# MSG_...: it is a message string
# ERR_...: ... | edk2-master | BaseTools/Source/Python/BPDG/StringTable.py |
## @file
# This file include GenVpd class for fix the Vpd type PCD offset, and PcdEntry for describe
# and process each entry of vpd type PCD.
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
import ... | edk2-master | BaseTools/Source/Python/BPDG/GenVpd.py |
## @file
# Python 'BPDG' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/BPDG/__init__.py |
## @file
# Intel Binary Product Data Generation Tool (Intel BPDG).
# This tool provide a simple process for the creation of a binary file containing read-only
# configuration data for EDK II platforms that contain Dynamic and DynamicEx PCDs described
# in VPD sections. It also provide an option for specifying an al... | edk2-master | BaseTools/Source/Python/BPDG/BPDG.py |
## @file
# build a platform or a module
#
# Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.... | edk2-master | BaseTools/Source/Python/build/build.py |
## @file
# Python 'build' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/build/__init__.py |
## @file
# build a platform or a module
#
# Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2018 - 2020, Hewlett Packard Enterprise Development, L.P.<BR>
# Copyright (c) 2022, Loongson Technology Corporation L... | edk2-master | BaseTools/Source/Python/build/buildoptions.py |
## @file
# Routines for generating build report.
#
# This module contains the functionality to generate build report after
# build all target completes successfully.
#
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
## Import Modules
#
import js... | edk2-master | BaseTools/Source/Python/build/BuildReport.py |
## @file
# Python 'TargetTool' package initialization file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Source/Python/TargetTool/__init__.py |
## @file
# Target Tool Parser
#
# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import print_function
import Common.LongFilePathOs as os
import sys
import traceback
from optparse import OptionParser
import Common.EdkLogger a... | edk2-master | BaseTools/Source/Python/TargetTool/TargetTool.py |
## @file
# This file is used to define class Configuration
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
import Common.LongFilePathOs as os
import Common.EdkLogger as EdkLogger
from... | edk2-master | BaseTools/Source/Python/Ecc/Configuration.py |
## @file
# This file is used to parse exception items found by ECC tool
#
# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
# Import Modules
#
from __future__ import print_function
from __future__ import absolute_import
from Ecc.Xml.XmlRoutines... | edk2-master | BaseTools/Source/Python/Ecc/Exception.py |
## @file
# Standardized Error Handling infrastructures.
#
# Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
ERROR_GENERAL_CHECK_ALL = 1000
ERROR_GENERAL_CHECK_NO_TAB = 1001
ERROR_GENERAL_... | edk2-master | BaseTools/Source/Python/Ecc/EccToolError.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.