diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-21 02:46:15 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-21 02:46:15 +0000 |
commit | 14c48571ae607277d11132c5e085d3ec1f12d236 (patch) | |
tree | 441ca75db8490ac7be9261744c446b76261da53b /BaseTools/Source | |
parent | d39c2afe2ed0ef6dadd5299843ad169c691443c6 (diff) | |
download | edk2-platforms-14c48571ae607277d11132c5e085d3ec1f12d236.tar.xz |
Sync EDKII BaseTools to BaseTools project r1997
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10680 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/C/GenFv/GenFvInternalLib.c | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenDepex.py | 9 | ||||
-rw-r--r-- | BaseTools/Source/Python/GenFds/FdfParser.py | 23 | ||||
-rw-r--r-- | BaseTools/Source/Python/GenFds/GuidSection.py | 21 |
4 files changed, 41 insertions, 14 deletions
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index 4ec8b72234..189dc431eb 100644 --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c @@ -1823,7 +1823,7 @@ Returns: }
// Add opcode for an uncondional branch with no link. AKA B SecEntryPoint
- ResetVector[0] |= 0xEA000000;
+ ResetVector[0] |= 0xEB000000;
// Address of PEI Core, if we have one
diff --git a/BaseTools/Source/Python/AutoGen/GenDepex.py b/BaseTools/Source/Python/AutoGen/GenDepex.py index b652051ac1..f80824b744 100644 --- a/BaseTools/Source/Python/AutoGen/GenDepex.py +++ b/BaseTools/Source/Python/AutoGen/GenDepex.py @@ -423,7 +423,14 @@ def Main(): Dpx = DependencyExpression(DxsString, Option.ModuleType, Option.Optimize)
if Option.OutputFile != None:
- Dpx.Generate(Option.OutputFile)
+ FileChangeFlag = Dpx.Generate(Option.OutputFile)
+ if not FileChangeFlag and DxsFile:
+ #
+ # Touch the output file if its time stamp is older than the original
+ # DXS file to avoid re-invoke this tool for the dependency check in build rule.
+ #
+ if os.stat(DxsFile)[8] > os.stat(Option.OutputFile)[8]:
+ os.utime(Option.OutputFile, None)
else:
Dpx.Generate()
except BaseException, X:
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 69a4898499..c4358cf479 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -43,6 +43,8 @@ import OptRomFileStatement from GenFdsGlobalVariable import GenFdsGlobalVariable
from Common.BuildToolError import *
from Common import EdkLogger
+from Common.Misc import PathClass
+from Common.String import NormPath
import re
import os
@@ -205,6 +207,8 @@ class FdfParser: self.__SkippedChars = ""
self.__WipeOffArea = []
+ if GenFdsGlobalVariable.WorkSpaceDir == '':
+ GenFdsGlobalVariable.WorkSpaceDir = os.getenv("WORKSPACE")
## __IsWhiteSpace() method
#
@@ -2145,6 +2149,11 @@ class FdfParser: if not self.__GetNextToken():
raise Warning("expected INF file path", self.FileName, self.CurrentLineNumber)
ffsInf.InfFileName = self.__Token
+ if ffsInf.InfFileName.replace('$(WORKSPACE)', '').find('$') == -1:
+ #do case sensitive check for file path
+ ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
+ if ErrorCode != 0:
+ EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
if not ffsInf.InfFileName in self.Profile.InfList:
self.Profile.InfList.append(ffsInf.InfFileName)
@@ -2352,6 +2361,11 @@ class FdfParser: self.__GetSectionData( FfsFileObj, MacroDict)
else:
FfsFileObj.FileName = self.__Token
+ if FfsFileObj.FileName.replace('$(WORKSPACE)', '').find('$') == -1:
+ #do case sensitive check for file path
+ ErrorCode, ErrorInfo = PathClass(NormPath(FfsFileObj.FileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
+ if ErrorCode != 0:
+ EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
if not self.__IsToken( "}"):
raise Warning("expected '}'", self.FileName, self.CurrentLineNumber)
@@ -2597,6 +2611,11 @@ class FdfParser: if not self.__GetNextToken():
raise Warning("expected section file path", self.FileName, self.CurrentLineNumber)
DataSectionObj.SectFileName = self.__Token
+ if DataSectionObj.SectFileName.replace('$(WORKSPACE)', '').find('$') == -1:
+ #do case sensitive check for file path
+ ErrorCode, ErrorInfo = PathClass(NormPath(DataSectionObj.SectFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
+ if ErrorCode != 0:
+ EdkLogger.error("GenFds", ErrorCode, ExtraData=ErrorInfo)
else:
if not self.__GetCglSection(DataSectionObj):
return False
@@ -2684,8 +2703,8 @@ class FdfParser: def __GetGuidAttrib(self):
AttribDict = {}
- AttribDict["PROCESSING_REQUIRED"] = False
- AttribDict["AUTH_STATUS_VALID"] = False
+ AttribDict["PROCESSING_REQUIRED"] = "NONE"
+ AttribDict["AUTH_STATUS_VALID"] = "NONE"
if self.__IsKeyword("PROCESSING_REQUIRED") or self.__IsKeyword("AUTH_STATUS_VALID"):
AttribKey = self.__Token
diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py index 0ef5a23716..bd95f56720 100644 --- a/BaseTools/Source/Python/GenFds/GuidSection.py +++ b/BaseTools/Source/Python/GenFds/GuidSection.py @@ -193,16 +193,17 @@ class GuidSection(GuidSectionClassObject) : Attribute = []
HeaderLength = None
- if TempFileSize > InputFileSize and TempFileSize % 4 == 0:
- FileHandleIn.seek(0)
- BufferIn = FileHandleIn.read()
- FileHandleOut.seek(0)
- BufferOut = FileHandleOut.read()
- if BufferIn == BufferOut[TempFileSize - InputFileSize:]:
- HeaderLength = str(TempFileSize - InputFileSize)
- #auto sec guided attribute with process required
- if HeaderLength == None:
- Attribute.append('PROCESSING_REQUIRED')
+ if self.ProcessRequired == "NONE":
+ if TempFileSize > InputFileSize and TempFileSize % 4 == 0:
+ FileHandleIn.seek(0)
+ BufferIn = FileHandleIn.read()
+ FileHandleOut.seek(0)
+ BufferOut = FileHandleOut.read()
+ if BufferIn == BufferOut[TempFileSize - InputFileSize:]:
+ HeaderLength = str(TempFileSize - InputFileSize)
+ #auto sec guided attribute with process required
+ if HeaderLength == None:
+ Attribute.append('PROCESSING_REQUIRED')
FileHandleIn.close()
FileHandleOut.close()
|