|
From: <qh...@us...> - 2010-01-29 01:49:59
|
Revision: 1824
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1824&view=rev
Author: qhuang8
Date: 2010-01-29 01:49:53 +0000 (Fri, 29 Jan 2010)
Log Message:
-----------
Fix a syntax error in parser
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-01-28 13:16:28 UTC (rev 1823)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-01-29 01:49:53 UTC (rev 1824)
@@ -1020,7 +1020,7 @@
def __init__(self, ReportFile, ReportType):
self.ReportFile = ReportFile
if ReportFile:
- self.ReportList = []
+ self.ReportType = []
if ReportType == None or "ALL" in ReportType:
self.ReportType = ["PCD", "LIBRARY", "BUILD_FLAGS", "DEPEX", "FLASH", "PREDICTION"]
else:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-01-29 06:01:03
|
Revision: 1827
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1827&view=rev
Author: qhuang8
Date: 2010-01-29 06:00:56 +0000 (Fri, 29 Jan 2010)
Log Message:
-----------
Add initialization of ReportList
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-01-29 02:56:49 UTC (rev 1826)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-01-29 06:00:56 UTC (rev 1827)
@@ -1020,6 +1020,7 @@
def __init__(self, ReportFile, ReportType):
self.ReportFile = ReportFile
if ReportFile:
+ self.ReportList = []
self.ReportType = []
if ReportType == None or "ALL" in ReportType:
self.ReportType = ["PCD", "LIBRARY", "BUILD_FLAGS", "DEPEX", "FLASH", "PREDICTION"]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-01 02:36:05
|
Revision: 1829
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1829&view=rev
Author: qhuang8
Date: 2010-02-01 02:35:58 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Set the FdfPcdSet to be empty if the platform DSC does not has assosicated FDF file.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-01-29 11:44:32 UTC (rev 1828)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-01 02:35:58 UTC (rev 1829)
@@ -522,7 +522,10 @@
def __init__(self, Wa):
self.AllPcds = {}
self.MaxLen = 0
- self.FdfPcdSet = Wa.FdfProfile.PcdDict
+ if Wa.FdfProfile:
+ self.FdfPcdSet = Wa.FdfProfile.PcdDict
+ else:
+ self.FdfPcdSet = {}
self.DecPcdDefault = {}
self.ModulePcdOverride = {}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-01 12:47:38
|
Revision: 1831
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1831&view=rev
Author: qhuang8
Date: 2010-02-01 12:47:23 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
1. Save the report file to DOS format
2. Do not re-parse the INF files in FDF file to collect GUID and INF file path
3. Wrapper EOT tool in try...except statement
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-01 09:21:34 UTC (rev 1830)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-01 12:47:23 UTC (rev 1831)
@@ -109,7 +109,7 @@
def FileWrite(File, String, Wrapper=False):
if Wrapper:
String = textwrap.fill(String, 120)
- File.write(String + "\n")
+ File.write(String + "\r\n")
##
# Find all the header file that the module source directly includes.
@@ -725,41 +725,37 @@
self._MapFileParsed = False
self._EotToolInvoked = False
self._FvDir = Wa.FvDir
-
+ self._EotDir = Wa.BuildDir
+ self._FfsEntryPoint = {}
+ self._GuidMap = {}
+ self._SourceList = []
self.FixedMapDict = {}
self.ItemList = []
self.MaxLen = 0
- self._SourceFileList = os.path.join(Wa.BuildDir, Wa.Name + "_SourceFileList.txt")
- SourceList = open(self._SourceFileList, "w+")
-
- self._FfsEntryPoint = {}
-
#
- # Collect all platform reference source files and write to the an intermediate file
- # for EOT tool to parse.
+ # Collect all platform reference source files and GUID C Name
#
- GuidMap = {}
for Pa in Wa.AutoGenObjectList:
for Module in Pa.LibraryAutoGenList + Pa.ModuleAutoGenList:
#
# Add module referenced source files
#
- SourceList.write(str(Module) + "\n")
+ self._SourceList.append(str(Module))
IncludeList = {}
for Source in Module.SourceFileList:
if os.path.splitext(str(Source))[1].lower() == ".c":
- SourceList.write(" " + str(Source) + "\n")
+ self._SourceList.append(" " + str(Source))
FindIncludeFiles(Source.Path, Module.IncludePathList, IncludeList)
for IncludeFile in IncludeList.values():
- SourceList.write(" " + IncludeFile + "\n")
+ self._SourceList.append(" " + IncludeFile)
for Guid in Module.PpiList:
- GuidMap[Guid] = GuidStructureStringToGuidString(Module.PpiList[Guid])
+ self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.PpiList[Guid])
for Guid in Module.ProtocolList:
- GuidMap[Guid] = GuidStructureStringToGuidString(Module.ProtocolList[Guid])
+ self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.ProtocolList[Guid])
for Guid in Module.GuidList:
- GuidMap[Guid] = GuidStructureStringToGuidString(Module.GuidList[Guid])
+ self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.GuidList[Guid])
if Module.Guid and not Module.IsLibrary:
EntryPoint = " ".join(Module.Module.ModuleEntryPointList)
@@ -775,43 +771,31 @@
self._FfsEntryPoint[Module.Guid.upper()] = (EntryPoint, RealEntryPoint)
- SourceList.close()
-
+
#
- # Write platform referenced GUID list as the input of EOT tool
- # to calculate module dependency GUID
- #
- self._GuidList = os.path.join(Wa.BuildDir, Wa.Name + "_GuidList.txt")
- GuidList = open(self._GuidList, "w+")
- for Guid in GuidMap:
- GuidList.write("%s %s\n" % (Guid, GuidMap[Guid]))
- GuidList.close()
-
- #
# Collect platform firmware volume list as the input of EOT.
#
- self._FvList = []
- for Fd in Wa.FdfProfile.FdDict:
- for FdRegion in Wa.FdfProfile.FdDict[Fd].RegionList:
- if FdRegion.RegionType != "FV":
- continue
- for FvName in FdRegion.RegionDataList:
- if FvName in self._FvList:
+ self._FvList = []
+ if Wa.FdfProfile:
+ for Fd in Wa.FdfProfile.FdDict:
+ for FdRegion in Wa.FdfProfile.FdDict[Fd].RegionList:
+ if FdRegion.RegionType != "FV":
continue
- self._FvList.append(FvName)
- for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
- for Section in Ffs.SectionList:
- try:
- for FvSection in Section.SectionList:
- if FvSection.FvName in self._FvList:
- continue
- self._FvList.append(FvSection.FvName)
- except AttributeError:
- pass
+ for FvName in FdRegion.RegionDataList:
+ if FvName in self._FvList:
+ continue
+ self._FvList.append(FvName)
+ for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
+ for Section in Ffs.SectionList:
+ try:
+ for FvSection in Section.SectionList:
+ if FvSection.FvName in self._FvList:
+ continue
+ self._FvList.append(FvSection.FvName)
+ except AttributeError:
+ pass
- self._Dispatch = os.path.join(Wa.BuildDir, Wa.Name + "_Dispatch.log")
-
##
# Parse platform fixed address map files
#
@@ -858,21 +842,44 @@
FvFileList.append(FvFile)
#
- # Invoke EOT tool
+ # Write source file list and GUID file list to an intermediate file
+ # as the input for EOT tool and dispatch List as the output file
+ # from EOT tool.
#
- Eot(CommandLineOption=False, SourceFileList=self._SourceFileList, GuidList=self._GuidList,
- FvFileList=' '.join(FvFileList), Dispatch=self._Dispatch, IsInit=True)
+ SourceList = os.path.join(self._EotDir, "SourceFile.txt")
+ GuidList = os.path.join(self._EotDir, "GuidList.txt")
+ DispatchList = os.path.join(self._EotDir, "Dispatch.txt")
- #
- # Parse the output of EOT tool
- #
- for Line in open(self._Dispatch):
- (Guid, Phase, FfsName, FilePath) = Line.split()
- Symbol = self._FfsEntryPoint.get(Guid, [FfsName, ""])[0]
- if len(Symbol) > self.MaxLen:
- self.MaxLen = len(Symbol)
- self.ItemList.append((Phase, Symbol, FilePath))
-
+ TempFile = open(SourceList, "w+")
+ for Item in self._SourceList:
+ FileWrite(TempFile, Item)
+ TempFile.close()
+ TempFile = open(GuidList, "w+")
+ for Key in self._GuidMap:
+ FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key]))
+ TempFile.close()
+
+ try:
+ #
+ # Invoke EOT tool
+ #
+ Eot(CommandLineOption=False, SourceFileList=SourceList, GuidList=GuidList,
+ FvFileList=' '.join(FvFileList), Dispatch=DispatchList, IsInit=True)
+
+ #
+ # Parse the output of EOT tool
+ #
+ for Line in open(DispatchList):
+ (Guid, Phase, FfsName, FilePath) = Line.split()
+ Symbol = self._FfsEntryPoint.get(Guid, [FfsName, ""])[0]
+ if len(Symbol) > self.MaxLen:
+ self.MaxLen = len(Symbol)
+ self.ItemList.append((Phase, Symbol, FilePath))
+ except:
+ EdkLogger.warn(None, "Failed to generate execution order prediction report, \
+ for some error occurred in executing EOT.")
+
+
##
# Generate platform execution order report
#
@@ -1080,6 +1087,12 @@
# Add ACPI table storage file
#
self._GuidsDb["7E374E25-8E01-4FEE-87F2-390C23C606CD"] = "ACPI table storage"
+
+ for Pa in Wa.AutoGenObjectList:
+ for ModuleKey in Pa.Platform.Modules:
+ M = Pa.Platform.Modules[ModuleKey].M
+ self._GuidsDb[M.Guid.upper()] = "%s (%s)" % (M.Module.BaseName, M.MetaFile.File)
+
#
# Collect the GUID map in the FV firmware volume
#
@@ -1087,48 +1100,24 @@
for Ffs in Wa.FdfProfile.FvDict[FvName.upper()].FfsList:
try:
#
- # Collect GUID, module mapping from INF file
+ # collect GUID map for binary EFI file in FDF file.
#
- InfFileName = Ffs.InfFileName
- try:
- FileGuid = ""
- ModuleName = ""
- InfPath = os.path.join(Wa.WorkspaceDir, InfFileName)
- for Line in open(InfPath):
- ItemList = Line.split("#")[0].split("=")
- if len(ItemList) == 2:
- Key = ItemList[0].strip().upper()
- Value = ItemList[1].strip()
- if Key == "FILE_GUID":
- FileGuid = Value.upper()
- if Key == "BASE_NAME":
- ModuleName = Value
- if FileGuid:
- self._GuidsDb[FileGuid] = "%s (%s)" % (ModuleName, InfPath)
- except IOError:
- EdkLogger.warn(None, "Cannot open file to read", InfPath)
+ Guid = Ffs.NameGuid.upper()
+ Match = gPcdGuidPattern.match(Ffs.NameGuid)
+ if Match:
+ PcdTokenspace = Match.group(1)
+ PcdToken = Match.group(2)
+ if (PcdToken, PcdTokenspace) in PlatformPcds:
+ GuidValue = PlatformPcds[(PcdToken, PcdTokenspace)]
+ Guid = GuidStructureByteArrayToGuidString(GuidValue).upper()
+ for Section in Ffs.SectionList:
+ try:
+ ModuleSectFile = os.path.join(Wa.WorkspaceDir, Section.SectFileName)
+ self._GuidsDb[Guid] = ModuleSectFile
+ except AttributeError:
+ pass
except AttributeError:
- try:
- #
- # collect GUID map for binary EFI file in FDF file.
- #
- Guid = Ffs.NameGuid.upper()
- Match = gPcdGuidPattern.match(Ffs.NameGuid)
- if Match:
- PcdTokenspace = Match.group(1)
- PcdToken = Match.group(2)
- if (PcdToken, PcdTokenspace) in PlatformPcds:
- GuidValue = PlatformPcds[(PcdToken, PcdTokenspace)]
- Guid = GuidStructureByteArrayToGuidString(GuidValue).upper()
-
- for Section in Ffs.SectionList:
- try:
- ModuleSectFile = os.path.join(Wa.WorkspaceDir, Section.SectFileName)
- self._GuidsDb[Guid] = ModuleSectFile
- except AttributeError:
- pass
- except AttributeError:
- pass
+ pass
##
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-02 10:21:26
|
Revision: 1836
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1836&view=rev
Author: qhuang8
Date: 2010-02-02 10:21:20 +0000 (Tue, 02 Feb 2010)
Log Message:
-----------
Import EOT tool if only required
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-02 10:05:50 UTC (rev 1835)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-02 10:21:20 UTC (rev 1836)
@@ -27,7 +27,6 @@
from Common.InfClassObject import gComponentType2ModuleType
from Common.BuildToolError import FILE_OPEN_FAILURE
from Common.BuildToolError import FILE_WRITE_FAILURE
-from Eot.Eot import Eot
## Pattern to extract contents in EDK DXS files
@@ -860,6 +859,7 @@
TempFile.close()
try:
+ from Eot.Eot import Eot
#
# Invoke EOT tool
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-04 12:55:56
|
Revision: 1843
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1843&view=rev
Author: qhuang8
Date: 2010-02-04 12:50:03 +0000 (Thu, 04 Feb 2010)
Log Message:
-----------
Fix one FD base address display defect
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-04 12:25:41 UTC (rev 1842)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-04 12:50:03 UTC (rev 1843)
@@ -1,8 +1,8 @@
## @file
# Routines for generating build report.
-#
+#
# This module contains the functionality to generate build report after
-# build all target completes successfully.
+# build all target completes successfully.
#
# Copyright (c) 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
@@ -36,14 +36,14 @@
gFvTotalSizePattern = re.compile(r"EFI_FV_TOTAL_SIZE = (0x[0-9a-fA-F]+)")
gFvTakenSizePattern = re.compile(r"EFI_FV_TAKEN_SIZE = (0x[0-9a-fA-F]+)")
-## Pattern to find module size and time stamp in module summary report intermediate file
+## Pattern to find module size and time stamp in module summary report intermediate file
gModuleSizePattern = re.compile(r"MODULE_SIZE = (\d+)")
-gTimeStampPattern = re.compile(r"TIME_STAMP = (\d+)")
+gTimeStampPattern = re.compile(r"TIME_STAMP = (\d+)")
## Pattern to find GUID value in flash description files
gPcdGuidPattern = re.compile(r"PCD\((\w+)[.](\w+)\)")
-## Pattern to collect offset, GUID value pair in the flash report intermediate file
+## Pattern to collect offset, GUID value pair in the flash report intermediate file
gOffsetGuidPattern = re.compile(r"(0x[0-9A-Fa-f]+) ([-A-Fa-f0-9]+)")
## Pattern to find module base address and entry point in fixed flash map file
@@ -98,10 +98,10 @@
##
# Writes a string to the file object.
-#
-# This function writes a string to the file object and a new line is appended
-# afterwards. It may optionally wraps the string for better readability.
#
+# This function writes a string to the file object and a new line is appended
+# afterwards. It may optionally wraps the string for better readability.
+#
# @File The file object to write
# @String The string to be written to the file
# @Wrapper Indicates whether to wrap the string
@@ -116,7 +116,7 @@
#
# This function scans source code to find all header files the module may
# include. This is not accurate but very effective to find all the header
-# file the module might include with #include statement.
+# file the module might include with #include statement.
#
# @Source The source file name
# @IncludePathList The list of include path to find the source file.
@@ -134,7 +134,7 @@
if os.path.exists(FullFileName):
IncludeFiles[FullFileName.lower().replace("\\", "/")] = FullFileName
break
-
+
#
# Find header files with pattern like #include EFI_PPI_CONSUMER(XXX)
#
@@ -156,17 +156,17 @@
if os.path.exists(FullFileName):
IncludeFiles[FullFileName.lower().replace("\\", "/")] = FullFileName
break
-
+
##
# Reports library information
#
# This class reports the module library subsection in the build report file.
-#
+#
class LibraryReport(object):
##
# Constructor function for class LibraryReport
#
- # This constructor function generates LibraryReport object for
+ # This constructor function generates LibraryReport object for
# a module.
#
# @param self The object pointer
@@ -178,7 +178,7 @@
self._EdkIIModule = True
else:
self._EdkIIModule = False
-
+
for Lib in M.DependentLibraryList:
LibInfPath = str(Lib)
LibClassList = Lib.LibraryClass[0].LibraryClass
@@ -186,13 +186,13 @@
LibDesstructorList = Lib.DestructorList
LibDepexList = Lib.DepexExpression[M.Arch, M.ModuleType]
self.LibraryList.append((LibInfPath, LibClassList, LibConstructorList, LibDesstructorList, LibDepexList))
-
+
##
# Generate report for module library information
#
# This function generates report for the module library.
# If the module is EDKII style one, the additional library class, library
- # constructor/destructor and dependency expression may also be reported.
+ # constructor/destructor and dependency expression may also be reported.
#
# @param self The object pointer
# @param File The file object for report
@@ -205,7 +205,7 @@
for LibraryItem in self.LibraryList:
LibInfPath = LibraryItem[0]
FileWrite(File, LibInfPath)
-
+
#
# Report library class, library constructor and destructor for
# EDKII style module.
@@ -226,19 +226,19 @@
FileWrite(File, "{%s: %s}" % (LibClass, EdkIILibInfo))
else:
FileWrite(File, "{%s}" % LibClass)
-
+
FileWrite(File, gSubSectionEnd)
##
# Reports dependency expression information
#
# This class reports the module dependency expression subsection in the build report file.
-#
+#
class DepexReport(object):
##
# Constructor function for class DepexReport
#
- # This constructor function generates DepexReport object for
+ # This constructor function generates DepexReport object for
# a module. If the module source contains the DXS file (usually EDK
# style module), it uses the dependency in DXS file; otherwise,
# it uses the dependency expression from its own INF [Depex] section
@@ -260,11 +260,11 @@
self.ModuleDepex = " ".join(M.Module.DepexExpression[M.Arch, M.ModuleType])
if not self.ModuleDepex:
self.ModuleDepex = "TRUE"
-
+
LibDepexList = []
for Lib in M.DependentLibraryList:
LibDepex = " ".join(Lib.DepexExpression[M.Arch, M.ModuleType]).strip()
- if LibDepex != "":
+ if LibDepex != "":
if " " in LibDepex:
LibDepex = "(" + LibDepex + ")"
LibDepexList.append(LibDepex)
@@ -272,7 +272,7 @@
if not self.LibraryDepex:
self.LibraryDepex = "(None)"
self.Source = "INF"
-
+
##
# Generate report for module dependency expression information
#
@@ -284,7 +284,7 @@
def GenerateReport(self, File):
FileWrite(File, gSubSectionStart)
FileWrite(File, "Dependency Expression (DEPEX) from %s" % self.Source)
-
+
if self.Source == "INF":
FileWrite(File, "%s" % self.Depex, True)
FileWrite(File, gSubSectionSep)
@@ -298,13 +298,13 @@
# Reports dependency expression information
#
# This class reports the module build flags subsection in the build report file.
-#
+#
class BuildFlagsReport(object):
##
# Constructor function for class BuildFlagsReport
#
- # This constructor function generates BuildFlagsReport object for
- # a module. It reports the build tool chain tag and all relevant
+ # This constructor function generates BuildFlagsReport object for
+ # a module. It reports the build tool chain tag and all relevant
# build flags to build the module.
#
# @param self The object pointer
@@ -314,7 +314,7 @@
BuildOptions = {}
#
# Add build flags according to source file extension so that
- # irrelevant ones can be filtered out.
+ # irrelevant ones can be filtered out.
#
for Source in M.SourceFileList:
Ext = os.path.splitext(Source.File)[1].lower()
@@ -340,7 +340,7 @@
BuildOptions["ASMLINK"] = 1
BuildOptions["SLINK"] = 1
BuildOptions["DLINK"] = 1
-
+
#
# Save module build flags.
#
@@ -364,23 +364,23 @@
for Tool in self.BuildFlags:
FileWrite(File, gSubSectionSep)
FileWrite(File, "%s = %s" % (Tool, self.BuildFlags[Tool]), True)
-
+
FileWrite(File, gSubSectionEnd)
##
# Reports individual module information
#
-# This class reports the module section in the build report file.
+# This class reports the module section in the build report file.
# It comprises of module summary, module PCD, library, dependency expression,
-# build flags sections.
-#
+# build flags sections.
+#
class ModuleReport(object):
##
# Constructor function for class ModuleReport
#
- # This constructor function generates ModuleReport object for
- # a separate module in a platform build.
+ # This constructor function generates ModuleReport object for
+ # a separate module in a platform build.
#
# @param self The object pointer
# @param M Module context information
@@ -410,7 +410,7 @@
self.PciDeviceId = M.Module.Defines.get("PCI_DEVICE_ID", "")
self.PciVendorId = M.Module.Defines.get("PCI_VENDOR_ID", "")
self.PciClassCode = M.Module.Defines.get("PCI_CLASS_CODE", "")
-
+
self._BuildDir = M.BuildDir
self.ModulePcdSet = {}
self.ModuleDscOverridePcds = {}
@@ -421,26 +421,26 @@
#
for Pcd in M.ModulePcdList + M.LibraryPcdList:
self.ModulePcdSet.setdefault((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Type), Pcd.InfDefaultValue)
-
+
#
# Collect module DSC override PCD set for report
#
for (PcdTokenCName, PcdTokenSpaceGuidCName) in DscOverridePcds:
Pcd = DscOverridePcds[(PcdTokenCName, PcdTokenSpaceGuidCName)]
self.ModuleDscOverridePcds.setdefault((PcdTokenCName, PcdTokenSpaceGuidCName), Pcd.DefaultValue)
-
+
self.LibraryReport = None
if "LIBRARY" in ReportType:
self.LibraryReport = LibraryReport(M)
-
+
self.DepexReport = None
if "DEPEX" in ReportType:
self.DepexReport = DepexReport(M)
-
+
if "BUILD_FLAGS" in ReportType:
self.BuildFlagsReport = BuildFlagsReport(M)
-
-
+
+
##
# Generate report for module information
#
@@ -454,7 +454,7 @@
#
def GenerateReport(self, File, GlobalPcdReport, GlobalPredictionReport, ReportType):
FileWrite(File, gSectionStart)
-
+
FwReportFileName = os.path.join(self._BuildDir, "DEBUG", self.ModuleName + ".txt")
if os.path.isfile(FwReportFileName):
try:
@@ -462,13 +462,13 @@
Match = gModuleSizePattern.search(FileContents)
if Match:
self.Size = int(Match.group(1))
-
+
Match = gTimeStampPattern.search(FileContents)
if Match:
self.BuildTimeStamp = datetime.fromtimestamp(int(Match.group(1)))
except IOError:
EdkLogger.warn(None, "Fail to read report file", FwReportFileName)
-
+
FileWrite(File, "Module Summary")
FileWrite(File, "Module Name: %s" % self.ModuleName)
FileWrite(File, "Module INF Path: %s" % self.ModuleInfPath)
@@ -489,24 +489,24 @@
FileWrite(File, "PCI Vendor ID: %s" % self.PciVendorId)
if self.PciClassCode:
FileWrite(File, "PCI Class Code: %s" % self.PciClassCode)
-
- FileWrite(File, gSectionSep)
-
+
+ FileWrite(File, gSectionSep)
+
if "PCD" in ReportType:
GlobalPcdReport.GenerateReport(File, self.ModulePcdSet, self.ModuleDscOverridePcds)
-
+
if "LIBRARY" in ReportType:
self.LibraryReport.GenerateReport(File)
-
+
if "DEPEX" in ReportType:
self.DepexReport.GenerateReport(File)
-
+
if "BUILD_FLAGS" in ReportType:
self.BuildFlagsReport.GenerateReport(File)
if "PREDICTION" in ReportType:
GlobalPredictionReport.GenerateReport(File, self.FileGuid)
-
+
FileWrite(File, gSectionEnd)
##
@@ -514,7 +514,7 @@
#
# This class reports the platform PCD section and module PCD subsection
# in the build report file.
-#
+#
class PcdReport(object):
##
# Constructor function for class PcdReport
@@ -547,11 +547,11 @@
PcdList.append(Pcd)
if len(Pcd.TokenCName) > self.MaxLen:
self.MaxLen = len(Pcd.TokenCName)
-
+
for ModuleKey in Pa.Platform.Modules:
#
# Collect PCD DEC default value.
- #
+ #
Module = Pa.Platform.Modules[ModuleKey]
for Package in Module.M.Module.Packages:
for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
@@ -575,7 +575,7 @@
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
-
+
##
# Generate report for PCD information
#
@@ -636,7 +636,7 @@
DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType))
DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
DscModuleOverrideValue = DscOverridePcds.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
-
+
if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
PcdDefaultValueNumber = int(Pcd.DefaultValue.strip(), 0)
if DecDefaultValue == None:
@@ -644,13 +644,13 @@
else:
DecDefaultValueNumber = int(DecDefaultValue.strip(), 0)
DecMatch = (DecDefaultValueNumber == PcdDefaultValueNumber)
-
+
if InfDefaultValue == None:
InfMatch = True
else:
InfDefaultValueNumber = int(InfDefaultValue.strip(), 0)
InfMatch = (InfDefaultValueNumber == PcdDefaultValueNumber)
-
+
if DscDefaultValue == None:
DscMatch = True
else:
@@ -661,20 +661,20 @@
DecMatch = True
else:
DecMatch = (DecDefaultValue == Pcd.DefaultValue)
-
+
if InfDefaultValue == None:
InfMatch = True
else:
InfMatch = (InfDefaultValue == Pcd.DefaultValue)
-
+
if DscDefaultValue == None:
DscMatch = True
else:
DscMatch = (DscDefaultValue == Pcd.DefaultValue)
-
+
#
# Report PCD item according to their override relationship
- #
+ #
if DecMatch and InfMatch:
FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
else:
@@ -687,10 +687,10 @@
FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
if DscDefaultValue != None:
FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
-
+
if InfDefaultValue != None:
FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
-
+
if DecDefaultValue != None and not DecMatch:
FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
@@ -704,11 +704,11 @@
if Match:
continue
FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault))
-
+
if ModulePcdSet == None:
FileWrite(File, gSectionEnd)
else:
- FileWrite(File, gSubSectionEnd)
+ FileWrite(File, gSubSectionEnd)
@@ -717,12 +717,12 @@
#
# This class reports the platform execution order prediction section and
# module load fixed address prediction subsection in the build report file.
-#
+#
class PredictionReport(object):
##
# Constructor function for class PredictionReport
#
- # This constructor function generates PredictionReport object for the platform.
+ # This constructor function generates PredictionReport object for the platform.
#
# @param self: The object pointer
# @param Wa Workspace context information
@@ -739,7 +739,7 @@
self.FixedMapDict = {}
self.ItemList = []
self.MaxLen = 0
-
+
#
# Collect all platform reference source files and GUID C Name
#
@@ -756,14 +756,14 @@
FindIncludeFiles(Source.Path, Module.IncludePathList, IncludeList)
for IncludeFile in IncludeList.values():
self._SourceList.append(" " + IncludeFile)
-
+
for Guid in Module.PpiList:
self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.PpiList[Guid])
for Guid in Module.ProtocolList:
self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.ProtocolList[Guid])
for Guid in Module.GuidList:
self._GuidMap[Guid] = GuidStructureStringToGuidString(Module.GuidList[Guid])
-
+
if Module.Guid and not Module.IsLibrary:
EntryPoint = " ".join(Module.Module.ModuleEntryPointList)
if int(str(Module.AutoGenVersion), 0) >= 0x00010005:
@@ -775,15 +775,15 @@
Match = gGlueLibEntryPoint.search(CCFlags)
if Match:
EntryPoint = Match.group(1)
-
+
self._FfsEntryPoint[Module.Guid.upper()] = (EntryPoint, RealEntryPoint)
-
-
+
+
#
# Collect platform firmware volume list as the input of EOT.
#
self._FvList = []
- if Wa.FdfProfile:
+ if Wa.FdfProfile:
for Fd in Wa.FdfProfile.FdDict:
for FdRegion in Wa.FdfProfile.FdDict[Fd].RegionList:
if FdRegion.RegionType != "FV":
@@ -801,17 +801,17 @@
self._FvList.append(FvSection.FvName)
except AttributeError:
pass
-
+
##
# Parse platform fixed address map files
#
# This function parses the platform final fixed address map file to get
# the database of predicted fixed address for module image base, entry point
- # etc.
+ # etc.
#
# @param self: The object pointer
- #
+ #
def _ParseMapFile(self):
if self._MapFileParsed:
return
@@ -829,25 +829,25 @@
List.append((AddressType, EntryPoint, "*E"))
except:
EdkLogger.warn(None, "Cannot open file to read", self._MapFileName)
-
+
##
# Invokes EOT tool to get the predicted the execution order.
#
# This function invokes EOT tool to calculate the predicted dispatch order
#
# @param self: The object pointer
- #
+ #
def _InvokeEotTool(self):
if self._EotToolInvoked:
return
-
- self._EotToolInvoked = True
+
+ self._EotToolInvoked = True
FvFileList = []
for FvName in self._FvList:
FvFile = os.path.join(self._FvDir, FvName + ".Fv")
if os.path.isfile(FvFile):
FvFileList.append(FvFile)
-
+
#
# Write source file list and GUID file list to an intermediate file
# as the input for EOT tool and dispatch List as the output file
@@ -856,7 +856,7 @@
SourceList = os.path.join(self._EotDir, "SourceFile.txt")
GuidList = os.path.join(self._EotDir, "GuidList.txt")
DispatchList = os.path.join(self._EotDir, "Dispatch.txt")
-
+
TempFile = open(SourceList, "w+")
for Item in self._SourceList:
FileWrite(TempFile, Item)
@@ -865,7 +865,7 @@
for Key in self._GuidMap:
FileWrite(TempFile, "%s %s" % (Key, self._GuidMap[Key]))
TempFile.close()
-
+
try:
from Eot.Eot import Eot
#
@@ -873,7 +873,7 @@
#
Eot(CommandLineOption=False, SourceFileList=SourceList, GuidList=GuidList,
FvFileList=' '.join(FvFileList), Dispatch=DispatchList, IsInit=True)
-
+
#
# Parse the output of EOT tool
#
@@ -884,9 +884,9 @@
self.MaxLen = len(Symbol)
self.ItemList.append((Phase, Symbol, FilePath))
except:
- EdkLogger.warn(None, "Failed to generate execution order prediction report, for some error occurred in executing EOT.")
+ EdkLogger.warn(None, "Failed to generate execution order prediction report, for some error occurred in executing EOT.")
-
+
##
# Generate platform execution order report
#
@@ -902,14 +902,14 @@
FileWrite(File, "*D DXE phase")
FileWrite(File, "*E Module INF entry point name")
FileWrite(File, "*N Module notification function name")
-
+
FileWrite(File, "Type %-*s %s" % (self.MaxLen, "Symbol", "Module INF Path"))
FileWrite(File, gSectionSep)
for Item in self.ItemList:
FileWrite(File, "*%sE %-*s %s" % (Item[0], self.MaxLen, Item[1], Item[2]))
-
+
FileWrite(File, gSectionStart)
-
+
##
# Generate Fixed Address report.
#
@@ -925,7 +925,7 @@
FixedAddressList = self.FixedMapDict.get(Guid)
if not FixedAddressList:
return
-
+
FileWrite(File, gSubSectionStart)
FileWrite(File, "Fixed Address Prediction")
FileWrite(File, "*I Image Loading Address")
@@ -935,7 +935,7 @@
FileWrite(File, "*M Memory Address")
FileWrite(File, "*S SMM RAM Address")
FileWrite(File, "TOM Top of Memory")
-
+
FileWrite(File, "Type Address Name")
FileWrite(File, gSubSectionSep)
for Item in FixedAddressList:
@@ -951,16 +951,16 @@
Symbol = "*N"
else:
continue
-
+
if "Flash" in Type:
Symbol += "F"
elif "Memory" in Type:
Symbol += "M"
else:
Symbol += "S"
-
+
if Value[0] == "-":
- Value = "TOM" + Value
+ Value = "TOM" + Value
FileWrite(File, "%s %-16s %s" % (Symbol, Value, Name))
@@ -968,7 +968,7 @@
# Generate report for the prediction part
#
# This function generate the predicted fixed address report for a module or
- # predicted module execution order for a platform.
+ # predicted module execution order for a platform.
# If the input Guid is None, then, it generates the predicted module execution order;
# otherwise it generated the module fixed loading address for the module specified by
# Guid.
@@ -985,11 +985,11 @@
else:
self._GenerateExecutionOrderReport(File)
-##
+##
# Reports FD region information
#
# This class reports the FD subsection in the build report file.
-# It collects region information of platform flash device.
+# It collects region information of platform flash device.
# If the region is a firmware volume, it lists the set of modules
# and its space information; otherwise, it only lists its region name,
# base address and size in its sub-section header.
@@ -1021,11 +1021,11 @@
self._DiscoverNestedFvList(FvSection.FvName, Wa)
except AttributeError:
pass
-
+
##
# Constructor function for class FdRegionReport
#
- # This constructor function generates FdRegionReport object for a specified FdRegion.
+ # This constructor function generates FdRegionReport object for a specified FdRegion.
# If the FdRegion is a firmware volume, it will recursively find all its nested Firmware
# volume list. This function also collects GUID map in order to dump module identification
# in the final report.
@@ -1045,11 +1045,11 @@
#
# If the input FdRegion is not a firmware volume,
- # we are done.
+ # we are done.
#
if self.Type != "FV":
return
-
+
#
# Find all nested FVs in the FdRegion
#
@@ -1066,17 +1066,17 @@
for ModuleKey in Pa.Platform.Modules:
#
# Collect PCD DEC default value.
- #
+ #
Module = Pa.Platform.Modules[ModuleKey]
for Package in Module.M.Module.Packages:
if Package not in PackageList:
PackageList.append(Package)
-
+
for Package in PackageList:
for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue
-
+
#
# Collect PCDs defined in DSC common section
#
@@ -1084,17 +1084,17 @@
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DscDefaultValue
-
+
#
# Add PEI and DXE a priori files GUIDs defined in PI specification.
#
self._GuidsDb["1B45CC0A-156A-428A-AF62-49864DA0E6E6"] = "PEI Apriori"
- self._GuidsDb["FC510EE7-FFDC-11D4-BD41-0080C73C8881"] = "DXE Apriori"
+ self._GuidsDb["FC510EE7-FFDC-11D4-BD41-0080C73C8881"] = "DXE Apriori"
#
# Add ACPI table storage file
#
self._GuidsDb["7E374E25-8E01-4FEE-87F2-390C23C606CD"] = "ACPI table storage"
-
+
for Pa in Wa.AutoGenObjectList:
for ModuleKey in Pa.Platform.Modules:
M = Pa.Platform.Modules[ModuleKey].M
@@ -1126,17 +1126,17 @@
pass
except AttributeError:
pass
-
-
+
+
##
# Internal worker function to generate report for the FD region
#
# This internal worker function to generate report for the FD region.
- # It the type is firmware volume, it lists offset and module identification.
+ # It the type is firmware volume, it lists offset and module identification.
#
# @param self The object pointer
# @param File The file object for report
- # @param Title The title for the FD subsection
+ # @param Title The title for the FD subsection
# @param BaseAddress The base address for the FD region
# @param Size The size of the FD region
# @param FvName The FV name if the FD region is a firmware volume
@@ -1146,7 +1146,7 @@
FileWrite(File, Title)
FileWrite(File, "Type: %s" % Type)
FileWrite(File, "Base Address: 0x%X" % BaseAddress)
-
+
if self.Type == "FV":
FvTotalSize = 0
FvTakenSize = 0
@@ -1163,7 +1163,7 @@
Match = gFvTakenSizePattern.search(FvReport)
if Match:
FvTakenSize = int(Match.group(1), 16)
- FvFreeSize = FvTotalSize - FvTakenSize
+ FvFreeSize = FvTotalSize - FvTakenSize
#
# Write size information to the report file.
#
@@ -1189,7 +1189,7 @@
##
# Generate report for the FD region
#
- # This function generates report for the FD region.
+ # This function generates report for the FD region.
#
# @param self The object pointer
# @param File The file object for report
@@ -1200,20 +1200,20 @@
Info = self.FvInfo[FvItem]
self._GenerateReport(File, Info[0], "FV", Info[1], Info[2], FvItem)
else:
- self._GenerateReport(File, "FD Region", self.Type, self.BaseAddress, self.Size)
-
+ self._GenerateReport(File, "FD Region", self.Type, self.BaseAddress, self.Size)
+
##
# ...
[truncated message content] |
|
From: <qh...@us...> - 2010-02-08 06:29:10
|
Revision: 1851
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1851&view=rev
Author: qhuang8
Date: 2010-02-08 06:29:04 +0000 (Mon, 08 Feb 2010)
Log Message:
-----------
Update to not generate EOT report when the FV list in empty
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-08 06:05:26 UTC (rev 1850)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-08 06:29:04 UTC (rev 1851)
@@ -848,6 +848,8 @@
if os.path.isfile(FvFile):
FvFileList.append(FvFile)
+ if len(FvFileList) == 0:
+ return
#
# Write source file list and GUID file list to an intermediate file
# as the input for EOT tool and dispatch List as the output file
@@ -896,6 +898,8 @@
# @param File The file object for report
#
def _GenerateExecutionOrderReport(self, File):
+ if len(self.ItemList) == 0:
+ return
FileWrite(File, gSectionStart)
FileWrite(File, "Execution Order Prediction")
FileWrite(File, "*P PEI phase")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-08 10:03:59
|
Revision: 1854
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1854&view=rev
Author: qhuang8
Date: 2010-02-08 10:03:53 +0000 (Mon, 08 Feb 2010)
Log Message:
-----------
Fix UEFI_SPECIFICATION_VERSION display defect.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-08 09:05:12 UTC (rev 1853)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-08 10:03:53 UTC (rev 1854)
@@ -480,7 +480,7 @@
if self.DriverType:
FileWrite(File, "Driver Type: %s" % self.DriverType)
if self.UefiSpecVersion:
- FileWrite(File, "UEFI Spec Version: %s" % self.DriverType)
+ FileWrite(File, "UEFI Spec Version: %s" % self.UefiSpecVersion)
if self.PiSpecVersion:
FileWrite(File, "PI Spec Version: %s" % self.PiSpecVersion)
if self.PciDeviceId:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-09 10:18:34
|
Revision: 1857
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1857&view=rev
Author: qhuang8
Date: 2010-02-09 10:18:16 +0000 (Tue, 09 Feb 2010)
Log Message:
-----------
Enhance PCD report to display Dynamic HII and VPD type PCD extra info
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-09 10:16:00 UTC (rev 1856)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-09 10:18:16 UTC (rev 1857)
@@ -256,7 +256,7 @@
self.Source = "DXS"
break
else:
- self.Depex = M.DepexExpressionList[M.ModuleType]
+ self.Depex = M.DepexExpressionList.get(M.ModuleType, "")
self.ModuleDepex = " ".join(M.Module.DepexExpression[M.Arch, M.ModuleType])
if not self.ModuleDepex:
self.ModuleDepex = "TRUE"
@@ -384,10 +384,9 @@
#
# @param self The object pointer
# @param M Module context information
- # @param DscOverridePcds Module DSC override PCD information
# @param ReportType The kind of report items in the final report file
#
- def __init__(self, M, DscOverridePcds, ReportType):
+ def __init__(self, M, ReportType):
self.ModuleName = M.Module.BaseName
self.ModuleInfPath = M.MetaFile.File
self.FileGuid = M.Guid
@@ -413,22 +412,14 @@
self._BuildDir = M.BuildDir
self.ModulePcdSet = {}
- self.ModuleDscOverridePcds = {}
if "PCD" in ReportType:
#
# Collect all module used PCD set: module INF referenced directly or indirectly.
# It also saves module INF default values of them in case they exist.
#
for Pcd in M.ModulePcdList + M.LibraryPcdList:
- self.ModulePcdSet.setdefault((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Type), Pcd.InfDefaultValue)
+ self.ModulePcdSet.setdefault((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Pcd.Type), (Pcd.InfDefaultValue, Pcd.DefaultValue))
- #
- # Collect module DSC override PCD set for report
- #
- for (PcdTokenCName, PcdTokenSpaceGuidCName) in DscOverridePcds:
- Pcd = DscOverridePcds[(PcdTokenCName, PcdTokenSpaceGuidCName)]
- self.ModuleDscOverridePcds.setdefault((PcdTokenCName, PcdTokenSpaceGuidCName), Pcd.DefaultValue)
-
self.LibraryReport = None
if "LIBRARY" in ReportType:
self.LibraryReport = LibraryReport(M)
@@ -493,7 +484,7 @@
FileWrite(File, gSectionSep)
if "PCD" in ReportType:
- GlobalPcdReport.GenerateReport(File, self.ModulePcdSet, self.ModuleDscOverridePcds)
+ GlobalPcdReport.GenerateReport(File, self.ModulePcdSet)
if "LIBRARY" in ReportType:
self.LibraryReport.GenerateReport(File)
@@ -565,7 +556,7 @@
TokenSpaceGuid = ModulePcd.TokenSpaceGuidCName
ModuleDefault = ModulePcd.DefaultValue
ModulePath = os.path.basename(Module.M.MetaFile.File)
- self.ModulePcdOverride.setdefault((TokenCName, TokenSpaceGuid), []).append((ModuleDefault, ModulePath))
+ self.ModulePcdOverride.setdefault((TokenCName, TokenSpaceGuid), {})[ModulePath] = ModuleDefault
#
# Collect PCDs defined in DSC common section
@@ -588,7 +579,7 @@
# platform PCD report
# @param DscOverridePcds Module DSC override PCDs set
#
- def GenerateReport(self, File, ModulePcdSet, DscOverridePcds):
+ def GenerateReport(self, File, ModulePcdSet):
if ModulePcdSet == None:
#
# For platform global PCD section
@@ -621,11 +612,17 @@
#
# Get PCD default value and their override relationship
#
+ DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType))
+ DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
InfDefaultValue = None
+ PcdValue = DecDefaultValue
+
+ if DscDefaultValue:
+ PcdValue = DscDefaultValue
if ModulePcdSet != None:
if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type) not in ModulePcdSet:
continue
- InfDefault = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]
+ InfDefault, PcdValue = ModulePcdSet[Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type]
if InfDefault == "":
InfDefault = None
if First:
@@ -633,44 +630,42 @@
FileWrite(File, "")
FileWrite(File, Key)
First = False
- DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType))
- DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
- DscModuleOverrideValue = DscOverridePcds.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
+
if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
- PcdDefaultValueNumber = int(Pcd.DefaultValue.strip(), 0)
+ PcdValueNumber = int(PcdValue.strip(), 0)
if DecDefaultValue == None:
DecMatch = True
else:
DecDefaultValueNumber = int(DecDefaultValue.strip(), 0)
- DecMatch = (DecDefaultValueNumber == PcdDefaultValueNumber)
+ DecMatch = (DecDefaultValueNumber == PcdValueNumber)
if InfDefaultValue == None:
InfMatch = True
else:
InfDefaultValueNumber = int(InfDefaultValue.strip(), 0)
- InfMatch = (InfDefaultValueNumber == PcdDefaultValueNumber)
+ InfMatch = (InfDefaultValueNumber == PcdValueNumber)
if DscDefaultValue == None:
DscMatch = True
else:
DscDefaultValueNumber = int(DscDefaultValue.strip(), 0)
- DscMatch = (DscDefaultValueNumber == PcdDefaultValueNumber)
+ DscMatch = (DscDefaultValueNumber == PcdValueNumber)
else:
if DecDefaultValue == None:
DecMatch = True
else:
- DecMatch = (DecDefaultValue == Pcd.DefaultValue)
+ DecMatch = (DecDefaultValue == PcdValue)
if InfDefaultValue == None:
InfMatch = True
else:
- InfMatch = (InfDefaultValue == Pcd.DefaultValue)
+ InfMatch = (InfDefaultValue == PcdValue)
if DscDefaultValue == None:
DscMatch = True
else:
- DscMatch = (DscDefaultValue == Pcd.DefaultValue)
+ DscMatch = (DscDefaultValue == PcdValue)
#
# Report PCD item according to their override relationship
@@ -678,29 +673,39 @@
if DecMatch and InfMatch:
FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
else:
- if DscMatch and DscModuleOverrideValue == None:
+ if DscMatch:
if (Pcd.TokenCName, Key) in self.FdfPcdSet:
FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
else:
FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
else:
FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
- if DscDefaultValue != None:
- FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
+
+ if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):
+ for SkuInfo in Pcd.SkuInfoList.values():
+ if TypeName in ('DYNHII', 'DEXHII'):
+ FileWrite(File, '%*s: %s: %s' % (self.MaxLen + 4, SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset))
+ else:
+ FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo.VpdOffset))
+
+ if not DscMatch and DscDefaultValue != None:
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
- if InfDefaultValue != None:
- FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
+ if not InfMatch and InfDefaultValue != None:
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
- if DecDefaultValue != None and not DecMatch:
- FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
+ if not DecMatch and DecDefaultValue != None:
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
if ModulePcdSet == None:
- for (ModuleDefault, ModulePath) in self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), []):
+ ModuleOverride = self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), {})
+ for ModulePath in ModuleOverride:
+ ModuleDefault = ModuleOverride[ModulePath]
if Pcd.DatumType in ('UINT8', 'UINT16', 'UINT32', 'UINT64'):
ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)
- Match = (ModulePcdDefaultValueNumber == PcdDefaultValueNumber)
+ Match = (ModulePcdDefaultValueNumber == PcdValueNumber)
else:
- Match = (ModuleDefault == Pcd.DefaultValue)
+ Match = (ModuleDefault == PcdValue)
if Match:
continue
FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault))
@@ -1294,13 +1299,7 @@
self.ModuleReportList = []
for Pa in Wa.AutoGenObjectList:
for ModuleKey in Pa.Platform.Modules:
- for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
- if ModuleKey in Platform.Modules:
- DscOverridePcds = Platform.Modules[ModuleKey].Pcds
- break
- else:
- DscOverridePcds = {}
- self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, DscOverridePcds, ReportType))
+ self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, ReportType))
@@ -1329,7 +1328,7 @@
FileWrite(File, "Report Content: %s" % ", ".join(ReportType))
if "PCD" in ReportType:
- self.PcdReport.GenerateReport(File, None, {})
+ self.PcdReport.GenerateReport(File, None)
if "FLASH" in ReportType:
for FdReportListItem in self.FdReportList:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-09 15:11:16
|
Revision: 1859
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1859&view=rev
Author: qhuang8
Date: 2010-02-09 15:11:09 +0000 (Tue, 09 Feb 2010)
Log Message:
-----------
Update PCD report for the correct override relationship
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-09 13:08:13 UTC (rev 1858)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-09 15:11:09 UTC (rev 1859)
@@ -525,7 +525,6 @@
else:
self.FdfPcdSet = {}
- self.DecPcdDefault = {}
self.ModulePcdOverride = {}
for Pa in Wa.AutoGenObjectList:
#
@@ -539,16 +538,8 @@
if len(Pcd.TokenCName) > self.MaxLen:
self.MaxLen = len(Pcd.TokenCName)
- for ModuleKey in Pa.Platform.Modules:
+ for Module in Pa.Platform.Modules.values():
#
- # Collect PCD DEC default value.
- #
- Module = Pa.Platform.Modules[ModuleKey]
- for Package in Module.M.Module.Packages:
- for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
- DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
- self.DecPcdDefault.setdefault((TokenCName, TokenSpaceGuidCName, DecType), DecDefaultValue)
- #
# Collect module override PCDs
#
for ModulePcd in Module.M.ModulePcdList + Module.M.LibraryPcdList:
@@ -558,7 +549,16 @@
ModulePath = os.path.basename(Module.M.MetaFile.File)
self.ModulePcdOverride.setdefault((TokenCName, TokenSpaceGuid), {})[ModulePath] = ModuleDefault
+
#
+ # Collect PCD DEC default value.
+ #
+ self.DecPcdDefault = {}
+ for Package in Wa.BuildDatabase.WorkspaceDb.PackageList:
+ for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
+ DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
+ self.DecPcdDefault.setdefault((TokenCName, TokenSpaceGuidCName, DecType), DecDefaultValue)
+ #
# Collect PCDs defined in DSC common section
#
self.DscPcdDefault = {}
@@ -614,9 +614,10 @@
#
DecDefaultValue = self.DecPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, DecType))
DscDefaultValue = self.DscPcdDefault.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
+ DscDefaultValue = self.FdfPcdSet.get((Pcd.TokenCName, Key), DscDefaultValue)
InfDefaultValue = None
+
PcdValue = DecDefaultValue
-
if DscDefaultValue:
PcdValue = DscDefaultValue
if ModulePcdSet != None:
@@ -671,15 +672,15 @@
# Report PCD item according to their override relationship
#
if DecMatch and InfMatch:
- FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+ FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
else:
if DscMatch:
if (Pcd.TokenCName, Key) in self.FdfPcdSet:
- FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+ FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
else:
- FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+ FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
else:
- FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', Pcd.DefaultValue))
+ FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):
for SkuInfo in Pcd.SkuInfoList.values():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-11 06:36:21
|
Revision: 1864
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1864&view=rev
Author: qhuang8
Date: 2010-02-11 06:36:15 +0000 (Thu, 11 Feb 2010)
Log Message:
-----------
Turn on report feature unconditionally for code coverage on various platform build.
This is temporal and should be removed later.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-11 06:18:05 UTC (rev 1863)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-11 06:36:15 UTC (rev 1864)
@@ -1363,6 +1363,14 @@
# @param ReportType The kind of report items in the final report file
#
def __init__(self, ReportFile, ReportType):
+ #
+ # @attention Temporarily turn on the report feature unconditionally for
+ # code coverage on different platform build validations.
+ # This should be removed after the verification is over
+ #
+ if not ReportFile:
+ ReportFile = "Report.txt"
+
self.ReportFile = ReportFile
if ReportFile:
self.ReportList = []
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-11 12:32:55
|
Revision: 1867
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1867&view=rev
Author: qhuang8
Date: 2010-02-11 12:32:39 +0000 (Thu, 11 Feb 2010)
Log Message:
-----------
Add log info if build report is successfully generated.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-11 11:06:13 UTC (rev 1866)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-11 12:32:39 UTC (rev 1867)
@@ -1414,6 +1414,7 @@
try:
for Report in self.ReportList:
Report.GenerateReport(File, BuildDuration, self.ReportType)
+ EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
File.close()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-12 08:29:40
|
Revision: 1873
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1873&view=rev
Author: qhuang8
Date: 2010-02-12 08:29:23 +0000 (Fri, 12 Feb 2010)
Log Message:
-----------
Use info to echo the report file location
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-12 08:28:55 UTC (rev 1872)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-12 08:29:23 UTC (rev 1873)
@@ -1414,7 +1414,7 @@
try:
for Report in self.ReportList:
Report.GenerateReport(File, BuildDuration, self.ReportType)
- EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
+ EdkLogger.info("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
File.close()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-20 03:23:05
|
Revision: 1878
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1878&view=rev
Author: qhuang8
Date: 2010-02-20 03:22:58 +0000 (Sat, 20 Feb 2010)
Log Message:
-----------
Use alternative algorithm to collect PCD default value from all platform dependent DEC files.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-19 18:50:56 UTC (rev 1877)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-20 03:22:58 UTC (rev 1878)
@@ -1071,23 +1071,15 @@
self._DiscoverNestedFvList(FvName, Wa)
PlatformPcds = {}
- for Pa in Wa.AutoGenObjectList:
- PackageList = []
- for ModuleKey in Pa.Platform.Modules:
- #
- # Collect PCD DEC default value.
- #
- Module = Pa.Platform.Modules[ModuleKey]
- for Package in Module.M.Module.Packages:
- if Package not in PackageList:
- PackageList.append(Package)
-
- for Package in PackageList:
- for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
- DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
- PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue
-
+
#
+ # Collect PCDs declared in DEC files.
+ #
+ for Package in Wa.BuildDatabase.WorkspaceDb.PackageList:
+ for (TokenCName, TokenSpaceGuidCName, DecType) in Package.Pcds:
+ DecDefaultValue = Package.Pcds[TokenCName, TokenSpaceGuidCName, DecType].DefaultValue
+ PlatformPcds[(TokenCName, TokenSpaceGuidCName)] = DecDefaultValue
+ #
# Collect PCDs defined in DSC common section
#
for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-21 09:28:04
|
Revision: 1879
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1879&view=rev
Author: qhuang8
Date: 2010-02-21 09:27:58 +0000 (Sun, 21 Feb 2010)
Log Message:
-----------
1. Ignore depex section for SEC, PEI_CORE & DXE_CORE
2. Show (None) if an EDKII module INF does not have [depex] section, although it is the same as TRUE
3. Always add () for library depex for consistency.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-20 03:22:58 UTC (rev 1878)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-21 09:27:58 UTC (rev 1879)
@@ -248,6 +248,13 @@
# @param M Module context information
#
def __init__(self, M):
+ self.Depex = ""
+ ModuleType = M.ModuleType
+ if not ModuleType:
+ ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
+ if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE"]:
+ return
+
for Source in M.SourceFileList:
if os.path.splitext(Source.Path)[1].lower() == ".dxs":
Match = gDxsDependencyPattern.search(open(Source.Path).read())
@@ -259,15 +266,13 @@
self.Depex = M.DepexExpressionList.get(M.ModuleType, "")
self.ModuleDepex = " ".join(M.Module.DepexExpression[M.Arch, M.ModuleType])
if not self.ModuleDepex:
- self.ModuleDepex = "TRUE"
+ self.ModuleDepex = "(None)"
LibDepexList = []
for Lib in M.DependentLibraryList:
LibDepex = " ".join(Lib.DepexExpression[M.Arch, M.ModuleType]).strip()
if LibDepex != "":
- if " " in LibDepex:
- LibDepex = "(" + LibDepex + ")"
- LibDepexList.append(LibDepex)
+ LibDepexList.append("(" + LibDepex + ")")
self.LibraryDepex = " AND ".join(LibDepexList)
if not self.LibraryDepex:
self.LibraryDepex = "(None)"
@@ -282,6 +287,9 @@
# @param File The file object for report
#
def GenerateReport(self, File):
+ if not self.Depex:
+ return
+
FileWrite(File, gSubSectionStart)
FileWrite(File, "Dependency Expression (DEPEX) from %s" % self.Source)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-21 10:42:30
|
Revision: 1880
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1880&view=rev
Author: qhuang8
Date: 2010-02-21 10:42:23 +0000 (Sun, 21 Feb 2010)
Log Message:
-----------
Defer the data collection for build report to make the build duration time more accurate.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-21 09:27:58 UTC (rev 1879)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-21 10:42:23 UTC (rev 1880)
@@ -1394,7 +1394,7 @@
#
def AddPlatformReport(self, Wa):
if self.ReportFile:
- self.ReportList.append(PlatformReport(Wa, self.ReportType))
+ self.ReportList.append(Wa)
##
# Generates the final report.
@@ -1412,8 +1412,8 @@
except IOError:
EdkLogger.error(None, FILE_OPEN_FAILURE, ExtraData=self.ReportFile)
try:
- for Report in self.ReportList:
- Report.GenerateReport(File, BuildDuration, self.ReportType)
+ for Wa in self.ReportList:
+ PlatformReport(Wa, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
EdkLogger.info("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-22 02:46:00
|
Revision: 1881
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1881&view=rev
Author: qhuang8
Date: 2010-02-22 02:45:51 +0000 (Mon, 22 Feb 2010)
Log Message:
-----------
Add debug logic to print trace entries for major logic of build report.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-21 10:42:23 UTC (rev 1880)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-22 02:45:51 UTC (rev 1881)
@@ -20,6 +20,8 @@
import re
import platform
import textwrap
+import traceback
+import sys
from datetime import datetime
from Common import EdkLogger
from Common.Misc import GuidStructureByteArrayToGuidString
@@ -27,6 +29,7 @@
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
## Pattern to extract contents in EDK DXS files
@@ -1414,9 +1417,12 @@
try:
for Wa in self.ReportList:
PlatformReport(Wa, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
- EdkLogger.info("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
+ EdkLogger.quiet("Report successfully saved to %s" % os.path.abspath(self.ReportFile))
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
+ except:
+ EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile)
+ EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
File.close()
# This acts like the main() function for the script, unless it is 'import'ed into another script.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-22 06:37:45
|
Revision: 1882
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1882&view=rev
Author: qhuang8
Date: 2010-02-22 06:37:38 +0000 (Mon, 22 Feb 2010)
Log Message:
-----------
Fix one bug about library dependency display issue.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-22 02:45:51 UTC (rev 1881)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-22 06:37:38 UTC (rev 1882)
@@ -222,7 +222,7 @@
LibDestructor = " ".join(LibraryItem[3])
if LibDestructor:
EdkIILibInfo += " D = " + LibConstructor
- LibDepex = " ".join(LibraryItem[3])
+ LibDepex = " ".join(LibraryItem[4])
if LibDepex:
EdkIILibInfo += " Depex = " + LibDepex
if EdkIILibInfo:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-24 07:12:53
|
Revision: 1892
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1892&view=rev
Author: qhuang8
Date: 2010-02-24 07:12:46 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Fix typo in platform summary report.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-24 03:27:13 UTC (rev 1891)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-24 07:12:46 UTC (rev 1892)
@@ -1327,7 +1327,7 @@
FileWrite(File, "Platform Summary")
FileWrite(File, "Platform Name: %s" % self.PlatformName)
FileWrite(File, "Platform DSC Path: %s" % self.PlatformDscPath)
- FileWrite(File, "Platform DSC Path: %s" % self.Architectures)
+ FileWrite(File, "Architectures: %s" % self.Architectures)
FileWrite(File, "Tool Chain: %s" % self.ToolChain)
FileWrite(File, "Target: %s" % self.Target)
FileWrite(File, "Output Path: %s" % self.OutputPath)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-24 09:01:00
|
Revision: 1895
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1895&view=rev
Author: qhuang8
Date: 2010-02-24 09:00:54 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Update to not raise error to fail the normal build if some un-handled exception is encountered in Build report logic.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-24 08:05:26 UTC (rev 1894)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-24 09:00:54 UTC (rev 1895)
@@ -1416,7 +1416,7 @@
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
except:
- EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile)
+ EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile, RaiseError=False)
EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
File.close()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-02-24 09:43:25
|
Revision: 1897
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1897&view=rev
Author: qhuang8
Date: 2010-02-24 09:43:15 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
1. Remove unconditionally build report for build tools stable snapshot candidate
2. Add debug print trace for the execution of EOT tool
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-24 09:18:03 UTC (rev 1896)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-02-24 09:43:15 UTC (rev 1897)
@@ -897,12 +897,15 @@
# Parse the output of EOT tool
#
for Line in open(DispatchList):
+ if len(Line.split()) < 4:
+ continue
(Guid, Phase, FfsName, FilePath) = Line.split()
Symbol = self._FfsEntryPoint.get(Guid, [FfsName, ""])[0]
if len(Symbol) > self.MaxLen:
self.MaxLen = len(Symbol)
self.ItemList.append((Phase, Symbol, FilePath))
except:
+ EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
EdkLogger.warn(None, "Failed to generate execution order prediction report, for some error occurred in executing EOT.")
@@ -1366,14 +1369,6 @@
# @param ReportType The kind of report items in the final report file
#
def __init__(self, ReportFile, ReportType):
- #
- # @attention Temporarily turn on the report feature unconditionally for
- # code coverage on different platform build validations.
- # This should be removed after the verification is over
- #
- if not ReportFile:
- ReportFile = "Report.txt"
-
self.ReportFile = ReportFile
if ReportFile:
self.ReportList = []
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-03-02 02:54:12
|
Revision: 1906
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1906&view=rev
Author: qhuang8
Date: 2010-03-02 02:54:05 +0000 (Tue, 02 Mar 2010)
Log Message:
-----------
Strip the leading and trailing blanks when comparing non-number type PcdValue and printing the PcdValue.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-01 10:46:27 UTC (rev 1905)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-02 02:54:05 UTC (rev 1906)
@@ -667,31 +667,31 @@
if DecDefaultValue == None:
DecMatch = True
else:
- DecMatch = (DecDefaultValue == PcdValue)
+ DecMatch = (DecDefaultValue.strip() == PcdValue.strip())
if InfDefaultValue == None:
InfMatch = True
else:
- InfMatch = (InfDefaultValue == PcdValue)
+ InfMatch = (InfDefaultValue.strip() == PcdValue.strip())
if DscDefaultValue == None:
DscMatch = True
else:
- DscMatch = (DscDefaultValue == PcdValue)
+ DscMatch = (DscDefaultValue.strip() == PcdValue.strip())
#
# Report PCD item according to their override relationship
#
if DecMatch and InfMatch:
- FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ FileWrite(File, ' %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))
else:
if DscMatch:
if (Pcd.TokenCName, Key) in self.FdfPcdSet:
- FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ FileWrite(File, ' *F %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))
else:
- FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ FileWrite(File, ' *P %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))
else:
- FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue))
+ FileWrite(File, ' *M %-*s: %6s %10s = %-22s' % (self.MaxLen, Pcd.TokenCName, TypeName, '('+Pcd.DatumType+')', PcdValue.strip()))
if TypeName in ('DYNHII', 'DEXHII', 'DYNVPD', 'DEXVPD'):
for SkuInfo in Pcd.SkuInfoList.values():
@@ -701,13 +701,13 @@
FileWrite(File, '%*s' % (self.MaxLen + 4, SkuInfo.VpdOffset))
if not DscMatch and DscDefaultValue != None:
- FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue))
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DSC DEFAULT', DscDefaultValue.strip()))
if not InfMatch and InfDefaultValue != None:
- FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue))
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'INF DEFAULT', InfDefaultValue.strip()))
if not DecMatch and DecDefaultValue != None:
- FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue))
+ FileWrite(File, ' %*s = %s' % (self.MaxLen + 19, 'DEC DEFAULT', DecDefaultValue.strip()))
if ModulePcdSet == None:
ModuleOverride = self.ModulePcdOverride.get((Pcd.TokenCName, Pcd.TokenSpaceGuidCName), {})
@@ -717,10 +717,10 @@
ModulePcdDefaultValueNumber = int(ModuleDefault.strip(), 0)
Match = (ModulePcdDefaultValueNumber == PcdValueNumber)
else:
- Match = (ModuleDefault == PcdValue)
+ Match = (ModuleDefault.strip() == PcdValue.strip())
if Match:
continue
- FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault))
+ FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 19, ModulePath, ModuleDefault.strip()))
if ModulePcdSet == None:
FileWrite(File, gSectionEnd)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-03-05 09:35:42
|
Revision: 1915
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1915&view=rev
Author: qhuang8
Date: 2010-03-05 09:35:36 +0000 (Fri, 05 Mar 2010)
Log Message:
-----------
Temporarily turn on the build report feature and dump the report contents to console so that it can be caught by build log.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-05 09:01:51 UTC (rev 1914)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-05 09:35:36 UTC (rev 1915)
@@ -1374,6 +1374,10 @@
# @param ReportType The kind of report items in the final report file
#
def __init__(self, ReportFile, ReportType):
+ # @attention Temporarily turn on the build report feature for debug and diagnose purpose.
+ if ReportFile == None:
+ ReportFile = "Report.txt"
+
self.ReportFile = ReportFile
if ReportFile:
self.ReportList = []
@@ -1422,6 +1426,12 @@
EdkLogger.error("BuildReport", CODE_ERROR, "Unknown fatal error when generating build report", ExtraData=self.ReportFile, RaiseError=False)
EdkLogger.quiet("(Python %s on %s\n%s)" % (platform.python_version(), sys.platform, traceback.format_exc()))
File.close()
+
+ # @attention Temporarily dump the context of report file so it can be caught in build log for debug
+ # and diagnose purpose.
+ EdkLogger.quiet("==================Dump Report Start===================================")
+ EdkLogger.quiet(open(self.ReportFile).read())
+ EdkLogger.quiet("==================Dump Report End=====================================")
# This acts like the main() function for the script, unless it is 'import'ed into another script.
if __name__ == '__main__':
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-03-09 07:01:45
|
Revision: 1920
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1920&view=rev
Author: qhuang8
Date: 2010-03-09 07:01:38 +0000 (Tue, 09 Mar 2010)
Log Message:
-----------
1. Fix a bug that library Destructor is not show properly in report.
2. Update driver type in module summary section to be free form if a module INF is not conventional.
3. Don't show global PCD section, flash section and execution order section for single module build mode.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-09 02:46:46 UTC (rev 1919)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-09 07:01:38 UTC (rev 1920)
@@ -221,7 +221,7 @@
EdkIILibInfo += " C = " + LibConstructor
LibDestructor = " ".join(LibraryItem[3])
if LibDestructor:
- EdkIILibInfo += " D = " + LibConstructor
+ EdkIILibInfo += " D = " + LibDestructor
LibDepex = " ".join(LibraryItem[4])
if LibDepex:
EdkIILibInfo += " Depex = " + LibDepex
@@ -404,17 +404,18 @@
self.Size = 0
self.BuildTimeStamp = None
self.DriverType = ""
- ModuleType = M.ModuleType
- if not ModuleType:
- ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
- #
- # If a module complies to PI 1.1, promote Module type to "SMM_DRIVER"
- #
- if ModuleType == "DXE_SMM_DRIVER":
- PiSpec = M.Module.Specification.get("PI_SPECIFICATION_VERSION", "0x00010000")
- if int(PiSpec, 0) >= 0x0001000A:
- ModuleType = "SMM_DRIVER"
- self.DriverType = gDriverTypeMap.get(ModuleType, "")
+ if not M.IsLibrary:
+ ModuleType = M.ModuleType
+ if not ModuleType:
+ ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
+ #
+ # If a module complies to PI 1.1, promote Module type to "SMM_DRIVER"
+ #
+ if ModuleType == "DXE_SMM_DRIVER":
+ PiSpec = M.Module.Specification.get("PI_SPECIFICATION_VERSION", "0x00010000")
+ if int(PiSpec, 0) >= 0x0001000A:
+ ModuleType = "SMM_DRIVER"
+ self.DriverType = gDriverTypeMap.get(ModuleType, "0x2 (FREE_FORM)")
self.UefiSpecVersion = M.Module.Specification.get("UEFI_SPECIFICATION_VERSION", "")
self.PiSpecVersion = M.Module.Specification.get("PI_SPECIFICATION_VERSION", "")
self.PciDeviceId = M.Module.Defines.get("PCI_DEVICE_ID", "")
@@ -1310,9 +1311,11 @@
self.ModuleReportList = []
if MaList != None:
+ self._IsModuleBuild = True
for Ma in MaList:
self.ModuleReportList.append(ModuleReport(Ma, ReportType))
else:
+ self._IsModuleBuild = False
for Pa in Wa.AutoGenObjectList:
for ModuleKey in Pa.Platform.Modules:
self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, ReportType))
@@ -1343,18 +1346,20 @@
FileWrite(File, "Build Duration: %s" % BuildDuration)
FileWrite(File, "Report Content: %s" % ", ".join(ReportType))
- if "PCD" in ReportType:
- self.PcdReport.GenerateReport(File, None)
+ if not self._IsModuleBuild:
+ if "PCD" in ReportType:
+ self.PcdReport.GenerateReport(File, None)
+
+ if "FLASH" in ReportType:
+ for FdReportListItem in self.FdReportList:
+ FdReportListItem.GenerateReport(File)
- if "FLASH" in ReportType:
- for FdReportListItem in self.FdReportList:
- FdReportListItem.GenerateReport(File)
-
for ModuleReportItem in self.ModuleReportList:
ModuleReportItem.GenerateReport(File, self.PcdReport, self.PredictionReport, ReportType)
- if "EXECUTION_ORDER" in ReportType:
- self.PredictionReport.GenerateReport(File, None)
+ if not self._IsModuleBuild:
+ if "EXECUTION_ORDER" in ReportType:
+ self.PredictionReport.GenerateReport(File, None)
## BuildReport class
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <qh...@us...> - 2010-03-09 07:50:10
|
Revision: 1921
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1921&view=rev
Author: qhuang8
Date: 2010-03-09 07:50:03 +0000 (Tue, 09 Mar 2010)
Log Message:
-----------
Do not show depex section for UEFI application or SMM core.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-09 07:01:38 UTC (rev 1920)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2010-03-09 07:50:03 UTC (rev 1921)
@@ -255,7 +255,8 @@
ModuleType = M.ModuleType
if not ModuleType:
ModuleType = gComponentType2ModuleType.get(M.ComponentType, "")
- if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE"]:
+
+ if ModuleType in ["SEC", "PEI_CORE", "DXE_CORE", "SMM_CORE", "UEFI_APPLICATION"]:
return
for Source in M.SourceFileList:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|