Sync EDKII BaseTools to BaseTools project r1971
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -4,8 +4,8 @@
|
||||
# This module contains the functionality to generate build report after
|
||||
# build all target completes successfully.
|
||||
#
|
||||
# Copyright (c) 2010, Intel Corporation
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# Copyright (c) 2010, 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
@ -22,12 +22,14 @@ import platform
|
||||
import textwrap
|
||||
import traceback
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
from StringIO import StringIO
|
||||
from Common import EdkLogger
|
||||
from Common.Misc import SaveFileOnChange
|
||||
from Common.Misc import GuidStructureByteArrayToGuidString
|
||||
from Common.Misc import GuidStructureStringToGuidString
|
||||
from Common.InfClassObject import gComponentType2ModuleType
|
||||
from Common.BuildToolError import FILE_OPEN_FAILURE
|
||||
from Common.BuildToolError import FILE_WRITE_FAILURE
|
||||
from Common.BuildToolError import CODE_ERROR
|
||||
|
||||
@ -578,7 +580,8 @@ class PcdReport(object):
|
||||
for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
|
||||
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
|
||||
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
|
||||
self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
|
||||
if DscDefaultValue:
|
||||
self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
|
||||
|
||||
##
|
||||
# Generate report for PCD information
|
||||
@ -765,6 +768,13 @@ class PredictionReport(object):
|
||||
for Pa in Wa.AutoGenObjectList:
|
||||
for Module in Pa.LibraryAutoGenList + Pa.ModuleAutoGenList:
|
||||
#
|
||||
# BASE typed modules are EFI agnostic, so we need not scan
|
||||
# their source code to find PPI/Protocol produce or consume
|
||||
# information.
|
||||
#
|
||||
if Module.ModuleType == "BASE":
|
||||
continue
|
||||
#
|
||||
# Add module referenced source files
|
||||
#
|
||||
self._SourceList.append(str(Module))
|
||||
@ -889,12 +899,17 @@ class PredictionReport(object):
|
||||
|
||||
try:
|
||||
from Eot.Eot import Eot
|
||||
|
||||
#
|
||||
# Invoke EOT tool
|
||||
# Invoke EOT tool and echo its runtime performance
|
||||
#
|
||||
EotStartTime = time.time()
|
||||
Eot(CommandLineOption=False, SourceFileList=SourceList, GuidList=GuidList,
|
||||
FvFileList=' '.join(FvFileList), Dispatch=DispatchList, IsInit=True)
|
||||
|
||||
EotEndTime = time.time()
|
||||
EotDuration = time.strftime("%H:%M:%S", time.gmtime(int(round(EotEndTime - EotStartTime))))
|
||||
EdkLogger.quiet("EOT run time: %s\n" % EotDuration)
|
||||
|
||||
#
|
||||
# Parse the output of EOT tool
|
||||
#
|
||||
@ -1415,13 +1430,11 @@ class BuildReport(object):
|
||||
def GenerateReport(self, BuildDuration):
|
||||
if self.ReportFile:
|
||||
try:
|
||||
File = open(self.ReportFile, "w+")
|
||||
except IOError:
|
||||
EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
|
||||
try:
|
||||
File = StringIO('')
|
||||
for (Wa, MaList) in self.ReportList:
|
||||
PlatformReport(Wa, MaList, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
|
||||
EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
|
||||
SaveFileOnChange(self.ReportFile, File.getvalue(), False)
|
||||
EdkLogger.quiet("Build report can be found at %s" % os.path.abspath(self.ReportFile))
|
||||
except IOError:
|
||||
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
|
||||
except:
|
||||
|
@ -4,8 +4,8 @@
|
||||
# This file is required to make Python interpreter treat the directory
|
||||
# as containing package.
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation<BR>
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# Copyright (c) 2007 - 2010, 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -1,9 +1,9 @@
|
||||
## @file
|
||||
# build a platform or a module
|
||||
#
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
@ -1289,12 +1289,10 @@ class Build():
|
||||
#
|
||||
# Save address map into MAP file.
|
||||
#
|
||||
MapFile = open(MapFilePath, "wb")
|
||||
MapFile.write(MapBuffer.getvalue())
|
||||
MapFile.close()
|
||||
MapBuffer.close()
|
||||
SaveFileOnChange(MapFilePath, MapBuffer.getvalue(), False)
|
||||
MapBuffer.close()
|
||||
if self.LoadFixAddress != 0:
|
||||
sys.stdout.write ("\nLoad Module At Fix Address Map file saved to %s\n" %(MapFilePath))
|
||||
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
|
||||
|
Reference in New Issue
Block a user