summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-08-24 16:39:14 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-13 09:57:13 +0800
commit8be15c61e88709c55970c5d5272d19bd9bba67fb (patch)
tree0824e902da705ba8eb6a30d590fc2e27fd95ee73 /BaseTools/Source/Python/GenFds
parent0e3bfc6f7a2b7b52cb684736d878e249edbff5cb (diff)
downloadedk2-8be15c61e88709c55970c5d5272d19bd9bba67fb.tar.gz
edk2-8be15c61e88709c55970c5d5272d19bd9bba67fb.tar.bz2
edk2-8be15c61e88709c55970c5d5272d19bd9bba67fb.zip
BaseTools: Fix some build and report file issue
1. increment build not skip make file when not change any file 2. report file generate abundant blank line 3. Build encounter Database is locked on some platform, using database auto commit 4. Fv BaseAddress must have if set 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: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds')
-rw-r--r--BaseTools/Source/Python/GenFds/FvImageSection.py2
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py9
2 files changed, 10 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py
index 5cc5b969fd..f15df23514 100644
--- a/BaseTools/Source/Python/GenFds/FvImageSection.py
+++ b/BaseTools/Source/Python/GenFds/FvImageSection.py
@@ -102,6 +102,8 @@ class FvImageSection(FvImageSectionClassObject):
Fv = GenFdsGlobalVariable.FdfParser.Profile.FvDict.get(self.FvName)
if Fv is not None:
self.Fv = Fv
+ if not self.FvAddr and self.Fv.BaseAddress:
+ self.FvAddr = self.Fv.BaseAddress
FvFileName = Fv.AddToBuffer(Buffer, self.FvAddr, MacroDict = Dict, Flag=IsMakefile)
if Fv.FvAlignment is not None:
if self.Alignment is None:
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index ed1bd33fdb..32824ae80e 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -321,6 +321,8 @@ def main():
continue
for RegionData in RegionObj.RegionDataList:
if FvObj.UiFvName.upper() == RegionData.upper():
+ if not FvObj.BaseAddress:
+ FvObj.BaseAddress = '0x%x' % (int(FdObj.BaseAddress, 0) + RegionObj.Offset)
if FvObj.FvRegionInFD:
if FvObj.FvRegionInFD != RegionObj.Size:
EdkLogger.error("GenFds", FORMAT_INVALID, "The FV %s's region is specified in multiple FD with different value." %FvObj.UiFvName)
@@ -607,16 +609,21 @@ class GenFds :
ModuleList = []
FileGuidList = []
GuidPattern = gGuidPattern
+ VariableGuidSet = set()
for Arch in ArchList:
PlatformDataBase = BuildDb.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
PkgList = GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag)
for P in PkgList:
PkgGuidDict.update(P.Guids)
- for Name, Guid in PlatformDataBase.Pcds:
+ for Name, Guid in sorted(PlatformDataBase.Pcds):
Pcd = PlatformDataBase.Pcds[Name, Guid]
if Pcd.Type in [TAB_PCDS_DYNAMIC_HII, TAB_PCDS_DYNAMIC_EX_HII]:
for SkuId in Pcd.SkuInfoList:
Sku = Pcd.SkuInfoList[SkuId]
+ if Sku.VariableGuid in VariableGuidSet:
+ continue
+ else:
+ VariableGuidSet.add(Sku.VariableGuid)
if Sku.VariableGuid and Sku.VariableGuid in PkgGuidDict.keys():
GuidDict[Sku.VariableGuid] = PkgGuidDict[Sku.VariableGuid]
for ModuleFile in PlatformDataBase.Modules: