X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FGenFds%2FSection.py;h=b2389566349855b8bedb9f22d5dbfa99c9ba968d;hp=19a70009dccea4cd157017137aea3a1a9dcc75a5;hb=04797875d1d53e53e31eca4fa01bc3cf6929f39c;hpb=bfa65b61dde887a9586e070101202bd37e3221fd diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 19a70009dc..b238956634 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -3,13 +3,7 @@ # # Copyright (c) 2007-2018, Intel Corporation. All rights reserved.
# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -112,7 +106,7 @@ class Section (SectionClassObject): # @param Dict dictionary contains macro and its value # @retval tuple (File list, boolean) # - def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False): + def GetFileList(FfsInf, FileType, FileExtension, Dict = None, IsMakefile=False, SectionType=None): IsSect = FileType in Section.SectFileType if FileExtension is not None: @@ -131,7 +125,7 @@ class Section (SectionClassObject): if File.Type == FileType or (int(FfsInf.PiSpecVersion, 16) >= 0x0001000A \ and FileType == 'DXE_DPEX' and File.Type == BINARY_FILE_TYPE_SMM_DEPEX) \ or (FileType == BINARY_FILE_TYPE_TE and File.Type == BINARY_FILE_TYPE_PE32): - if '*' in FfsInf.TargetOverrideList or File.Target == '*' or File.Target in FfsInf.TargetOverrideList or FfsInf.TargetOverrideList == []: + if TAB_STAR in FfsInf.TargetOverrideList or File.Target == TAB_STAR or File.Target in FfsInf.TargetOverrideList or FfsInf.TargetOverrideList == []: FileList.append(FfsInf.PatchEfiFile(File.Path, File.Type)) else: GenFdsGlobalVariable.InfLogger ("\nBuild Target \'%s\' of File %s is not in the Scope of %s specified by INF %s in FDF" %(File.Target, File.File, FfsInf.TargetOverrideList, FfsInf.InfFileName)) @@ -140,6 +134,11 @@ class Section (SectionClassObject): else: GenFdsGlobalVariable.InfLogger ("\nCurrent ARCH \'%s\' of File %s is not in the Support Arch Scope of %s specified by INF %s in FDF" %(FfsInf.CurrentArch, File.File, File.Arch, FfsInf.InfFileName)) + elif FileType is None and SectionType == BINARY_FILE_TYPE_RAW: + for File in FfsInf.BinFileList: + if File.Ext == Suffix: + FileList.append(File.Path) + if (not IsMakefile and Suffix is not None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix is not None): # # Get Makefile path and time stamp