X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FGenFds%2FOptionRom.py;h=2e61a38c1d333693bbb3912c4c770c7cfd586e26;hp=7886a7cfe73e6b639d30b5d50c13aec4acc61620;hb=37de70b764200718cc39a21abc491c335e3da7b3;hpb=b37b108d92aa08cc7eed5f52feea53b0e7563068 diff --git a/BaseTools/Source/Python/GenFds/OptionRom.py b/BaseTools/Source/Python/GenFds/OptionRom.py index 7886a7cfe7..2e61a38c1d 100644 --- a/BaseTools/Source/Python/GenFds/OptionRom.py +++ b/BaseTools/Source/Python/GenFds/OptionRom.py @@ -1,7 +1,7 @@ ## @file # process OptionROM generation # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2017, 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 @@ -49,9 +49,9 @@ class OPTIONROM (OptionRomClassObject): # @param Buffer The buffer generated OptROM data will be put # @retval string Generated OptROM file path # - def AddToBuffer (self, Buffer) : - - GenFdsGlobalVariable.InfLogger( "\nGenerating %s Option ROM ..." %self.DriverName) + def AddToBuffer (self, Buffer, Flag=False) : + if not Flag: + GenFdsGlobalVariable.InfLogger( "\nGenerating %s Option ROM ..." %self.DriverName) EfiFileList = [] BinFileList = [] @@ -60,7 +60,7 @@ class OPTIONROM (OptionRomClassObject): for FfsFile in self.FfsList : if isinstance(FfsFile, OptRomInfStatement.OptRomInfStatement): - FilePathNameList = FfsFile.GenFfs() + FilePathNameList = FfsFile.GenFfs(IsMakefile=Flag) if len(FilePathNameList) == 0: EdkLogger.error("GenFds", GENFDS_ERROR, "Module %s not produce .efi files, so NO file could be put into option ROM." % (FfsFile.InfFileName)) if FfsFile.OverrideAttribs == None: @@ -79,10 +79,11 @@ class OPTIONROM (OptionRomClassObject): FfsFile.OverrideAttribs.PciClassCode, FfsFile.OverrideAttribs.PciRevision, FfsFile.OverrideAttribs.PciDeviceId, - FfsFile.OverrideAttribs.PciVendorId) + FfsFile.OverrideAttribs.PciVendorId, + IsMakefile = Flag) BinFileList.append(TmpOutputFile) else: - FilePathName = FfsFile.GenFfs() + FilePathName = FfsFile.GenFfs(IsMakefile=Flag) if FfsFile.OverrideAttribs != None: FileName = os.path.basename(FilePathName) TmpOutputDir = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName, FfsFile.CurrentArch) @@ -97,7 +98,8 @@ class OPTIONROM (OptionRomClassObject): FfsFile.OverrideAttribs.PciClassCode, FfsFile.OverrideAttribs.PciRevision, FfsFile.OverrideAttribs.PciDeviceId, - FfsFile.OverrideAttribs.PciVendorId) + FfsFile.OverrideAttribs.PciVendorId, + IsMakefile=Flag) BinFileList.append(TmpOutputFile) else: if FfsFile.FileType == 'EFI': @@ -114,10 +116,11 @@ class OPTIONROM (OptionRomClassObject): GenFdsGlobalVariable.GenerateOptionRom( OutputFile, EfiFileList, - BinFileList - ) + BinFileList, + IsMakefile=Flag) - GenFdsGlobalVariable.InfLogger( "\nGenerate %s Option ROM Successfully" %self.DriverName) + if not Flag: + GenFdsGlobalVariable.InfLogger( "\nGenerate %s Option ROM Successfully" %self.DriverName) GenFdsGlobalVariable.SharpCounter = 0 return OutputFile