summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/OptionRom.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-11-22 15:42:25 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-12-05 09:26:22 +0800
commit37de70b764200718cc39a21abc491c335e3da7b3 (patch)
tree153e7a4fca9fe8edad1a8e730ba9a3791b8e612e /BaseTools/Source/Python/GenFds/OptionRom.py
parentb37b108d92aa08cc7eed5f52feea53b0e7563068 (diff)
downloadedk2-37de70b764200718cc39a21abc491c335e3da7b3.tar.gz
edk2-37de70b764200718cc39a21abc491c335e3da7b3.tar.bz2
edk2-37de70b764200718cc39a21abc491c335e3da7b3.zip
BaseTools: Update Makefile to support FFS file generation
Update Makefile to support FFS file generation with new build option --genfds-multi-thread. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/OptionRom.py')
-rw-r--r--BaseTools/Source/Python/GenFds/OptionRom.py25
1 files changed, 14 insertions, 11 deletions
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.<BR>
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# 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