Fix a bug when applying patches to SEC modules that use the FILE_GUID override. Since a temp dir is used when FILE_GUID override is used, the INF file path comparisons fail. The fix is to capture the real INF file path comparisons instead of using the temp dir path to the INF.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong....@intel.com> --- Source/Python/GenFds/FfsInfStatement.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Python/GenFds/FfsInfStatement.py b/Source/Python/GenFds/FfsInfStatement.py index b9cb4f2..6d47a7a 100644 --- a/Source/Python/GenFds/FfsInfStatement.py +++ b/Source/Python/GenFds/FfsInfStatement.py @@ -172,10 +172,14 @@ class FfsInfStatement(FfsInfStatementClassObject): PathClassObj = PathClass(self.InfFileName, GenFdsGlobalVariable.WorkSpaceDir) ErrorCode, ErrorInfo = PathClassObj.Validate(".inf") if ErrorCode != 0: EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo) + # + # Cache lower case version of INF path before processing FILE_GUID override + # + InfLowerPath = str(PathClassObj).lower() if self.OverrideGuid: PathClassObj = ProcessDuplicatedInf(PathClassObj, self.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir) if self.CurrentArch != None: Inf = GenFdsGlobalVariable.WorkSpace.BuildObject[PathClassObj, self.CurrentArch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag] @@ -239,11 +243,10 @@ class FfsInfStatement(FfsInfStatementClassObject): continue if Pcd.Type != 'PatchableInModule': continue # Override Patchable PCD value by the value from DSC PatchPcd = None - InfLowerPath = str(PathClassObj).lower() if InfLowerPath in DscModules and PcdKey in DscModules[InfLowerPath].Pcds: PatchPcd = DscModules[InfLowerPath].Pcds[PcdKey] elif PcdKey in Platform.Pcds: PatchPcd = Platform.Pcds[PcdKey] DscOverride = False -- 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel