python_code
stringlengths
0
679k
repo_name
stringlengths
9
41
file_path
stringlengths
6
149
## @file # This file is used to define checkpoints used by ECC tool # # Copyright (c) 2021, Arm Limited. All rights reserved.<BR> # Copyright (c) 2008 - 2020, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import import Common.LongFilePathOs ...
edk2-master
BaseTools/Source/Python/Ecc/Check.py
## @file # This file is used to create a database used by ECC tool # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __future__ import absolute_import import sqlite3 import Common.LongFilePathOs as os, time import Com...
edk2-master
BaseTools/Source/Python/Ecc/Database.py
## @file # fragments of source file # # 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 import Common.LongFilePathOs as os from Ecc.ParserWarning import Warning from Commo...
edk2-master
BaseTools/Source/Python/Ecc/FileProfile.py
## @file # Python 'Ecc' 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/Ecc/__init__.py
## @file # This file is used to be the c coding style checking of ECC tool # # Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2020, Arm Limited. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import print_function from __future__ import...
edk2-master
BaseTools/Source/Python/Ecc/c.py
## @file # This file is used to save global datas used by ECC tool # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import Common.LongFilePathOs as os gWorkspace = '' gTarget = '' gConfig = None gDb = None gIdentifierTabl...
edk2-master
BaseTools/Source/Python/Ecc/EccGlobalData.py
## @file # This file is used to be the warning class of ECC tool # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## The exception class that used to report error messages when preprocessing # # Currently the "ToolName" is set to be "ECC PP". #...
edk2-master
BaseTools/Source/Python/Ecc/ParserWarning.py
## @file # preprocess source file # # Copyright (c) 2007 - 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 import re import Common.LongFilePathOs as os import sys i...
edk2-master
BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
## @file # fragments of source file # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## The description of comment contents and start & end position # # class Comment : ## The constructor # # @param self The object po...
edk2-master
BaseTools/Source/Python/Ecc/CodeFragment.py
## @file # This file is used to define common parser functions for meta-data # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import import Common.LongFilePathOs as os from CommonDataClass.DataClass import * from...
edk2-master
BaseTools/Source/Python/Ecc/MetaDataParser.py
## @file # This file is used to be the main entrance of ECC tool # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> # Copyright (c) Microsoft Corporation.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __future__ import absolute_import import Common.LongFilePath...
edk2-master
BaseTools/Source/Python/Ecc/EccMain.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/Ecc/MetaFileWorkspace/__init__.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 import E...
edk2-master
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileTable.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 print_function import Common.LongFilePathOs as os import Common.EdkLogger a...
edk2-master
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py
## @file # This file is used to parse meta files # # Copyright (c) 2008 - 2020, 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 import time import copy from hashlib imp...
edk2-master
BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53 from antlr3 import * from antlr3.compat import set, frozenset ## @file # The file defines the Lexer for C source files. # # THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # # Copyright (c) 2009 - 2018, ...
edk2-master
BaseTools/Source/Python/Ecc/CParser3/CLexer.py
edk2-master
BaseTools/Source/Python/Ecc/CParser3/__init__.py
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53 from __future__ import print_function from __future__ import absolute_import from antlr3 import * from antlr3.compat import set, frozenset ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is g...
edk2-master
BaseTools/Source/Python/Ecc/CParser3/CParser.py
## @file # This is an XML API that uses a syntax similar to XPath, but it is written in # standard python so that no extra python packages are required to use it. # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __fut...
edk2-master
BaseTools/Source/Python/Ecc/Xml/XmlRoutines.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 # ''' Xml '''
edk2-master
BaseTools/Source/Python/Ecc/Xml/__init__.py
# Generated from C.g4 by ANTLR 4.7.1 from antlr4 import * from io import StringIO from typing.io import TextIO import sys ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # # Co...
edk2-master
BaseTools/Source/Python/Ecc/CParser4/CLexer.py
edk2-master
BaseTools/Source/Python/Ecc/CParser4/__init__.py
# Generated from C.g4 by ANTLR 4.7.1 # encoding: utf-8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. # This file is generated by running: # java org.ant...
edk2-master
BaseTools/Source/Python/Ecc/CParser4/CParser.py
# Generated from C.g4 by ANTLR 4.7.1 from antlr4 import * if __name__ is not None and "." in __name__: from .CParser import CParser else: from CParser import CParser ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. # This file is gen...
edk2-master
BaseTools/Source/Python/Ecc/CParser4/CListener.py
## @file # classes represent data in FDF # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## FD data in FDF # # class FDClassObject: ## The constructor # # @param self The object pointer # def __init__(self): ...
edk2-master
BaseTools/Source/Python/CommonDataClass/FdfClass.py
## @file # This file is used to define class for data structure used in ECC # # Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## # Import Modules # import Common.EdkLogger as EdkLogger ## # Static values for data models # MODEL_UNKNOWN = 0 MODEL...
edk2-master
BaseTools/Source/Python/CommonDataClass/DataClass.py
## @file # Python 'CommonDataClass' 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/CommonDataClass/__init__.py
## @file # This file is used to define common items of class object # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## SkuInfoClass # # This class defined SkuInfo item used in Module/Platform/Package files # # @param object: Inherited...
edk2-master
BaseTools/Source/Python/CommonDataClass/CommonClass.py
## @file # This file is used to define common Exceptions class used in python tools # # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## Exceptions used in Expression class EvaluationException(Exception): pass class BadExpression(EvaluationException...
edk2-master
BaseTools/Source/Python/CommonDataClass/Exceptions.py
## @file # Routines for generating Pcd Database # # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import from io import BytesIO from Common.Misc import * from Common.StringUtils import StringToArray from struct imp...
edk2-master
BaseTools/Source/Python/AutoGen/GenPcdDb.py
## @file # Routines for generating AutoGen.h and AutoGen.c # # 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 string import collections import struct from Common import EdkLogger f...
edk2-master
BaseTools/Source/Python/AutoGen/GenC.py
## @file # This file is used to collect all defined strings in multiple uni files # # # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR> # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## # Import Modules # from __future__ import...
edk2-master
BaseTools/Source/Python/AutoGen/UniClassObject.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## Import Modules # from __future__ import absolute_import import Common.Lo...
edk2-master
BaseTools/Source/Python/AutoGen/GenMake.py
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # # This file is used to collect the Variable checking information # # # # Import Modules # import os from Common.RangeExpression import RangeExpression from Common.Misc import * from io import Byte...
edk2-master
BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import from Workspace.WorkspaceDatabase import WorkspaceDatabase,BuildDB from Common.caching import cached_prop...
edk2-master
BaseTools/Source/Python/AutoGen/ModuleAutoGenHelper.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import from Workspace.WorkspaceDatabase import BuildDB from Workspace.WorkspaceCommon import GetModuleLibInstances imp...
edk2-master
BaseTools/Source/Python/AutoGen/DataPipe.py
## @file # Python 'AutoGen' 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 # __all__ = ["AutoGen"]
edk2-master
BaseTools/Source/Python/AutoGen/__init__.py
# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # # This file is used to collect the Variable checking information # # # # Import Modules # from struct import pack, unpack import collections import copy from Common.VariableAttributes import Varia...
edk2-master
BaseTools/Source/Python/AutoGen/GenVar.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import import multiprocessing as mp import threading from Common.Misc import PathClass from AutoGen.ModuleAutoGen impo...
edk2-master
BaseTools/Source/Python/AutoGen/AutoGenWorker.py
## @file # Generate AutoGen.h, AutoGen.c and *.depex files # # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR> # Copyright (c) 2019, American Megatrends, Inc. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-...
edk2-master
BaseTools/Source/Python/AutoGen/AutoGen.py
## @file # Build cache intermediate result and state # # Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2020, ARM Limited. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from Common.caching import cached_property import Common.EdkLogger as EdkLogger imp...
edk2-master
BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
## @file # This file is used to collect all defined strings in Image Definition files # # Copyright (c) 2016, 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.BuildToo...
edk2-master
BaseTools/Source/Python/AutoGen/IdfClassObject.py
## @file # The engine for building files # # Copyright (c) 2007 - 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 re import copy import string from Common.LongFilePat...
edk2-master
BaseTools/Source/Python/AutoGen/BuildEngine.py
## @file # Parser a Inf file and Get specify section data. # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## Import Modules # import Common.EdkLogger as EdkLogger from Common.BuildToolError import * from Common.DataType import * class InfS...
edk2-master
BaseTools/Source/Python/AutoGen/InfSectionParser.py
## @file # This file is used to generate DEPEX file for module's dependency expression # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## Import Modules # import sys import Common.LongFilePathOs as os import re import traceback from Common.LongF...
edk2-master
BaseTools/Source/Python/AutoGen/GenDepex.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import absolute_import from AutoGen.AutoGen import AutoGen from Common.LongFilePathSupport import LongFilePath, CopyLongFilePath from ...
edk2-master
BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2020, ARM Limited. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## Import Modules # from __future__ import print_function from __future__ import ...
edk2-master
BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
## @file # Create makefile for MS nmake and GNU make # # Copyright (c) 2019, 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 os.path as path import hashlib from collectio...
edk2-master
BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
## @file # This file is used to parse a strings file and create or add to a string database # file. # # 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 import Common.EdkLogger as...
edk2-master
BaseTools/Source/Python/AutoGen/StrGather.py
## @file # This tool adds EFI_FIRMWARE_IMAGE_AUTHENTICATION for a binary. # # This tool only support CertType - EFI_CERT_TYPE_PKCS7_GUID # {0x4aafd29d, 0x68df, 0x49ee, {0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7}} # # This tool has been tested with OpenSSL. # # Copyright (c) 2016 - 2017, Intel Corporation. All ri...
edk2-master
BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py
## @file # This file is used to parse INF file of EDK project # # Copyright (c) 2008 - 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 import Common.LongFilePathOs as o...
edk2-master
BaseTools/Source/Python/Eot/InfParserLite.py
## @file # This file is used to create a database used by EOT tool # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import sqlite3 import Common.LongFilePathOs as os, time import Common.EdkLogger as EdkLogger import Commo...
edk2-master
BaseTools/Source/Python/Eot/Database.py
## @file # fragments of source file # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __future__ import absolute_import import re import Common.LongFilePathOs as os from .ParserWarning import Warning from Common.L...
edk2-master
BaseTools/Source/Python/Eot/FileProfile.py
## @file # Python 'Eot' 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/Eot/__init__.py
## @file # This file is used to define common parsing related functions used in parsing # Inf/Dsc/Makefile 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 import Common.LongF...
edk2-master
BaseTools/Source/Python/Eot/Parser.py
## @file # This file is used to save global datas # # Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # from collections import OrderedDict from Common.LongFilePathSupport import OpenLongFilePath as open gEFI_SOURCE = '' gEDK_SOURCE = '' gWORKSPACE...
edk2-master
BaseTools/Source/Python/Eot/EotGlobalData.py
## @file # preprocess source 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 sys import Common.LongFilePathOs as os import re fr...
edk2-master
BaseTools/Source/Python/Eot/c.py
## @file # Warning information of Eot # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # class Warning (Exception): ## The constructor # # @param self The object pointer # @param Str The message to record ...
edk2-master
BaseTools/Source/Python/Eot/ParserWarning.py
## @file # preprocess source file # # Copyright (c) 2007 - 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 import re import Common.LongFilePathOs as os import sys i...
edk2-master
BaseTools/Source/Python/Eot/CodeFragmentCollector.py
## @file # This file is used to be the main entrance of EOT tool # # 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.LongFilePathOs as os, time, glob import Common.EdkLogge...
edk2-master
BaseTools/Source/Python/Eot/EotMain.py
## @file # Standardized Error Handling infrastructures. # # Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # # Error id ERROR_1 = 1000 # Error message gEccErrorMessage = { ERROR_1 : "RESERVED" }
edk2-master
BaseTools/Source/Python/Eot/EotToolError.py
## @file # This file is used to define the identification of INF/DEC/DSC files # # Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## Identification # # This class defined basic Identification information structure which is used by INF/DEC/DSC files # # @p...
edk2-master
BaseTools/Source/Python/Eot/Identification.py
## @file # fragments of source file # # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## The description of comment contents and start & end position # # class Comment : ## The constructor # # @param self The object po...
edk2-master
BaseTools/Source/Python/Eot/CodeFragment.py
## @file # This file is used to create report for Eot tool # # 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.LongFilePathOs as os from . import EotGlobalData from Common....
edk2-master
BaseTools/Source/Python/Eot/Report.py
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53 from antlr3 import * from antlr3.compat import set, frozenset ## @file # The file defines the Lexer for C source files. # # THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # # Copyright (c) 2009 - 2018, ...
edk2-master
BaseTools/Source/Python/Eot/CParser3/CLexer.py
edk2-master
BaseTools/Source/Python/Eot/CParser3/__init__.py
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53 from __future__ import print_function from __future__ import absolute_import from antlr3 import * from antlr3.compat import set, frozenset ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # This file is g...
edk2-master
BaseTools/Source/Python/Eot/CParser3/CParser.py
# Generated from C.g4 by ANTLR 4.7.1 from antlr4 import * from io import StringIO from typing.io import TextIO import sys ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. # This file is generated by running: # java org.antlr.Tool C.g # # Co...
edk2-master
BaseTools/Source/Python/Eot/CParser4/CLexer.py
edk2-master
BaseTools/Source/Python/Eot/CParser4/__init__.py
# Generated from C.g4 by ANTLR 4.7.1 # encoding: utf-8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. # This file is generated by running: # java org.ant...
edk2-master
BaseTools/Source/Python/Eot/CParser4/CParser.py
# Generated from C.g4 by ANTLR 4.7.1 from antlr4 import * if __name__ is not None and "." in __name__: from .CParser import CParser else: from CParser import CParser ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE. # This file is gen...
edk2-master
BaseTools/Source/Python/Eot/CParser4/CListener.py
## @file # Python 'GenPatchPcdTable' 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/GenPatchPcdTable/__init__.py
## @file # Generate PCD table for 'Patchable In Module' type PCD with given .map file. # The Patch PCD table like: # # PCD Name Offset in binary # ======== ================ # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # # #====...
edk2-master
BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
## @file # This tool encodes and decodes GUIDed FFS sections or FMP capsule for a GUID type of # EFI_CERT_TYPE_RSA2048_SHA256_GUID defined in the UEFI 2.4 Specification as # {0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf}} # This tool has been tested with OpenSSL 1.0.1e 11 Feb 2013 # # C...
edk2-master
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256Sign.py
## @file # This tool can be used to generate new RSA 2048 bit private/public key pairs # in a PEM file format using OpenSSL command line utilities that are installed # on the path specified by the system environment variable OPENSSL_PATH. # This tool can also optionally write one or more SHA 256 hashes of 2048 bit # pu...
edk2-master
BaseTools/Source/Python/Rsa2048Sha256Sign/Rsa2048Sha256GenerateKeys.py
## @file # package and install PyEfiCompressor extension # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from distutils.core import setup, Extension import os if 'BASE_TOOLS_PATH' not in os.environ: raise "Please define...
edk2-master
BaseTools/Source/C/PyEfiCompressor/setup.py
# @file NmakeSubdirs.py # This script support parallel build for nmake in windows environment. # It supports Python2.x and Python3.x both. # # Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # # # Import Modules # from __future__ import print_function...
edk2-master
BaseTools/Source/C/Makefiles/NmakeSubdirs.py
## @file # Unit tests for AutoGen.UniClassObject # # Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import os import unittest import codecs import TestTools from Common.Misc import PathClass import AutoGen.UniClassObject as...
edk2-master
BaseTools/Tests/CheckUnicodeSourceFiles.py
## @file # Unit tests for checking syntax of Python source code # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import os import unittest import py_compile import TestTools class Tests(TestTools.BaseToolsTest): ...
edk2-master
BaseTools/Tests/CheckPythonSyntax.py
from __future__ import print_function ## @file # Utility functions and classes for BaseTools unit tests # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import base64 import os import os.path import random import shuti...
edk2-master
BaseTools/Tests/TestTools.py
## @file # Test whether PYTHON_COMMAND is available and the # minimum Python version is installed. # # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # import sys if __name__ == '__main__': # Check if the major and minor versions required were...
edk2-master
BaseTools/Tests/PythonTest.py
## @file # Unit tests for TianoCompress utility # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __future__ import print_function import os import random import sys import unittest import TestTools class Tests(TestTool...
edk2-master
BaseTools/Tests/TianoCompress.py
## @file # Routines for generating Pcd Database # # Copyright (c) 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent import unittest from Common.Misc import RemoveCComments from Workspace.BuildClassObject import ArrayIndex class TestRe(unittest.TestCase): def test_cco...
edk2-master
BaseTools/Tests/TestRegularExpression.py
## @file # Unit tests for Python based BaseTools # # Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import os import sys import unittest def TheTestSuite(): suites = [] import CheckPythonSyntax suites.appen...
edk2-master
BaseTools/Tests/PythonToolsTests.py
## @file # Unit tests for C based BaseTools # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import os import sys import unittest import TianoCompress modules = ( TianoCompress, ) def TheTestSuite(): suites = l...
edk2-master
BaseTools/Tests/CToolsTests.py
## @file # Unit tests for BaseTools utilities # # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # import os import sys import unittest import TestTools def GetCTestSuite(): import CToolsTests return CToolsTests.TheTest...
edk2-master
BaseTools/Tests/RunTests.py
## # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: BSD-2-Clause-Patent ## import os import logging import json try: from edk2toolext.environment.plugintypes.uefi_build_plugin import IUefiBuildPlugin class BuildToolsReportGenerator(IUefiBuildPlugin): def do_report(self, thebuilder): ...
edk2-master
BaseTools/Plugin/BuildToolsReport/BuildToolsReportGenerator.py
# @file LinuxGcc5ToolChain.py # Plugin to configures paths for GCC5 ARM/AARCH64 Toolchain ## # This plugin works in conjuncture with the tools_def # # Copyright (c) Microsoft Corporation # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> # Copyright (c) 2022, Loongson Technology C...
edk2-master
BaseTools/Plugin/LinuxGcc5ToolChain/LinuxGcc5ToolChain.py
# @file WindowsVsToolChain.py # Plugin to configures paths for the VS2017 and VS2019 tool chain ## # This plugin works in conjuncture with the tools_def # # Copyright (c) Microsoft Corporation # SPDX-License-Identifier: BSD-2-Clause-Patent ## import os import logging from edk2toolext.environment.plugintypes.uefi_build_...
edk2-master
BaseTools/Plugin/WindowsVsToolChain/WindowsVsToolChain.py
## @file WinRcPath.py # Plugin to find Windows SDK Resource Compiler rc.exe ## # This plugin works in conjuncture with the tools_def to support rc.exe # # Copyright (c) Microsoft Corporation # SPDX-License-Identifier: BSD-2-Clause-Patent ## import os from edk2toolext.environment.plugintypes.uefi_build_plugin import IUe...
edk2-master
BaseTools/Plugin/WindowsResourceCompiler/WinRcPath.py
# @file HostBasedUnitTestRunner.py # Plugin to located any host-based unit tests in the output directory and execute them. ## # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: BSD-2-Clause-Patent # ## import os import logging import glob import stat import xml.etree.ElementTree from edk2toolext.environm...
edk2-master
BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py
## @file # Detect unreferenced PCD and GUID/Protocols/PPIs. # # Copyright (c) 2019, Intel Corporation. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # ''' DetectNotUsedItem ''' import re import os import sys import argparse # # Globals for help information # __prog__ = 'DetectNotUsedItem' __ve...
edk2-master
BaseTools/Scripts/DetectNotUsedItem.py
#!/usr/bin/python3 ''' Copyright (c) Apple Inc. 2021 SPDX-License-Identifier: BSD-2-Clause-Patent Class that abstracts PE/COFF debug info parsing via a Python file like object. You can port this code into an arbitrary debugger by invoking the classes and passing in a file like object that abstracts the debugger readin...
edk2-master
BaseTools/Scripts/efi_debugging.py
## @file # Retrieves the people to request review from on submission of a commit. # # Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import print_function from collections import defaultdict from collections import OrderedDict import argpa...
edk2-master
BaseTools/Scripts/GetMaintainer.py
#!/usr/bin/python3 ''' Copyright (c) Apple Inc. 2021 SPDX-License-Identifier: BSD-2-Clause-Patent Example usage: OvmfPkg/build.sh qemu -gdb tcp::9000 lldb -o "gdb-remote localhost:9000" -o "command script import efi_lldb.py" ''' import optparse import shlex import subprocess import uuid import sys import os from path...
edk2-master
BaseTools/Scripts/efi_lldb.py
# @file ConvertMasmToNasm.py # This script assists with conversion of MASM assembly syntax to NASM # # Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import print_function # # Import Modules # import argparse import io import...
edk2-master
BaseTools/Scripts/ConvertMasmToNasm.py
## @file # Check a patch for various format issues # # Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import print_function VersionNumber = '0.1' __copyright__ = "Copyright (c) 2015, Intel Corporation All rights reserved." import...
edk2-master
BaseTools/Scripts/ConvertUni.py
## @file # Get current UTC date and time information and output as ascii code. # # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # VersionNumber = '0.1' import sys import datetime import argparse def Main(): PARSER = argparse.ArgumentParser( ...
edk2-master
BaseTools/Scripts/GetUtcDateTime.py
## # Generate symbal for memory profile info. # # This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry. # # Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## from __future__ import print_function import os import re import sys ...
edk2-master
BaseTools/Scripts/MemoryProfileSymbolGen.py
## @file # Set up the git configuration for contributing to TianoCore projects # # Copyright (c) 2019, Linaro Ltd. All rights reserved.<BR> # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # from __future__ import print_function import argparse impo...
edk2-master
BaseTools/Scripts/SetupGit.py