mirror of https://github.com/acidanthera/audk.git
BaseTools:Fv BaseAddress must set If it not set
If ForceRebase is not set, and FV is specified in FD region, it should have FvBaseAddress Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
parent
2c2bb053a3
commit
d7f40203dc
|
@ -103,6 +103,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:
|
||||
|
|
|
@ -362,6 +362,8 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None):
|
|||
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)
|
||||
|
@ -676,6 +678,7 @@ class GenFds(object):
|
|||
GuidDict = {}
|
||||
ModuleList = []
|
||||
FileGuidList = []
|
||||
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)
|
||||
|
@ -686,6 +689,8 @@ class GenFds(object):
|
|||
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
|
||||
VariableGuidSet.add(Sku.VariableGuid)
|
||||
if Sku.VariableGuid and Sku.VariableGuid in PkgGuidDict.keys():
|
||||
GuidDict[Sku.VariableGuid] = PkgGuidDict[Sku.VariableGuid]
|
||||
for ModuleFile in PlatformDataBase.Modules:
|
||||
|
|
Loading…
Reference in New Issue