summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-14 06:30:37 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-10-14 06:30:37 +0000
commita72526804846e44773174a7b4800168e889d831a (patch)
tree507ba239c8cf71c4060a6b488d975c2ab819de48 /BaseTools
parent5b7183efb1e24f3d32f97c9a619ae69f61f4c0a1 (diff)
downloadedk2-a72526804846e44773174a7b4800168e889d831a.tar.gz
edk2-a72526804846e44773174a7b4800168e889d831a.tar.bz2
edk2-a72526804846e44773174a7b4800168e889d831a.zip
Sync EDKII BaseTools to BaseTools project r2068.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10937 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rwxr-xr-xBaseTools/Bin/Win32/BootSectImage.exebin393216 -> 393216 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiLdrImage.exebin421888 -> 421888 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiRom.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenBootSector.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenCrc32.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenDepex.exebin615733 -> 615937 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFds.exebin1556038 -> 1557031 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFfs.exebin430080 -> 430080 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFv.exebin479232 -> 479232 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFw.exebin495616 -> 495616 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenPage.exebin421888 -> 421888 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenPatchPcdTable.exebin609730 -> 609934 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenSec.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenVtf.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/LzmaCompress.exebin397312 -> 397312 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Spd2Dec.exebin1389763 -> 1389967 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Split.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TianoCompress.exebin434176 -> 434176 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Trim.exebin680026 -> 680394 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VfrCompile.exebin1187840 -> 1187840 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VolInfo.exebin471040 -> 471040 bytes
-rwxr-xr-xBaseTools/Bin/Win32/build.exebin2635744 -> 2636737 bytes
-rw-r--r--BaseTools/Source/Python/Common/Misc.py7
-rw-r--r--BaseTools/Source/Python/Trim/Trim.py25
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py19
25 files changed, 43 insertions, 8 deletions
diff --git a/BaseTools/Bin/Win32/BootSectImage.exe b/BaseTools/Bin/Win32/BootSectImage.exe
index c628a946dd..7c4dc10481 100755
--- a/BaseTools/Bin/Win32/BootSectImage.exe
+++ b/BaseTools/Bin/Win32/BootSectImage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/EfiLdrImage.exe b/BaseTools/Bin/Win32/EfiLdrImage.exe
index 2d42e0fff4..8b760e51f5 100755
--- a/BaseTools/Bin/Win32/EfiLdrImage.exe
+++ b/BaseTools/Bin/Win32/EfiLdrImage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/EfiRom.exe b/BaseTools/Bin/Win32/EfiRom.exe
index 9a1db5f3d0..ab969edab3 100755
--- a/BaseTools/Bin/Win32/EfiRom.exe
+++ b/BaseTools/Bin/Win32/EfiRom.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenBootSector.exe b/BaseTools/Bin/Win32/GenBootSector.exe
index 4e68e76967..0327a9ec34 100755
--- a/BaseTools/Bin/Win32/GenBootSector.exe
+++ b/BaseTools/Bin/Win32/GenBootSector.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenCrc32.exe b/BaseTools/Bin/Win32/GenCrc32.exe
index 671e04ee6a..799d0be54e 100755
--- a/BaseTools/Bin/Win32/GenCrc32.exe
+++ b/BaseTools/Bin/Win32/GenCrc32.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenDepex.exe b/BaseTools/Bin/Win32/GenDepex.exe
index 3e6685ce38..4bea183fad 100755
--- a/BaseTools/Bin/Win32/GenDepex.exe
+++ b/BaseTools/Bin/Win32/GenDepex.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFds.exe b/BaseTools/Bin/Win32/GenFds.exe
index 1df44e6714..dc0cc346ba 100755
--- a/BaseTools/Bin/Win32/GenFds.exe
+++ b/BaseTools/Bin/Win32/GenFds.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFfs.exe b/BaseTools/Bin/Win32/GenFfs.exe
index 92a1c1540e..46f56abbb1 100755
--- a/BaseTools/Bin/Win32/GenFfs.exe
+++ b/BaseTools/Bin/Win32/GenFfs.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFv.exe b/BaseTools/Bin/Win32/GenFv.exe
index 882c2d1d09..aa505ba2ca 100755
--- a/BaseTools/Bin/Win32/GenFv.exe
+++ b/BaseTools/Bin/Win32/GenFv.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenFw.exe b/BaseTools/Bin/Win32/GenFw.exe
index 4db22ba547..1b299bba32 100755
--- a/BaseTools/Bin/Win32/GenFw.exe
+++ b/BaseTools/Bin/Win32/GenFw.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenPage.exe b/BaseTools/Bin/Win32/GenPage.exe
index 0d3e6615aa..e3eaad8bb4 100755
--- a/BaseTools/Bin/Win32/GenPage.exe
+++ b/BaseTools/Bin/Win32/GenPage.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenPatchPcdTable.exe b/BaseTools/Bin/Win32/GenPatchPcdTable.exe
index 1262bf6f06..d404b47642 100755
--- a/BaseTools/Bin/Win32/GenPatchPcdTable.exe
+++ b/BaseTools/Bin/Win32/GenPatchPcdTable.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenSec.exe b/BaseTools/Bin/Win32/GenSec.exe
index 74d3379adc..4d78a1a916 100755
--- a/BaseTools/Bin/Win32/GenSec.exe
+++ b/BaseTools/Bin/Win32/GenSec.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenVtf.exe b/BaseTools/Bin/Win32/GenVtf.exe
index fc1f860fec..50fa7e9e6d 100755
--- a/BaseTools/Bin/Win32/GenVtf.exe
+++ b/BaseTools/Bin/Win32/GenVtf.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/LzmaCompress.exe b/BaseTools/Bin/Win32/LzmaCompress.exe
index 2f74e0f8a9..c65ced3dc1 100755
--- a/BaseTools/Bin/Win32/LzmaCompress.exe
+++ b/BaseTools/Bin/Win32/LzmaCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Spd2Dec.exe b/BaseTools/Bin/Win32/Spd2Dec.exe
index bc58b468fa..436ae8942c 100755
--- a/BaseTools/Bin/Win32/Spd2Dec.exe
+++ b/BaseTools/Bin/Win32/Spd2Dec.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Split.exe b/BaseTools/Bin/Win32/Split.exe
index 097824af66..cd4b4aff6c 100755
--- a/BaseTools/Bin/Win32/Split.exe
+++ b/BaseTools/Bin/Win32/Split.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TianoCompress.exe b/BaseTools/Bin/Win32/TianoCompress.exe
index 8fe45a52d9..994226ab57 100755
--- a/BaseTools/Bin/Win32/TianoCompress.exe
+++ b/BaseTools/Bin/Win32/TianoCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Trim.exe b/BaseTools/Bin/Win32/Trim.exe
index 4c6993bf3b..527bff8035 100755
--- a/BaseTools/Bin/Win32/Trim.exe
+++ b/BaseTools/Bin/Win32/Trim.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VfrCompile.exe b/BaseTools/Bin/Win32/VfrCompile.exe
index cf31c305a0..21e66b81c7 100755
--- a/BaseTools/Bin/Win32/VfrCompile.exe
+++ b/BaseTools/Bin/Win32/VfrCompile.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VolInfo.exe b/BaseTools/Bin/Win32/VolInfo.exe
index d7d30c45d6..0f1bbc820a 100755
--- a/BaseTools/Bin/Win32/VolInfo.exe
+++ b/BaseTools/Bin/Win32/VolInfo.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/build.exe b/BaseTools/Bin/Win32/build.exe
index 05ab7c1daf..dd3a45b37c 100755
--- a/BaseTools/Bin/Win32/build.exe
+++ b/BaseTools/Bin/Win32/build.exe
Binary files differ
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 311749285f..e2dc5a5e52 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1172,14 +1172,15 @@ def ParseConsoleLog(Filename):
#
def CheckPcdDatum(Type, Value):
if Type == "VOID*":
- if not ((Value.startswith('L"') or Value.startswith('"') and Value.endswith('"'))
+ if not (((Value.startswith('L"') or Value.startswith('"')) and Value.endswith('"'))
or (Value.startswith('{') and Value.endswith('}'))
):
return False, "Invalid value [%s] of type [%s]; must be in the form of {...} for array"\
", or \"...\" for string, or L\"...\" for unicode string" % (Value, Type)
elif Type == 'BOOLEAN':
- if Value not in ['TRUE', 'FALSE']:
- return False, "Invalid value [%s] of type [%s]; must be TRUE or FALSE" % (Value, Type)
+ if Value not in ['TRUE', 'True', 'true', '0x1', '0x01', '1', 'FALSE', 'False', 'false', '0x0', '0x00', '0']:
+ return False, "Invalid value [%s] of type [%s]; must be one of TRUE, True, true, 0x1, 0x01, 1"\
+ ", FALSE, False, false, 0x0, 0x00, 0" % (Value, Type)
elif type(Value) == type(""):
try:
Value = long(Value, 0)
diff --git a/BaseTools/Source/Python/Trim/Trim.py b/BaseTools/Source/Python/Trim/Trim.py
index b3ad16715a..bfa2b7b590 100644
--- a/BaseTools/Source/Python/Trim/Trim.py
+++ b/BaseTools/Source/Python/Trim/Trim.py
@@ -41,7 +41,7 @@ gHexNumberPattern = re.compile("0[xX]([0-9a-fA-F]+)")
## Regular expression for matching "Include ()" in asl file
gAslIncludePattern = re.compile("^(\s*)[iI]nclude\s*\(\"?([^\"\(\)]+)\"\)", re.MULTILINE)
## Regular expression for matching C style #include "XXX.asl" in asl file
-gAslCIncludePattern = re.compile(r'^(\s*)#include\s*[<"]\s*([-\\/\w.]+)\s*[>"]', re.MULTILINE)
+gAslCIncludePattern = re.compile(r'^(\s*)#include\s*[<"]\s*([-\\/\w.]+)\s*([>"])', re.MULTILINE)
## Regular expression for matching constant with 'ULL' and 'UL', 'LL', 'L' postfix
gLongNumberPattern = re.compile("(0[xX][0-9a-fA-F]+|[0-9]+)U?LL", re.MULTILINE)
## Patterns used to convert EDK conventions to EDK2 ECP conventions
@@ -273,12 +273,23 @@ def TrimPreprocessedVfr(Source, Target):
# @param Source File to be read
# @param Indent Spaces before the Include() statement
# @param IncludePathList The list of external include file
+# @param LocalSearchPath If LocalSearchPath is specified, this path will be searched
+# first for the included file; otherwise, only the path specified
+# in the IncludePathList will be searched.
#
-def DoInclude(Source, Indent='', IncludePathList=[]):
+def DoInclude(Source, Indent='', IncludePathList=[], LocalSearchPath=None):
NewFileContent = []
try:
- for IncludePath in IncludePathList:
+ #
+ # Search LocalSearchPath first if it is specified.
+ #
+ if LocalSearchPath:
+ SearchPathList = [LocalSearchPath] + IncludePathList
+ else:
+ SearchPathList = IncludePathList
+
+ for IncludePath in SearchPathList:
IncludeFile = os.path.join(IncludePath, Source)
if os.path.isfile(IncludeFile):
F = open(IncludeFile, "r")
@@ -298,15 +309,21 @@ def DoInclude(Source, Indent='', IncludePathList=[]):
gIncludedAslFile.append(IncludeFile)
for Line in F:
+ LocalSearchPath = None
Result = gAslIncludePattern.findall(Line)
if len(Result) == 0:
Result = gAslCIncludePattern.findall(Line)
if len(Result) == 0 or os.path.splitext(Result[0][1])[1].lower() not in [".asl", ".asi"]:
NewFileContent.append("%s%s" % (Indent, Line))
continue
+ #
+ # We should first search the local directory if current file are using pattern #include "XXX"
+ #
+ if Result[0][2] == '"':
+ LocalSearchPath = os.path.dirname(IncludeFile)
CurrentIndent = Indent + Result[0][0]
IncludedFile = Result[0][1]
- NewFileContent.extend(DoInclude(IncludedFile, CurrentIndent, IncludePathList))
+ NewFileContent.extend(DoInclude(IncludedFile, CurrentIndent, IncludePathList, LocalSearchPath))
NewFileContent.append("\n")
gIncludedAslFile.pop()
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 3c7d7fdf6a..2b25dc42ae 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -503,6 +503,13 @@ class InfParser(MetaFileParser):
EdkLogger.error('Parser', FORMAT_INVALID, "No token space GUID or PCD name specified",
ExtraData=self._CurrentLine + " (<TokenSpaceGuidCName>.<PcdCName>)",
File=self.MetaFile, Line=self._LineIndex+1)
+ # if value are 'True', 'true', 'TRUE' or 'False', 'false', 'FALSE', replace with integer 1 or 0.
+ if self._ValueList[2] != '':
+ InfPcdValueList = GetSplitValueList(TokenList[1], TAB_VALUE_SPLIT, 1)
+ if InfPcdValueList[0] in ['True', 'true', 'TRUE']:
+ self._ValueList[2] = TokenList[1].replace(InfPcdValueList[0], '1', 1);
+ elif InfPcdValueList[0] in ['False', 'false', 'FALSE']:
+ self._ValueList[2] = TokenList[1].replace(InfPcdValueList[0], '0', 1);
## [depex] section parser
def _DepexParser(self):
@@ -929,7 +936,13 @@ class DscParser(MetaFileParser):
EdkLogger.error('Parser', FORMAT_INVALID, "No PCD value given",
ExtraData=self._CurrentLine + " (<TokenSpaceGuidCName>.<TokenCName>|<PcdValue>)",
File=self.MetaFile, Line=self._LineIndex+1)
-
+ # if value are 'True', 'true', 'TRUE' or 'False', 'false', 'FALSE', replace with integer 1 or 0.
+ DscPcdValueList = GetSplitValueList(TokenList[1], TAB_VALUE_SPLIT, 1)
+ if DscPcdValueList[0] in ['True', 'true', 'TRUE']:
+ self._ValueList[2] = TokenList[1].replace(DscPcdValueList[0], '1', 1);
+ elif DscPcdValueList[0] in ['False', 'false', 'FALSE']:
+ self._ValueList[2] = TokenList[1].replace(DscPcdValueList[0], '0', 1);
+
## [components] section parser
def _ComponentParser(self):
if self._CurrentLine[-1] == '{':
@@ -1226,6 +1239,10 @@ class DecParser(MetaFileParser):
if not IsValid:
EdkLogger.error('Parser', FORMAT_INVALID, Cause, ExtraData=self._CurrentLine,
File=self.MetaFile, Line=self._LineIndex+1)
+ if ValueList[0] in ['True', 'true', 'TRUE']:
+ ValueList[0] = '1'
+ elif ValueList[0] in ['False', 'false', 'FALSE']:
+ ValueList[0] = '0'
self._ValueList[2] = ValueList[0].strip() + '|' + ValueList[1].strip() + '|' + ValueList[2].strip()