summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/GenFds.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/GenFds.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/GenFds.py')
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index c19dc40757..4a5d6f476a 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -99,6 +99,8 @@ def main():
GenFdsGlobalVariable.EdkSourceDir = os.path.normcase(os.environ['EDK_SOURCE'])
if (Options.debug):
GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace)
+ if Options.GenfdsMultiThread:
+ GenFdsGlobalVariable.EnableGenfdsMultiThread = True
os.chdir(GenFdsGlobalVariable.WorkSpaceDir)
# set multiple workspace
@@ -538,6 +540,7 @@ def myOptionParser():
Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.")
Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")
Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: \"PcdName=Value\" ")
+ Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=False, help="Enable GenFds multi thread to generate ffs file.")
(Options, args) = Parser.parse_args()
return Options
@@ -611,6 +614,23 @@ class GenFds :
for DriverName in GenFdsGlobalVariable.FdfParser.Profile.OptRomDict.keys():
OptRomObj = GenFdsGlobalVariable.FdfParser.Profile.OptRomDict[DriverName]
OptRomObj.AddToBuffer(None)
+ @staticmethod
+ def GenFfsMakefile(OutputDir, FdfParser, WorkSpace, ArchList, GlobalData):
+ GenFdsGlobalVariable.SetEnv(FdfParser, WorkSpace, ArchList, GlobalData)
+ for FdName in GenFdsGlobalVariable.FdfParser.Profile.FdDict.keys():
+ FdObj = GenFdsGlobalVariable.FdfParser.Profile.FdDict[FdName]
+ FdObj.GenFd(Flag=True)
+
+ for FvName in GenFdsGlobalVariable.FdfParser.Profile.FvDict.keys():
+ FvObj = GenFdsGlobalVariable.FdfParser.Profile.FvDict[FvName]
+ FvObj.AddToBuffer(Buffer=None, Flag=True)
+
+ if GenFdsGlobalVariable.FdfParser.Profile.OptRomDict != {}:
+ for DriverName in GenFdsGlobalVariable.FdfParser.Profile.OptRomDict.keys():
+ OptRomObj = GenFdsGlobalVariable.FdfParser.Profile.OptRomDict[DriverName]
+ OptRomObj.AddToBuffer(Buffer=None, Flag=True)
+
+ return GenFdsGlobalVariable.FfsCmdDict
## GetFvBlockSize()
#