|
From: <yi...@us...> - 2013-04-02 05:22:42
|
Revision: 2577
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2577&view=rev
Author: yingke
Date: 2013-04-02 05:22:30 +0000 (Tue, 02 Apr 2013)
Log Message:
-----------
1. Don?\226?\128?\153t update *.ver files if generated version files are same with existed files
2. Use correct arch specified by build option to get necessary items other than get all items from DSC file when generating build report
3. Ignore unknown sections for EDK style INF modules
Reviewed-by: Gao Liming <lim...@in...>
Signed-off-by: Liu Yingke <yin...@in...>
Modified Paths:
--------------
trunk/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
trunk/BaseTools/Source/Python/build/BuildReport.py
Modified: trunk/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
===================================================================
--- trunk/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py 2013-03-27 01:49:07 UTC (rev 2576)
+++ trunk/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py 2013-04-02 05:22:30 UTC (rev 2577)
@@ -364,6 +364,7 @@
for SecAlign in InputAlign:
Cmd += ["--sectionalign", SecAlign]
+ CommandFile = Output + '.txt'
if Ui not in [None, '']:
#Cmd += ["-n", '"' + Ui + '"']
SectionData = array.array('B', [0,0,0,0])
@@ -378,12 +379,16 @@
if BuildNumber:
Cmd += ["-j", BuildNumber]
Cmd += ["-o", Output]
+
+ SaveFileOnChange(CommandFile, ' '.join(Cmd), False)
+ if not GenFdsGlobalVariable.NeedsUpdate(Output, list(Input) + [CommandFile]):
+ return
+
GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to generate section")
else:
Cmd += ["-o", Output]
Cmd += Input
- CommandFile = Output + '.txt'
SaveFileOnChange(CommandFile, ' '.join(Cmd), False)
if not GenFdsGlobalVariable.NeedsUpdate(Output, list(Input) + [CommandFile]):
return
Modified: trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2013-03-27 01:49:07 UTC (rev 2576)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2013-04-02 05:22:30 UTC (rev 2577)
@@ -286,16 +286,16 @@
self._SectionName = ItemList[0].upper()
if self._SectionName in self.DataType:
self._SectionType = self.DataType[self._SectionName]
+ # Check if the section name is valid
+ if self._SectionName not in SECTIONS_HAVE_ITEM_AFTER_ARCH and len(ItemList) > 2:
+ EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
+ self.MetaFile, self._LineIndex + 1, self._CurrentLine)
+ elif self._Version >= 0x00010005:
+ EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
+ self.MetaFile, self._LineIndex + 1, self._CurrentLine)
else:
self._SectionType = MODEL_UNKNOWN
- EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
- self.MetaFile, self._LineIndex + 1, self._CurrentLine)
- # Check if the section name is valid
- if self._SectionName not in SECTIONS_HAVE_ITEM_AFTER_ARCH and len(ItemList) > 2:
- EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR, "%s is not a valid section name" % Item,
- self.MetaFile, self._LineIndex + 1, self._CurrentLine)
-
# S1 is always Arch
if len(ItemList) > 1:
S1 = ItemList[1].upper()
Modified: trunk/BaseTools/Source/Python/build/BuildReport.py
===================================================================
--- trunk/BaseTools/Source/Python/build/BuildReport.py 2013-03-27 01:49:07 UTC (rev 2576)
+++ trunk/BaseTools/Source/Python/build/BuildReport.py 2013-04-02 05:22:30 UTC (rev 2577)
@@ -699,7 +699,8 @@
# Collect PCDs defined in DSC common section
#
self.DscPcdDefault = {}
- for Platform in Wa.BuildDatabase.WorkspaceDb.PlatformList:
+ for Arch in Wa.ArchList:
+ Platform = Wa.BuildDatabase[Wa.MetaFile, Arch, Wa.BuildTarget, Wa.ToolChain]
for (TokenCName, TokenSpaceGuidCName) in Platform.Pcds:
DscDefaultValue = Platform.Pcds[(TokenCName, TokenSpaceGuidCName)].DefaultValue
if DscDefaultValue:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|