diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-11-22 15:42:25 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-12-05 09:26:22 +0800 |
commit | 37de70b764200718cc39a21abc491c335e3da7b3 (patch) | |
tree | 153e7a4fca9fe8edad1a8e730ba9a3791b8e612e /BaseTools/Source/Python/AutoGen/AutoGen.py | |
parent | b37b108d92aa08cc7eed5f52feea53b0e7563068 (diff) | |
download | edk2-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/AutoGen/AutoGen.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 008ad8ebc3..1c4c395479 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1307,12 +1307,15 @@ class PlatformAutoGen(AutoGen): # @param CreateModuleMakeFile Flag indicating if the makefile for
# modules will be created as well
#
- def CreateMakeFile(self, CreateModuleMakeFile=False):
+ def CreateMakeFile(self, CreateModuleMakeFile=False, FfsCommand = {}):
if CreateModuleMakeFile:
for ModuleFile in self.Platform.Modules:
Ma = ModuleAutoGen(self.Workspace, ModuleFile, self.BuildTarget,
self.ToolChain, self.Arch, self.MetaFile)
- Ma.CreateMakeFile(True)
+ if (ModuleFile.File, self.Arch) in FfsCommand:
+ Ma.CreateMakeFile(True, FfsCommand[ModuleFile.File, self.Arch])
+ else:
+ Ma.CreateMakeFile(True)
#Ma.CreateAsBuiltInf()
# no need to create makefile for the platform more than once
@@ -2760,6 +2763,7 @@ class ModuleAutoGen(AutoGen): self._BuildDir = None
self._OutputDir = None
+ self._FfsOutputDir = None
self._DebugDir = None
self._MakeFileDir = None
@@ -2876,6 +2880,7 @@ class ModuleAutoGen(AutoGen): self._Macro["PLATFORM_RELATIVE_DIR" ] = self.PlatformInfo.SourceDir
self._Macro["PLATFORM_DIR" ] = mws.join(self.WorkspaceDir, self.PlatformInfo.SourceDir)
self._Macro["PLATFORM_OUTPUT_DIR" ] = self.PlatformInfo.OutputDir
+ self._Macro["FFS_OUTPUT_DIR" ] = self.FfsOutputDir
return self._Macro
## Return the module build data object
@@ -2966,6 +2971,15 @@ class ModuleAutoGen(AutoGen): CreateDirectory(self._OutputDir)
return self._OutputDir
+ ## Return the directory to store ffs file
+ def _GetFfsOutputDir(self):
+ if self._FfsOutputDir == None:
+ if GlobalData.gFdfParser != None:
+ self._FfsOutputDir = path.join(self.PlatformInfo.BuildDir, "FV", "Ffs", self.Guid + self.Name)
+ else:
+ self._FfsOutputDir = ''
+ return self._FfsOutputDir
+
## Return the directory to store auto-gened source files of the mdoule
def _GetDebugDir(self):
if self._DebugDir == None:
@@ -4222,14 +4236,14 @@ class ModuleAutoGen(AutoGen): # @param CreateLibraryMakeFile Flag indicating if or not the makefiles of
# dependent libraries will be created
#
- def CreateMakeFile(self, CreateLibraryMakeFile=True):
+ def CreateMakeFile(self, CreateLibraryMakeFile=True, GenFfsList = []):
# Ignore generating makefile when it is a binary module
if self.IsBinaryModule:
return
if self.IsMakeFileCreated:
return
-
+ self.GenFfsList = GenFfsList
if not self.IsLibrary and CreateLibraryMakeFile:
for LibraryAutoGen in self.LibraryAutoGenList:
LibraryAutoGen.CreateMakeFile()
@@ -4457,6 +4471,7 @@ class ModuleAutoGen(AutoGen): IsBinaryModule = property(_IsBinaryModule)
BuildDir = property(_GetBuildDir)
OutputDir = property(_GetOutputDir)
+ FfsOutputDir = property(_GetFfsOutputDir)
DebugDir = property(_GetDebugDir)
MakeFileDir = property(_GetMakeFileDir)
CustomMakefile = property(_GetCustomMakefile)
|