BaseTools: Fix a bug for different FV use same FILE statement Guid
We meet a case that different FV use same FILE statement Guid, but the FILE content is different. current we use the Guid value as Ffs file dir which cause the ffs file will be override. This patch use Guid value and Fv name as ffs dir for FILE statement. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -57,7 +57,7 @@ class FileStatement (FileStatementClassObject) :
|
||||
# @param FvParentAddr Parent Fv base address
|
||||
# @retval string Generated FFS file name
|
||||
#
|
||||
def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None, IsMakefile=False):
|
||||
def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None, IsMakefile=False, FvName=None):
|
||||
|
||||
if self.NameGuid != None and self.NameGuid.startswith('PCD('):
|
||||
PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
|
||||
@ -72,7 +72,10 @@ class FileStatement (FileStatementClassObject) :
|
||||
% (self.NameGuid))
|
||||
self.NameGuid = RegistryGuidStr
|
||||
|
||||
OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, self.NameGuid)
|
||||
Str = self.NameGuid
|
||||
if FvName:
|
||||
Str += FvName
|
||||
OutputDir = os.path.join(GenFdsGlobalVariable.FfsDir, Str)
|
||||
if not os.path.exists(OutputDir):
|
||||
os.makedirs(OutputDir)
|
||||
|
||||
|
Reference in New Issue
Block a user