diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-02-06 03:40:27 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-02-06 03:40:27 +0000 |
commit | 22a99b87c4d29ebaa8713ac8f04d9d0c11c3add5 (patch) | |
tree | 020488e3ac07e5ffd6919041169f234661cf2d9f /BaseTools/Source/Python/GenFds | |
parent | ee2e676a4462e9dfafe08efbe131f60283a7d499 (diff) | |
download | edk2-platforms-22a99b87c4d29ebaa8713ac8f04d9d0c11c3add5.tar.xz |
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 <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16784 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FfsInfStatement.py | 45 |
1 files changed, 4 insertions, 41 deletions
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.<BR>
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
#
# 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
#
|