python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
## @file
# Run a makefile as part of a PREBUILD or POSTBUILD action.
#
# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
RunMakefile.py
'''
import os
import sys
import argparse
import subprocess
#
# Globals for help information
#
__prog__ = ... | edk2-master | BaseTools/Scripts/RunMakefile.py |
# @file FormatDosFiles.py
# This script format the source files to follow dos style.
# 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
import arg... | edk2-master | BaseTools/Scripts/FormatDosFiles.py |
## @file
# Update build revisions of the tools when performing a developer build
#
# This script will modife the C/Include/Common/BuildVersion.h file and the two
# Python scripts, Python/Common/BuildVersion.py and Python/UPT/BuildVersion.py.
# If SVN is available, the tool will obtain the current checked out version of... | edk2-master | BaseTools/Scripts/UpdateBuildVersions.py |
## @file
# Check a patch for various format issues
#
# Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.<BR>
# Copyright (C) 2020, Red Hat, Inc.<BR>
# Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import print_function
Ve... | edk2-master | BaseTools/Scripts/PatchCheck.py |
## @file
# Convert a binary file to a VOID* PCD value or DSC file VOID* PCD statement.
#
# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
BinToPcd
'''
from __future__ import print_function
import sys
import argparse
import re
import xdrlib
i... | edk2-master | BaseTools/Scripts/BinToPcd.py |
#!/usr/bin/python
## @file
# Firmware Configuration Editor (FCE) from https://firmware.intel.com/develop
# can parse BIOS image and generate Firmware Configuration file.
# This script bases on Firmware Configuration file, and generate the structure
# PCD setting in DEC/DSC/INF files.
#
# Copyright (c) 2018, Intel Corpo... | edk2-master | BaseTools/Scripts/ConvertFceToStructurePcd.py |
##
# Generate symbal for SMI handler profile info.
#
# This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry.
#
# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
from __future__ import print_function
import os
import re
import sys
fr... | edk2-master | BaseTools/Scripts/SmiHandlerProfileSymbolGen.py |
#!/usr/bin/python3
'''
Copyright 2021 (c) Apple Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
EFI gdb commands based on efi_debugging classes.
Example usage:
OvmfPkg/build.sh qemu -gdb tcp::9000
gdb -ex "target remote localhost:9000" -ex "source efi_gdb.py"
(gdb) help efi
Commands for debugg... | edk2-master | BaseTools/Scripts/efi_gdb.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Scripts/PackageDocumentTools/__init__.py |
## @file
# This module provide command line entry for generating package document!
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import print_function
import os, sys, logging, traceback, subprocess
from optparse import Opti... | edk2-master | BaseTools/Scripts/PackageDocumentTools/packagedoc_cli.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/__init__.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/__init__.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import print_function
import array
import uuid
import re
import os
import logging
import core.pe as pe
def GetLogger():
return logging.getLogger('EFI Binary File')... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/efibinary.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/__init__.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
def GetEdkLogger():
import logging
return logging.getLogger('edk')
class EdkException(Exception):
def __init__(self, message, fName=None, fNo=None):
self._message ... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/message.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import core.editor
class INIDoc(core.editor.EditorDocument):
def __init__(self):
core.editor.EditorDocument.__init__(self)
self._iniobj = None
class INIView(core... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/inidocview.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import print_function
from __future__ import absolute_import
import os
from .message import *
class BaseDoxygeItem:
def __init__(self, name, tag=''):
self... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/doxygen.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from __future__ import absolute_import
from .message import *
import re
import os
section_re = re.compile(r'^\[([\w., "]+)\]')
class BaseINIFile(object):
_objs = {}
def __new... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/basemodel/ini.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/__init__.py |
## @file
#
# This file produce action class to generate doxygen document for edk2 codebase.
# The action classes are shared by GUI and command line tools.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
from plugins.EdkPlugins.basemodel import... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/doxygengen_spec.py |
## @file
#
# This file produce action class to generate doxygen document for edk2 codebase.
# The action classes are shared by GUI and command line tools.
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
"""This file produce action class to gen... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/doxygengen.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
| edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/__init__.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from plugins.EdkPlugins.basemodel import ini
import re, os
from plugins.EdkPlugins.basemodel.message import *
class DECFile(ini.BaseINIFile):
def GetSectionInstance(self, parent,... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/dec.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from plugins.EdkPlugins.basemodel import ini
import re, os
from plugins.EdkPlugins.basemodel.message import *
class DSCFile(ini.BaseINIFile):
def GetSectionInstance(self, parent, ... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/dsc.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from plugins.EdkPlugins.basemodel import ini
import re, os
from plugins.EdkPlugins.basemodel.message import *
class INFFile(ini.BaseINIFile):
_libobjs = {}
def GetSectionInst... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/inf.py |
## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
from plugins.EdkPlugins.basemodel import ini
from plugins.EdkPlugins.edk2.model import dsc
from plugins.EdkPlugins.edk2.model import inf
from plugins.EdkPlugins.edk2.model import dec
imp... | edk2-master | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/baseobject.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/BhyveBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/IntelTdxBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/CloudHvBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/MicrovmBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
import subprocess
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBu... | edk2-master | OvmfPkg/PlatformCI/AmdSevBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
import io
from edk2toolext.environment import shell_environment
from edk2toolext.environment.uefi_build import UefiBuilder
from edk2toolext.invocables.edk2_pl... | edk2-master | OvmfPkg/PlatformCI/PlatformBuildLib.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/XenBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/QemuBuild.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | OvmfPkg/PlatformCI/PlatformBuild.py |
#
# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import os
import firmware_volume
import build_report
import system_table
# Reload external classes
reload(firmware_volume)
reload(build_report)
reload(system_table)
def readMem32(executionContext, add... | edk2-master | ArmPlatformPkg/Scripts/Ds5/edk2_debugger.py |
#
# Copyright (c) 2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from arm_ds.debugger_v1 import DebugException
import subprocess, os, edk2_debugger, re
def get_module_name(line):
path = line.rsplit(' ')[1]
return os.path.splitext(os.path.basename(path))[0]
def g... | edk2-master | ArmPlatformPkg/Scripts/Ds5/console_loader.py |
#
# Copyright (c) 2011-2021, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from arm_ds.debugger_v1 import Debugger
from arm_ds.debugger_v1 import DebugException
from console_loader import load_symbol_from_console
import re, sys, getopt
import edk2_debugger
# Reload external... | edk2-master | ArmPlatformPkg/Scripts/Ds5/cmd_load_symbols.py |
#!/usr/bin/python
#
# Copyright (c) 2014, ARM Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import getopt
import operator
import os
import pickle
import sys
from sys import argv
from cStringIO import StringIO
modules = {}
functions = {}
functions_addr = {}
def usage():
print... | edk2-master | ArmPlatformPkg/Scripts/Ds5/profile.py |
#
# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from arm_ds.debugger_v1 import DebugException
import struct
import string
import edk2_debugger
class EfiFileSection(object):
EFI_SECTION_PE32 = 0x10
EFI_SECTION_PIC ... | edk2-master | ArmPlatformPkg/Scripts/Ds5/firmware_volume.py |
#
# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import re
class BuildReport:
PCDs = {}
def parse_platform_summary(self, file):
pass
def parse_pcd_report(self, report_file):
pcd_reg = re.compile(" (\*P|\*F|\*M| ) (\w+)(\... | edk2-master | ArmPlatformPkg/Scripts/Ds5/build_report.py |
#
# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
from arm_ds.debugger_v1 import DebugException
import struct
import edk2_debugger
import firmware_volume
class DebugInfoTable:
CONST_DEBUG_INFO_TABLE_GUID = ( 0x49152E77L, 0x47641ADAL, 0xFE7AA2B7L,... | edk2-master | ArmPlatformPkg/Scripts/Ds5/system_table.py |
## @file
# This file contains the script to build UniversalPayload
#
# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import argparse
import subprocess
import os
import shutil
import sys
from ctypes import *
from Tools.ElfFv import ReplaceFv
sys.dont... | edk2-master | UefiPayloadPkg/UniversalPayloadBuild.py |
## @file
# This file is used to replace FV.
#
# Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
| edk2-master | UefiPayloadPkg/Tools/__init__.py |
## @file
# OBJCOPY parser, it's used to replace FV
#
# Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import argparse
from ctypes import *
import struct
class ElfSectionHeader64:
def __init__(self, sh_name, sh_type, sh_flags, sh_addr, sh_offset,... | edk2-master | UefiPayloadPkg/Tools/ElfFv.py |
## @file
# This python script update content from mipi_syst.h.in in mipi sys-T submodule
# and generate it as mipi_syst.h. mipi_syst.h include necessary data structure and
# definition that will be consumed by MipiSysTLib itself, mipi sys-T submodule
# and other library.
#
# This script needs to be done once by a ... | edk2-master | MdePkg/Library/MipiSysTLib/GenMipiSystH.py |
#!/usr/bin/python
#
# Copyright 2014 Apple Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import lldb
import os
import uuid
import string
import optparse
import shlex
guid_dict = {}
def EFI_GUID_TypeSummary (valobj,internal_dict):
""" Type summary for EFI GUID, print C Name if k... | edk2-master | EmulatorPkg/Unix/lldbefi.py |
# @file
# Script to Build EmulatorPkg UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
import io
from edk2toolext.environment import shell_environment
from edk2toolext.environment.uefi_build import UefiBuilder
from edk2toolext.invocables.... | edk2-master | EmulatorPkg/PlatformCI/PlatformBuild.py |
# @file
#
# Copyright (c) Microsoft Corporation.
# Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
# Copyright (c) 2020 - 2021, ARM Limited. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
from edk2toolext.environment import she... | edk2-master | .pytool/CISettings.py |
# @file dependency_check.py
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2toollib.uefi.edk2.parsers.inf_parser import InfParser
from edk2toolext.environment.var_... | edk2-master | .pytool/Plugin/DependencyCheck/DependencyCheck.py |
# @file LibraryClassCheck.py
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2toollib.uefi.edk2.parsers.dec_parser import DecParser
from edk2toollib.uefi.edk2.parser... | edk2-master | .pytool/Plugin/LibraryClassCheck/LibraryClassCheck.py |
# @file HostUnitTestDscCompleteCheck.py
#
# This is a copy of DscCompleteCheck with different filtering logic.
# It should be discussed if this should be one plugin
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
from edk2toolext.environment.plugintype... | edk2-master | .pytool/Plugin/HostUnitTestDscCompleteCheck/HostUnitTestDscCompleteCheck.py |
# @file GuidCheck.py
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2toollib.uefi.edk2.guid_list import GuidList
from edk2toolext.environment.var_dict import VarDict
class ... | edk2-master | .pytool/Plugin/GuidCheck/GuidCheck.py |
# @file SpellCheck.py
#
# An edk2-pytool based plugin wrapper for cspell
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import json
import yaml
from io import StringIO
import os
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from... | edk2-master | .pytool/Plugin/SpellCheck/SpellCheck.py |
# @file HostUnitTestCompilerPlugin.py
##
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
import re
from edk2toollib.uefi.edk2.parsers.dsc_parser import DscParser
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2too... | edk2-master | .pytool/Plugin/HostUnitTestCompilerPlugin/HostUnitTestCompilerPlugin.py |
# @file CharEncodingCheck.py
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2toolext.environment.var_dict import VarDict
##
# map
##
EcodingMap = {
".md": 'u... | edk2-master | .pytool/Plugin/CharEncodingCheck/CharEncodingCheck.py |
# @file CompilerPlugin.py
##
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
import re
from edk2toollib.uefi.edk2.parsers.dsc_parser import DscParser
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2toolext.environ... | edk2-master | .pytool/Plugin/CompilerPlugin/CompilerPlugin.py |
# @file LicenseCheck.py
#
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import shutil
import logging
import re
from io import StringIO
from typing import List, Tuple
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildP... | edk2-master | .pytool/Plugin/LicenseCheck/LicenseCheck.py |
# @file UncrustifyCheck.py
#
# An edk2-pytool based plugin wrapper for Uncrustify
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import configparser
import difflib
import errno
import logging
import os
import pathlib
import shutil
import timeit
from edk2toolext.environment im... | edk2-master | .pytool/Plugin/UncrustifyCheck/UncrustifyCheck.py |
# @file EccCheck.py
#
# Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import shutil
import re
import csv
import xml.dom.minidom
from typing import List, Dict, Tuple
import logging
f... | edk2-master | .pytool/Plugin/EccCheck/EccCheck.py |
# @file DscCompleteCheck.py
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
from edk2toollib.uefi.edk2.parsers.dsc_parser import DscParser
from edk2toollib.uefi.edk2.parsers... | edk2-master | .pytool/Plugin/DscCompleteCheck/DscCompleteCheck.py |
## @ SplitFspBin.py
#
# Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import sys
import uuid
import copy
import struct
import argparse
from ctypes import *
from functools import reduce
"""
This utility supports some operations fo... | edk2-master | IntelFsp2Pkg/Tools/SplitFspBin.py |
#!/usr/bin/env python
## @ FspDscBsf2Yaml.py
# This script convert DSC or BSF format file into YAML format
#
# Copyright(c) 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import re
import sys
from collections import OrderedDict
from datetime import date... | edk2-master | IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py |
## @ PatchFv.py
#
# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import re
import sys
#
# Read data from file
#
# param [in] binfile Binary file
# param [in] offset Offset
# param [in] len Length
#
# retva... | edk2-master | IntelFsp2Pkg/Tools/PatchFv.py |
## @ GenCfgOpt.py
#
# Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import re
import sys
import struct
from datetime import date
from functools import reduce
# Generated file copyright header
__copyright_txt__ = """## @file
#
# ... | edk2-master | IntelFsp2Pkg/Tools/GenCfgOpt.py |
# @ GenCfgData.py
#
# Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import re
import sys
import marshal
from functools import reduce
from datetime import date
# Generated file copyright header
__copyright_tmp__ = """/** @file
C... | edk2-master | IntelFsp2Pkg/Tools/FspGenCfgData.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 struct as st
import filecmp
import os, sys
currentd... | edk2-master | IntelFsp2Pkg/Tools/Tests/test_yaml.py |
#!/usr/bin/env python
# @ SingleSign.py
# Single signing script
#
# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import sys
import re
import shutil
import subprocess
SIGNING_KEY = {
# Key Id | Ke... | edk2-master | IntelFsp2Pkg/Tools/ConfigEditor/SingleSign.py |
# @ GenYamlCfg.py
#
# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#
import os
import sys
import re
import marshal
import string
import operator as op
import ast
import tkinter.messagebox as messagebox
import tkinter
from datetime import date
... | edk2-master | IntelFsp2Pkg/Tools/ConfigEditor/GenYamlCfg.py |
#!/usr/bin/env python
# @ CommonUtility.py
# Common utility script
#
# Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import sys
import shutil
import subprocess
import string
from ctypes import ARRAY, c_char, c_uint16, c_uint32, \
... | edk2-master | IntelFsp2Pkg/Tools/ConfigEditor/CommonUtility.py |
# @ ConfigEditor.py
#
# Copyright(c) 2018 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
import os
import sys
import marshal
import tkinter
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog
from pickle imp... | edk2-master | IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py |
## @file
# Automate the process of building the various reset vector types
#
# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import glob
import os
import subprocess
import sys
def RunCommand(commandLine):
#print ' '.join(commandLine)
retu... | edk2-master | IntelFsp2Pkg/FspSecCore/Vtf0/Build.py |
## @file
# Apply fixup to VTF binary image for FFS Raw section
#
# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import sys
filename = sys.argv[1]
if filename.lower().find('ia32') >= 0:
d = open(sys.argv[1], 'rb').read()
c = ((len(d) + 4... | edk2-master | IntelFsp2Pkg/FspSecCore/Vtf0/Tools/FixupForRawSection.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | ArmVirtPkg/PlatformCI/QemuKernelBuild.py |
# @file
# Script to Build ArmVirtPkg UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import logging
import io
from edk2toolext.environment import shell_environment
from edk2toolext.environment.uefi_build import UefiBuilder
from edk2toolext.invocables.e... | edk2-master | ArmVirtPkg/PlatformCI/PlatformBuildLib.py |
# @file
# Script to Build OVMF UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
# #####... | edk2-master | ArmVirtPkg/PlatformCI/QemuBuild.py |
# @file
# Script to Build ArmVirtPkg UEFI firmware
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from PlatformBuildLib import SettingsManager
from PlatformBuildLib import PlatformBuilder
#... | edk2-master | ArmVirtPkg/PlatformCI/KvmToolBuild.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | setup.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | runner/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | runner/tao_deploy.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | internal/encrypt_onnx.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | internal/decrypt_onnx.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | release/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | release/python/version.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | release/python/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | release/python/utils/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | release/python/utils/utils.py |
#!/usr/bin/python
import sys
import re
from submodules.rules import rules
def main():
with open(sys.argv[1], "r") as fp:
lines = fp.readlines()
for idx, line in enumerate(lines):
if line.strip() == "# ------------------------ >8 ------------------------":
break
if line[0] == "#":
continue
if... | tao_deploy-main | scripts/git-hooks/commit-msg.py |
tao_deploy-main | scripts/git-hooks/submodules/__init__.py | |
rules = """
# Failing to add message in the mentioned format will
# cause your local commit fail.
#
# Please follow these rules for commit messages:
# ==============================================
# 1. Commit message format - first line is mandatory
# [YOUR_MODULE_NAME] Subject line here not exceeding 50 characters... | tao_deploy-main | scripts/git-hooks/submodules/rules.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/metrics/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/metrics/semantic_segmentation_metric.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/metrics/kitti_metric.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/metrics/coco_metric.py |
# Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved.
"""EULA for TAO DEPLOY."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
| tao_deploy-main | nvidia_tao_deploy/license/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/utils/image_batcher.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/utils/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/utils/decoding.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/utils/path_utils.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_deploy-main | nvidia_tao_deploy/cv/__init__.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.