|
From: <mdk...@us...> - 2011-04-19 23:25:53
|
Revision: 2141
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2141&view=rev
Author: mdkinney
Date: 2011-04-19 23:25:47 +0000 (Tue, 19 Apr 2011)
Log Message:
-----------
1) Make sure all evaluations of the PI_SPECIFICATION_VERSION are converted from a string to an int() before any comparison operations.
2) Make sure all evaluations of the UEFI_SPECIFICATION_VERSION are converted from a string to an int() before any comparison operations.
3) Make sure the default string vale for PI_SPECIFICATION_VERSION is the string '0x00000000' and not the value 0.
4) Make sure the default string vale for UEFI_SPECIFICATION_VERSION is the string '0x00000000' and not the value 0.
5) Update AutoGen to produce a Binary INF file for every module built in the module's OUTPUT directory.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/build.py
Modified: trunk/BaseTools/Source/Python/build/build.py
===================================================================
--- trunk/BaseTools/Source/Python/build/build.py 2011-04-19 23:16:19 UTC (rev 2140)
+++ trunk/BaseTools/Source/Python/build/build.py 2011-04-19 23:25:47 UTC (rev 2141)
@@ -1,7 +1,7 @@
## @file
# build a platform or a module
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -885,6 +885,7 @@
if not self.SkipAutoGen or Target == 'genmake':
self.Progress.Start("Generating makefile")
AutoGenObject.CreateMakeFile(CreateDepsMakeFile)
+ AutoGenObject.CreateAsBuiltInf()
self.Progress.Stop("done!")
if Target == "genmake":
return True
@@ -922,8 +923,8 @@
InfFileNameList = ModuleList.keys()
#InfFileNameList.sort()
for InfFile in InfFileNameList:
- sys.stdout.write (".")
- sys.stdout.flush()
+ sys.stdout.write (".")
+ sys.stdout.flush()
ModuleInfo = ModuleList[InfFile]
ModuleName = ModuleInfo.BaseName
ModuleOutputImage = ModuleInfo.Image.FileName
@@ -1056,8 +1057,8 @@
## Collect MAP information of all modules
#
def _CollectModuleMapBuffer (self, MapBuffer, ModuleList):
- sys.stdout.write ("Generate Load Module At Fix Address Map")
- sys.stdout.flush()
+ sys.stdout.write ("Generate Load Module At Fix Address Map")
+ sys.stdout.flush()
PatchEfiImageList = []
PeiModuleList = {}
BtModuleList = {}
@@ -1102,11 +1103,11 @@
SmmModuleList[Module.MetaFile] = ImageInfo
SmmSize += ImageInfo.Image.Size
if Module.ModuleType == 'DXE_SMM_DRIVER':
- PiSpecVersion = 0
- if 'PI_SPECIFICATION_VERSION' in Module.Module.Specification:
- PiSpecVersion = Module.Module.Specification['PI_SPECIFICATION_VERSION']
+ PiSpecVersion = '0x00000000'
+ if 'PI_SPECIFICATION_VERSION' in Module.Module.Specification:
+ PiSpecVersion = Module.Module.Specification['PI_SPECIFICATION_VERSION']
# for PI specification < PI1.1, DXE_SMM_DRIVER also runs as BOOT time driver.
- if PiSpecVersion < 0x0001000A:
+ if int(PiSpecVersion, 16) < 0x0001000A:
BtModuleList[Module.MetaFile] = ImageInfo
BtSize += ImageInfo.Image.Size
break
@@ -1160,7 +1161,7 @@
#
# Get PCD offset in EFI image by GenPatchPcdTable function
#
- PcdTable = parsePcdInfoFromMapFile(EfiImageMap, EfiImage)
+ PcdTable = parsePcdInfoFromMapFile(EfiImageMap, EfiImage)
#
# Patch real PCD value by PatchPcdValue tool
#
@@ -1192,8 +1193,8 @@
self._RebaseModule (MapBuffer, RtBaseAddr, RtModuleList, TopMemoryAddress == 0)
self._RebaseModule (MapBuffer, 0x1000, SmmModuleList, AddrIsOffset = False, ModeIsSmm = True)
MapBuffer.write('\n\n')
- sys.stdout.write ("\n")
- sys.stdout.flush()
+ sys.stdout.write ("\n")
+ sys.stdout.flush()
## Save platform Map file
#
@@ -1206,10 +1207,10 @@
# Save address map into MAP file.
#
SaveFileOnChange(MapFilePath, MapBuffer.getvalue(), False)
- MapBuffer.close()
- if self.LoadFixAddress != 0:
- sys.stdout.write ("\nLoad Module At Fix Address Map file can be found at %s\n" %(MapFilePath))
- sys.stdout.flush()
+ MapBuffer.close()
+ if self.LoadFixAddress != 0:
+ sys.stdout.write ("\nLoad Module At Fix Address Map file can be found at %s\n" %(MapFilePath))
+ sys.stdout.flush()
## Build active platform for different build targets and different tool chains
#
@@ -1417,6 +1418,7 @@
if not self.SkipAutoGen or self.Target == 'genmake':
Ma.CreateMakeFile(True)
+ Ma.CreateAsBuiltInf()
if self.Target == "genmake":
continue
self.Progress.Stop("done!")
@@ -1606,11 +1608,11 @@
if DefineList != None:
for Define in DefineList:
DefineTokenList = Define.split("=", 1)
- if not GlobalData.gMacroNamePattern.match(DefineTokenList[0]):
- EdkLogger.error('build', FORMAT_INVALID,
- "The macro name must be in the pattern [A-Z][A-Z0-9_]*",
- ExtraData=DefineTokenList[0])
-
+ if not GlobalData.gMacroNamePattern.match(DefineTokenList[0]):
+ EdkLogger.error('build', FORMAT_INVALID,
+ "The macro name must be in the pattern [A-Z][A-Z0-9_]*",
+ ExtraData=DefineTokenList[0])
+
if len(DefineTokenList) == 1:
DefineDict[DefineTokenList[0]] = ""
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|