From 22a99b87c4d29ebaa8713ac8f04d9d0c11c3add5 Mon Sep 17 00:00:00 2001 From: Yingke Liu Date: Fri, 6 Feb 2015 03:40:27 +0000 Subject: 1. Update UpdateBuildVersion.py; 2. Generate correct HII data offset. 3. Fixed a bug for incorrect PCD value used in conditional statement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16784 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 45 ++--------------------- 1 file changed, 4 insertions(+), 41 deletions(-) (limited to 'BaseTools/Source/Python/GenFds') diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py index 040d2ebcd4..29dc75f433 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -1,7 +1,7 @@ ## @file # process FFS generation from INF statement # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# # This program and the accompanying materials @@ -32,6 +32,7 @@ from Common.String import * from Common.Misc import PathClass from Common.Misc import GuidStructureByteArrayToGuidString from Common.Misc import ProcessDuplicatedInf +from Common.Misc import GetVariableOffset from Common import EdkLogger from Common.BuildToolError import * from GuidSection import GuidSection @@ -988,47 +989,9 @@ class FfsInfStatement(FfsInfStatementClassObject): # @retval RetValue A list contain offset of UNI/INF object. # def __GetBuildOutputMapFileVfrUniInfo(self, VfrUniBaseName): - - RetValue = [] - MapFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".map") - try: - fInputfile = open(MapFileName, "r", 0) - try: - FileLinesList = fInputfile.readlines() - except: - EdkLogger.error("GenFds", FILE_READ_FAILURE, "File read failed for %s" %MapFileName,None) - finally: - fInputfile.close() - except: - EdkLogger.error("GenFds", FILE_OPEN_FAILURE, "File open failed for %s" %MapFileName,None) - - IsHex = False - for eachLine in FileLinesList: - for eachName in VfrUniBaseName.values(): - if eachLine.find(eachName) != -1: - eachLine = eachLine.strip() - Element = eachLine.split() - # - # MSFT/ICC/EBC map file - # - if (len(Element) == 4): - try: - int (Element[2], 16) - IsHex = True - except: - IsHex = False - - if IsHex: - RetValue.append((eachName, Element[2])) - IsHex = False - # - # GCC map file - # - elif (len(Element) == 2) and Element[0].startswith("0x"): - RetValue.append((eachName, Element[0])) - - return RetValue + EfiFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".efi") + return GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values()) ## __GenUniVfrOffsetFile() method # -- cgit v1.2.3