summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/EfiSection.py
diff options
context:
space:
mode:
authorFeng, YunhuaX </o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1>2018-04-10 09:12:49 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-11 14:47:55 +0800
commita146c532c754106431b063fec9985a838afd82be (patch)
tree8ca981946158f05ae423f46658ea97ceb0afc4a3 /BaseTools/Source/Python/GenFds/EfiSection.py
parent9a8d7aa7f796ce68ece2815d268889ac4e2ac318 (diff)
downloadedk2-a146c532c754106431b063fec9985a838afd82be.tar.gz
edk2-a146c532c754106431b063fec9985a838afd82be.tar.bz2
edk2-a146c532c754106431b063fec9985a838afd82be.zip
BaseTools: fix --genfds-multi-thread generate makefile issue
1. when inf file is binary module, not generate makefile, so need generate ffs with previous method. 2. generate Ui section maybe override and the string is not $(MODULE_NAME) like as: INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf 3. Trim generate incorrect Offset.raw when some vfr not generate .lst file in Debug directory, Trim get the VFR name with the .c files replacement. 4. fix some depex file not generate issue Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/EfiSection.py')
-rw-r--r--BaseTools/Source/Python/GenFds/EfiSection.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index 7e6c88a059..5bb1ae6f66 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -1,7 +1,7 @@
## @file
# process rule section generation
#
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2018, 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
@@ -64,6 +64,7 @@ class EfiSection (EfiSectionClassObject):
Filename = FfsInf.__ExtendMacro__(self.FileName)
BuildNum = FfsInf.__ExtendMacro__(self.BuildNum)
StringData = FfsInf.__ExtendMacro__(self.StringData)
+ ModuleNameStr = FfsInf.__ExtendMacro__('$(MODULE_NAME)')
NoStrip = True
if FfsInf.ModuleType in ('SEC', 'PEI_CORE', 'PEIM') and SectionType in ('TE', 'PE32'):
if FfsInf.KeepReloc is not None:
@@ -91,8 +92,9 @@ class EfiSection (EfiSectionClassObject):
FileList.append(Filename)
elif os.path.exists(Filename):
FileList.append(Filename)
- elif '.depex' in FfsInf.FinalTargetSuffixMap or FfsInf.Depex:
- if IsMakefile:
+ elif IsMakefile:
+ SuffixMap = FfsInf.GetFinalTargetSuffixMap()
+ if '.depex' in SuffixMap:
FileList.append(Filename)
else:
FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)
@@ -179,6 +181,8 @@ class EfiSection (EfiSectionClassObject):
if InfOverrideUiString:
Num = SecNum
+ if IsMakefile and StringData == ModuleNameStr:
+ StringData = "$(MODULE_NAME)"
OutputFile = os.path.join( OutputPath, ModuleName + 'SEC' + str(Num) + Ffs.SectionSuffix.get(SectionType))
GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',
Ui=StringData, IsMakefile=IsMakefile)
@@ -192,6 +196,8 @@ class EfiSection (EfiSectionClassObject):
f = open(File, 'r')
UiString = f.read()
f.close()
+ if IsMakefile and UiString == ModuleNameStr:
+ UiString = "$(MODULE_NAME)"
GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',
Ui=UiString, IsMakefile=IsMakefile)
OutputFileList.append(OutputFile)
@@ -208,6 +214,8 @@ class EfiSection (EfiSectionClassObject):
EdkLogger.error("GenFds", GENFDS_ERROR, "File: %s miss UI Section value" %InfFileName)
Num = SecNum
+ if IsMakefile and StringData == ModuleNameStr:
+ StringData = "$(MODULE_NAME)"
OutputFile = os.path.join( OutputPath, ModuleName + 'SEC' + str(Num) + Ffs.SectionSuffix.get(SectionType))
GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_USER_INTERFACE',
Ui=StringData, IsMakefile=IsMakefile)