summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBaseTools/Bin/CYGWIN_NT-5.1-i686/fpd2dsc5
-rwxr-xr-xBaseTools/Bin/CYGWIN_NT-5.1-i686/msa2inf5
-rwxr-xr-xBaseTools/Bin/CYGWIN_NT-5.1-i686/spd2dec5
-rw-r--r--BaseTools/Bin/Win32/BPDG.exebin579301 -> 579301 bytes
-rwxr-xr-xBaseTools/Bin/Win32/BootSectImage.exebin434176 -> 434176 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiLdrImage.exebin421888 -> 421888 bytes
-rwxr-xr-xBaseTools/Bin/Win32/EfiRom.exebin446464 -> 446464 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Fpd2Dsc.exebin1432708 -> 0 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.exebin637672 -> 637892 bytes
-rwxr-xr-xBaseTools/Bin/Win32/GenFds.exebin1646631 -> 1650976 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.exebin631676 -> 631896 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
-rw-r--r--BaseTools/Bin/Win32/LzmaF86Compress.bat29
-rwxr-xr-xBaseTools/Bin/Win32/MigrationMsa2Inf.exebin1378094 -> 0 bytes
-rwxr-xr-xBaseTools/Bin/Win32/PatchPcdValue.exebin563443 -> 563443 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Spd2Dec.exebin665034 -> 0 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Split.exebin425984 -> 425984 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TargetTool.exebin585291 -> 585454 bytes
-rwxr-xr-xBaseTools/Bin/Win32/TianoCompress.exebin434176 -> 434176 bytes
-rwxr-xr-xBaseTools/Bin/Win32/Trim.exebin843112 -> 843332 bytes
-rw-r--r--BaseTools/Bin/Win32/UPT.exebin2331295 -> 2331295 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VfrCompile.exebin1277952 -> 1277952 bytes
-rwxr-xr-xBaseTools/Bin/Win32/VolInfo.exebin471040 -> 471040 bytes
-rwxr-xr-xBaseTools/Bin/Win32/build.exebin3066339 -> 3073401 bytes
l---------BaseTools/BinWrappers/PosixLike/fpd2dsc1
l---------BaseTools/BinWrappers/PosixLike/msa2inf1
l---------BaseTools/BinWrappers/PosixLike/spd2dec1
-rwxr-xr-xBaseTools/BuildEnv25
-rw-r--r--BaseTools/Conf/XMLSchema/FarManifest.xsd174
-rw-r--r--BaseTools/Conf/XMLSchema/FrameworkDataAttributes.xsd180
-rw-r--r--BaseTools/Conf/XMLSchema/FrameworkDataElements.xsd728
-rw-r--r--BaseTools/Conf/XMLSchema/FrameworkDataTypes.xsd581
-rw-r--r--BaseTools/Conf/XMLSchema/FrameworkHeaders.xsd93
-rw-r--r--BaseTools/Conf/XMLSchema/NamingConvention.xsd186
-rw-r--r--BaseTools/Conf/XMLSchema/SurfaceArea.xsd82
-rw-r--r--BaseTools/Conf/XMLSchema/SurfaceArea.xsdconfig16
-rw-r--r--BaseTools/Conf/XMLSchema/WorkspaceContent.xsd409
-rw-r--r--BaseTools/Conf/build_rule.template4
-rw-r--r--BaseTools/Conf/tools_def.template565
-rw-r--r--BaseTools/Source/C/GNUmakefile7
-rw-r--r--BaseTools/Source/C/Include/Common/BuildVersion.h2
-rw-r--r--BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h4
-rw-r--r--BaseTools/Source/C/LzmaCompress/GNUmakefile5
-rw-r--r--BaseTools/Source/C/LzmaCompress/LzmaCompress.c240
-rw-r--r--BaseTools/Source/C/LzmaCompress/LzmaF86Compress.bat31
-rw-r--r--BaseTools/Source/C/LzmaCompress/Makefile14
-rw-r--r--BaseTools/Source/C/LzmaCompress/Sdk/C/Bra.h60
-rw-r--r--BaseTools/Source/C/LzmaCompress/Sdk/C/Bra86.c85
-rw-r--r--BaseTools/Source/C/Makefile3
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp4
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h6
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp86
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrUtilityLib.h7
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py32
-rw-r--r--BaseTools/Source/Python/AutoGen/BuildEngine.py7
-rw-r--r--BaseTools/Source/Python/AutoGen/GenC.py20
-rw-r--r--BaseTools/Source/Python/Common/BuildVersion.py2
-rw-r--r--BaseTools/Source/Python/Common/DataType.py9
-rw-r--r--BaseTools/Source/Python/Common/Expression.py22
-rw-r--r--BaseTools/Source/Python/Common/GlobalData.py4
-rw-r--r--BaseTools/Source/Python/Common/String.py4
-rw-r--r--BaseTools/Source/Python/Ecc/Ecc.py16
-rw-r--r--BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py5
-rw-r--r--BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py3
-rw-r--r--BaseTools/Source/Python/Fdb/__init__.py15
-rw-r--r--BaseTools/Source/Python/FixFlash/__init__.py15
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py43
-rw-r--r--BaseTools/Source/Python/GenFds/Ffs.py1
-rw-r--r--BaseTools/Source/Python/GenFds/GenFds.py11
-rw-r--r--BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py4
-rw-r--r--BaseTools/Source/Python/Makefile11
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py369
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py2478
-rw-r--r--BaseTools/Source/Python/MigrationMsa2Inf/__init__.py15
-rw-r--r--BaseTools/Source/Python/MkBOM/__init__.py15
-rw-r--r--BaseTools/Source/Python/UPT/BuildVersion.py2
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py94
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileTable.py4
-rw-r--r--BaseTools/Source/Python/Workspace/WorkspaceDatabase.py24
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py65
-rw-r--r--BaseTools/Source/Python/build/build.py20
-rw-r--r--BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py327
-rw-r--r--BaseTools/Source/Python/fpd2dsc/LoadFpd.py1039
-rw-r--r--BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py563
-rw-r--r--BaseTools/Source/Python/fpd2dsc/StoreDsc.py765
-rw-r--r--BaseTools/Source/Python/fpd2dsc/__init__.py15
-rw-r--r--BaseTools/Source/Python/fpd2dsc/fpd2dsc.py117
-rw-r--r--BaseTools/Source/Python/msa2inf/ConvertModule.py112
-rw-r--r--BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py325
-rw-r--r--BaseTools/Source/Python/msa2inf/LoadMsa.py747
-rw-r--r--BaseTools/Source/Python/msa2inf/Msa2Inf.py44
-rw-r--r--BaseTools/Source/Python/msa2inf/StoreInf.py442
-rw-r--r--BaseTools/Source/Python/msa2inf/__init__.py15
-rw-r--r--BaseTools/Source/Python/spd2dec/ConvertPackage.py66
-rw-r--r--BaseTools/Source/Python/spd2dec/LoadSpd.py273
-rw-r--r--BaseTools/Source/Python/spd2dec/Spd2Dec.py46
-rw-r--r--BaseTools/Source/Python/spd2dec/StoreDec.py247
-rw-r--r--BaseTools/Source/Python/spd2dec/__init__.py15
-rw-r--r--BaseTools/Tests/TestTools.py35
-rw-r--r--BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf297
-rwxr-xr-xBaseTools/toolsetup.bat34
109 files changed, 1569 insertions, 10909 deletions
diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/fpd2dsc b/BaseTools/Bin/CYGWIN_NT-5.1-i686/fpd2dsc
deleted file mode 100755
index 2cb8b86a99..0000000000
--- a/BaseTools/Bin/CYGWIN_NT-5.1-i686/fpd2dsc
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-#python `dirname $0`/RunToolFromSource.py `basename $0` $*
-PYTHONPATH="`dirname $0`/../../Source/Python" \
- python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
-
diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/msa2inf b/BaseTools/Bin/CYGWIN_NT-5.1-i686/msa2inf
deleted file mode 100755
index 2cb8b86a99..0000000000
--- a/BaseTools/Bin/CYGWIN_NT-5.1-i686/msa2inf
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-#python `dirname $0`/RunToolFromSource.py `basename $0` $*
-PYTHONPATH="`dirname $0`/../../Source/Python" \
- python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
-
diff --git a/BaseTools/Bin/CYGWIN_NT-5.1-i686/spd2dec b/BaseTools/Bin/CYGWIN_NT-5.1-i686/spd2dec
deleted file mode 100755
index 2cb8b86a99..0000000000
--- a/BaseTools/Bin/CYGWIN_NT-5.1-i686/spd2dec
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-#python `dirname $0`/RunToolFromSource.py `basename $0` $*
-PYTHONPATH="`dirname $0`/../../Source/Python" \
- python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
-
diff --git a/BaseTools/Bin/Win32/BPDG.exe b/BaseTools/Bin/Win32/BPDG.exe
index 8cb7362fa8..0950a85a06 100644
--- a/BaseTools/Bin/Win32/BPDG.exe
+++ b/BaseTools/Bin/Win32/BPDG.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/BootSectImage.exe b/BaseTools/Bin/Win32/BootSectImage.exe
index 368c269553..77c2ca6f0c 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 604f850f04..0014483a35 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 5de62fd783..34c01a7292 100755
--- a/BaseTools/Bin/Win32/EfiRom.exe
+++ b/BaseTools/Bin/Win32/EfiRom.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Fpd2Dsc.exe b/BaseTools/Bin/Win32/Fpd2Dsc.exe
deleted file mode 100755
index d774971d6a..0000000000
--- a/BaseTools/Bin/Win32/Fpd2Dsc.exe
+++ /dev/null
Binary files differ
diff --git a/BaseTools/Bin/Win32/GenBootSector.exe b/BaseTools/Bin/Win32/GenBootSector.exe
index cb57ba77ea..e8315a3fe7 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 d545e7e8b8..7874a65e47 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 b17f12ed7b..3e477a2788 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 bd270d63fa..be4fccacfb 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 bf3ab699bd..f237967923 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 96f9731290..46231ff9f3 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 33c08bcd44..353a2f4447 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 e7f673252f..40c491062c 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 aa9bf405aa..1b84df80de 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 1274d352bc..c4b92a47c7 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 4f1868ff87..1bef934cfa 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 244237a2e1..82780efc77 100755
--- a/BaseTools/Bin/Win32/LzmaCompress.exe
+++ b/BaseTools/Bin/Win32/LzmaCompress.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/LzmaF86Compress.bat b/BaseTools/Bin/Win32/LzmaF86Compress.bat
new file mode 100644
index 0000000000..215472163d
--- /dev/null
+++ b/BaseTools/Bin/Win32/LzmaF86Compress.bat
@@ -0,0 +1,29 @@
+@REM
+@REM Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
+@REM This program and the accompanying materials
+@REM are licensed and made available under the terms and conditions of the BSD License
+@REM which accompanies this distribution. The full text of the license may be found at
+@REM http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+@REM
+
+@echo off
+@setlocal
+
+:Begin
+if "%1"=="" goto End
+if "%1"=="-e" (
+ set FLAG=--f86
+)
+if "%1"=="-d" (
+ set FLAG=--f86
+)
+set ARGS=%ARGS% %1
+shift
+goto Begin
+
+:End
+LzmaCompress %ARGS% %FLAG%
+@echo on \ No newline at end of file
diff --git a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe b/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
deleted file mode 100755
index 219b181d12..0000000000
--- a/BaseTools/Bin/Win32/MigrationMsa2Inf.exe
+++ /dev/null
Binary files differ
diff --git a/BaseTools/Bin/Win32/PatchPcdValue.exe b/BaseTools/Bin/Win32/PatchPcdValue.exe
index c635d3ac11..328651d7db 100755
--- a/BaseTools/Bin/Win32/PatchPcdValue.exe
+++ b/BaseTools/Bin/Win32/PatchPcdValue.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/Spd2Dec.exe b/BaseTools/Bin/Win32/Spd2Dec.exe
deleted file mode 100755
index 072f648225..0000000000
--- a/BaseTools/Bin/Win32/Spd2Dec.exe
+++ /dev/null
Binary files differ
diff --git a/BaseTools/Bin/Win32/Split.exe b/BaseTools/Bin/Win32/Split.exe
index c5fead3786..f5907b04cf 100755
--- a/BaseTools/Bin/Win32/Split.exe
+++ b/BaseTools/Bin/Win32/Split.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TargetTool.exe b/BaseTools/Bin/Win32/TargetTool.exe
index 19ff3a8322..0170468cfb 100755
--- a/BaseTools/Bin/Win32/TargetTool.exe
+++ b/BaseTools/Bin/Win32/TargetTool.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/TianoCompress.exe b/BaseTools/Bin/Win32/TianoCompress.exe
index e47070c24d..2570682261 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 25f9198778..8a3cfb7f96 100755
--- a/BaseTools/Bin/Win32/Trim.exe
+++ b/BaseTools/Bin/Win32/Trim.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/UPT.exe b/BaseTools/Bin/Win32/UPT.exe
index 8f08ca3ef3..7939ee97d2 100644
--- a/BaseTools/Bin/Win32/UPT.exe
+++ b/BaseTools/Bin/Win32/UPT.exe
Binary files differ
diff --git a/BaseTools/Bin/Win32/VfrCompile.exe b/BaseTools/Bin/Win32/VfrCompile.exe
index ccb69a263e..dd7431b741 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 0befe01e73..fa7168f8ed 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 1bb30e7a3e..01ee7a810d 100755
--- a/BaseTools/Bin/Win32/build.exe
+++ b/BaseTools/Bin/Win32/build.exe
Binary files differ
diff --git a/BaseTools/BinWrappers/PosixLike/fpd2dsc b/BaseTools/BinWrappers/PosixLike/fpd2dsc
deleted file mode 120000
index af6c748b1a..0000000000
--- a/BaseTools/BinWrappers/PosixLike/fpd2dsc
+++ /dev/null
@@ -1 +0,0 @@
-RunToolFromSource \ No newline at end of file
diff --git a/BaseTools/BinWrappers/PosixLike/msa2inf b/BaseTools/BinWrappers/PosixLike/msa2inf
deleted file mode 120000
index af6c748b1a..0000000000
--- a/BaseTools/BinWrappers/PosixLike/msa2inf
+++ /dev/null
@@ -1 +0,0 @@
-RunToolFromSource \ No newline at end of file
diff --git a/BaseTools/BinWrappers/PosixLike/spd2dec b/BaseTools/BinWrappers/PosixLike/spd2dec
deleted file mode 120000
index af6c748b1a..0000000000
--- a/BaseTools/BinWrappers/PosixLike/spd2dec
+++ /dev/null
@@ -1 +0,0 @@
-RunToolFromSource \ No newline at end of file
diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
index ca8a5781f6..79f916a9d5 100755
--- a/BaseTools/BuildEnv
+++ b/BaseTools/BuildEnv
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -160,6 +160,14 @@ GetEdkToolsPathBinDirectory() {
echo $EDK_TOOLS_PATH_BIN
}
+AddDirToStartOfPath() {
+ DIRNAME=$1
+ PATH=$DIRNAME:$DIRNAME:$DIRNAME:$PATH
+ PATH=${PATH//$DIRNAME:/}
+ PATH=$DIRNAME:$PATH
+ export PATH
+}
+
AddEdkToolsToPath() {
#
@@ -172,18 +180,8 @@ AddEdkToolsToPath() {
EDK_TOOLS_PATH_BIN=`GetEdkToolsPathBinDirectory`
- if [ ! -e $EDK_TOOLS_PATH_BIN ]
- then
- echo "Unable to find expected bin path under \$EDK_TOOLS_PATH!"
- echo "> $EDK_TOOLS_PATH_BIN"
- return 1
- fi
-
- if [ "${PATH/$EDK_TOOLS_PATH_BIN/}" == "$PATH" ]
- then
- export PATH=$EDK_TOOLS_PATH_BIN:$PATH
- return 0
- fi
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike
+ AddDirToStartOfPath $EDK_TOOLS_PATH_BIN
}
@@ -208,7 +206,6 @@ CopySingleTemplateFile() {
CopyTemplateFiles() {
CopySingleTemplateFile build_rule
- CopySingleTemplateFile FrameworkDatabase
CopySingleTemplateFile tools_def
CopySingleTemplateFile target
diff --git a/BaseTools/Conf/XMLSchema/FarManifest.xsd b/BaseTools/Conf/XMLSchema/FarManifest.xsd
deleted file mode 100644
index 6e8c34ae9a..0000000000
--- a/BaseTools/Conf/XMLSchema/FarManifest.xsd
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Filename: FarManifest.xsd
-
-Copyright (c) 2007, Intel Corporation. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which may be found at http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.TianoCore.org/2007/Edk2.1" xmlns="http://www.TianoCore.org/2007/Edk2.1">
- <xs:include schemaLocation="FrameworkHeaders.xsd"/>
- <xs:annotation>
- <xs:documentation xml:lang="en">
- The Framework Archive File Format is defined as a Java Archive file, with a special xml file called FrameworkArchiveManifest.xml at the top of the archive. The FrameworkArchiveManifest.xml must be an instance of this schema.
- </xs:documentation>
- </xs:annotation>
- <xs:element name="FrameworkArchiveManifest">
- <xs:annotation>
- <xs:documentation xml:lang="en">
- This schema defines the Framework Archive Manifest.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" ref="FarHeader"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="FarPackageList">
- <xs:annotation>
- <xs:documentation>
- The list of packages in this FAR.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="0" maxOccurs="1" ref="Contents">
- <xs:annotation>
- <xs:documentation>
- Extra contents that are not part of any Package. These file paths are WORKSPACE relative. If a file exists in the workspace at this location, then the user should be asked whether to overwrite. When the user removes the far, these should be removed also, unless they have been modified (per md5sum).
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="FarPackageList">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" ref="FarPackage"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="FarPackage">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="FarFilename">
- <xs:annotation>
- <xs:documentation>
- This is the name of the .spd or file that describes the package. It must exist in the directory identified by DefaultPath.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element ref="GuidValue"></xs:element>
- <xs:element ref="Version"></xs:element>
- <xs:element ref="DefaultPath">
- <xs:annotation>
- <xs:documentation>
- This is the default installation location within the workspace. This also serves as the location within the far itself of the package root. The Contents of the pacakage will be found there. The user may choose some other location within the workspace to install the package, as long as it does not overlap a package that is already installed.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element ref="Contents">
- <xs:annotation>
- <xs:documentation>
- This is the list of files that belong to the package. They are specified by relative path from the root of the pacakge.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"></xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="DefaultPath" type="PathAndFilename"/>
- <xs:element name="FarFilename" type="DbPathAndFilename">
- <xs:annotation>
- <xs:documentation>
- The FarFilename is used to build up the Contents list. It has an md5sum attribute for keeping track of whether the file is changed after it is installed. The Md5sum can also be used to check the integrity of a far before it is installed into the workspace.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="GuidValue" type="GuidType">
- <xs:annotation>
- <xs:documentation>
- The purpose of this element is to allow Guids to be assigned to or used by other elements in the schema.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="Contents">
- <xs:annotation>
- <xs:documentation>
- This tag allows us to specify a tree of files all having a common root. All the files specified are relative to that common root.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" ref="FarFilename"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:annotation>
- <xs:documentation xml:lang="en">
- Definitions and rules for creating, installing, updating and removing fars within the workspace.
- </xs:documentation>
- <xs:documentation>
- 1. A module m is said to depend upon a package p, iff there exists a tuple (PackageGuid, PackageVerion) in the set m->PackageDependencies for which p->Guid==PackageGuid, and if PackageVersion is not empty, then p->Version== PackageVersion.
- </xs:documentation>
- <xs:documentation>
- 2. A far f is said to depend on a far g, iff there is a module in a package in f that depends on a package in g.
- </xs:documentation>
- <xs:documentation>
- 3. A far f is said to depend on a package p, iff there is a module m contained in f that depends on p.
- </xs:documentation>
- <xs:documentation>
- 4. A far f may be installed into the workspace w, iff for each module m in f, m's dependencies are met by the packages in w or f.
- </xs:documentation>
- <xs:documentation>
- a. It is supported to "partially" install a far. A partial installation of a far means that 1 or more packages are installed into the workspace from the far. For each package p in f, p's dependencies must be satisfied by a package in the workspace.
- </xs:documentation>
- <xs:documentation>
- 5. A far f may be removed from the workspace w, iff for each module m in w, and for each package p in f, m does not depend on p.
- </xs:documentation>
- <xs:documentation>
- a. It is supported to "partially" remove a far. In this case, one or more of the packages in the far can be removed, provided that for each package p in the workspace w, there does not exist a module m such that m depends on p.
- </xs:documentation>
- <xs:documentation>
- 6. When installing a far f into workspace w, for each package p in f, allow the user to install in p's default location, or choose a new location l (which must be unoccupied) within the workspace. Record this location l in the database. Each package p in f will be recorded in the database, associated with the GUID of f, as well as the actual install location l. (So we will know which far each package belongs to.)
- </xs:documentation>
- <xs:documentation>
- 7. When installing a far f into workspace w, if there exists a package p in w, and p is in f, then the user must be prompted to choose a location that does not collide with the location of p in workspace w. We will end up with two instances of p in w at two distinct locations. Alternately, the user may elect to partially install the far, leaving out the redundant package.
- </xs:documentation>
- <xs:documentation>
- 8. A far f may replace a far g in the workspace w, iff for each module m contained in w, if m depends on a package p, and p is only contained in g, then there must exist a package q in f, such that m depends on q. The net effect is that g is removed and f is installed, in one operation. The normal rules for installing f still apply--the dependencies of the modules of f must be satisfied. After the replacement, it must be the case that all the modules dependencies in the workspace are satisfied. Note that it is possible to backrev a package in this way.
- </xs:documentation>
- <xs:documentation>
- (If we find that the replace is not permitted, then the user may install f and keep g. Next, he could _port_ every module m in w that depends on g, to f and eventually remove g.)
- </xs:documentation>
- <xs:documentation>
- 9. A special case of the above rule is that a far f may be reinstalled into the workspace. (This would allow the user to get a fresh copy, or change the location in the workspace where one or more of the packages of f are installed.)
- </xs:documentation>
- <xs:documentation>
- 10. When a far f is removed from the workspace w, for each package p in f, we will remove p from w.
- </xs:documentation>
- <xs:documentation>
- 11. If a package p belongs to a far f, then it is legal to remove p from the workspace w iff, there does not exist a module m in w such that m depends on p.
- </xs:documentation>
- <xs:documentation>
- 12. When a far f is removed from the workspace, the we will remove all the files in f from the workspace tree. If a file has been modified from the original as installed from the far (per md5sum) then the user should be asked if he is "sure" he wants to remove it.
- </xs:documentation>
- <xs:documentation>
- 13. When a far is created, a GUID is generated and assigned to the far. If a far is created from the same components at a later time, it would have a different GUID.
- </xs:documentation>
- <xs:documentation>
- 14. If a package p is marked with p->RePackage==false, then p may not be added to a far.
- </xs:documentation>
- <xs:documentation>
- 15. A far f is identical to a far g, iff f->Guid == g->Guid.
- </xs:documentation>
- <xs:documentation>
- 17. A far f may be installed into the workspace w, iff there is no far g in w such that f->Guid==g->Guid. In that case, it is called "updating" the far in the workspace. The user may select some subset of packages to reinstall or update, to ensure that the files in the workspace are correct.
- </xs:documentation>
- </xs:annotation>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/FrameworkDataAttributes.xsd b/BaseTools/Conf/XMLSchema/FrameworkDataAttributes.xsd
deleted file mode 100644
index eeb48d9a8a..0000000000
--- a/BaseTools/Conf/XMLSchema/FrameworkDataAttributes.xsd
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://www.TianoCore.org/2007/Edk2.1" targetNamespace="http://www.TianoCore.org/2007/Edk2.1">
- <!--
- Filename: FrameworkDataAttributes.xsd
-
- Copyright (c) 2007, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which may be found at http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- -->
- <xs:annotation>
- <xs:documentation xml:lang="en">This schema defines EFI and Framework Attribute. Only attributeGroups are specified in this file. </xs:documentation>
- </xs:annotation>
- <xs:include schemaLocation="NamingConvention.xsd"/>
- <xs:include schemaLocation="FrameworkDataTypes.xsd"/>
- <!-- Fix Name data type from xs:string -->
- <xs:attributeGroup name="BinaryFileAttributes">
- <xs:attribute name="FileType" type="BinFileType" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="Target" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="TagName" type="ToolsNameConvention" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="BootModeAttributes">
- <xs:attribute name="BootModeName" type="BootModeNames" use="required"/>
- <xs:attribute name="Usage" type="BootModeUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="DataHubAttributes">
- <xs:attribute name="Usage" type="DataHubUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="EventAttributes">
- <xs:attribute name="Usage" type="EventUsage" use="required"/>
- <xs:attribute name="EventGuidCName" type="C_NameType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="ExternAttributes">
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="FilenameAttributes">
- <xs:attribute name="TagName" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="ToolCode" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="ToolChainFamily" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="GuidAttributes">
- <xs:attribute name="Usage" type="GuidUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="GuidDeclarationAttributes">
- <xs:attribute name="Name" type="UiNameType" use="required"/>
- <xs:attribute name="GuidTypeList" type="GuidListType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="HiiPackageAttributes">
- <xs:attribute name="Usage" type="HiiPackageUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="HobAttributes">
- <xs:attribute name="Usage" type="HobUsage" use="required"/>
- <xs:attribute name="HobGuidCName" type="C_NameType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="IncludeHeaderAttributes">
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="IndustryStdHeaderAttributes">
- <xs:attribute name="Name" type="KeywordType" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="LibraryClassAttributes">
- <xs:attribute name="Usage" type="LibraryUsage" use="required"/>
- <xs:attribute name="RecommendedInstanceVersion" type="VersionDataType" use="optional"/>
- <xs:attribute name="RecommendedInstanceGuid" type="GuidType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="LibraryClassDeclarationAttributes">
- <xs:attribute name="Name" type="KeywordType" use="required"/>
- <xs:attribute name="RecommendedInstanceVersion" type="VersionDataType" use="optional"/>
- <xs:attribute name="RecommendedInstanceGuid" type="GuidType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="OptionAttributes">
- <xs:attribute name="BuildTargets" type="BuildTargetList" use="optional"/>
- <xs:attribute name="ToolChainFamily" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="TagName" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="ToolCode" type="ToolsNameConvention" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PackageHeaderAttributes">
- <xs:attribute name="ModuleType" type="ModuleTypeDef" use="required"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PackageAttributes">
- <!-- Used with the MSA File, PackageDependencies.Package -->
- <xs:attribute name="PackageGuid" type="GuidType" use="required"/>
- <xs:attribute name="PackageVersion" type="VersionDataType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PackageNameAttributes">
- <!--Used with the FrameworkDatabase PackageList.Packagename -->
- <xs:attribute name="PackageGuid" type="GuidType" use="optional"/>
- <xs:attribute name="PackageVersion" type="VersionDataType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PcdCodedAttributes">
- <!-- We need to modify ALL the MSA files that have PcdCoded sections to
- set the PcdUsage. Once we modify all the MSA files and we modify the
- wizard and the build tools, we need to make this required. -->
- <xs:attribute name="Usage" type="PcdUsage" use="optional"/>
- <xs:attribute name="PcdItemType" type="PcdItemTypes" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PcdDeclarationAttributes">
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PpiDeclarationAttributes">
- <xs:attribute name="Name" type="UiNameType" use="required"/>
- <xs:attribute name="GuidTypeList" type="GuidListType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PpiAttributes">
- <xs:attribute name="Usage" type="PpiUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="PpiNotifyAttributes">
- <xs:attribute name="Usage" type="PpiNotifyUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="ProtocolAttributes">
- <xs:attribute name="Usage" type="ProtocolUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="ProtocolDeclarationAttributes">
- <xs:attribute name="Name" type="UiNameType" use="required"/>
- <xs:attribute name="GuidTypeList" type="GuidListType" use="optional"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="SupModuleList" type="ModuleListType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="ProtocolNotifyAttributes">
- <xs:attribute name="Usage" type="ProtocolNotifyUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="SystemTableAttributes">
- <xs:attribute name="Usage" type="SystemTableUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
- <xs:attributeGroup name="VariableAttributes">
- <xs:attribute name="Usage" type="VariableUsage" use="required"/>
- <xs:attribute name="SupArchList" type="ArchListType" use="optional"/>
- <xs:attribute name="FeatureFlag" type="FeatureFlagExpressionType" use="optional"/>
- </xs:attributeGroup>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/FrameworkDataElements.xsd b/BaseTools/Conf/XMLSchema/FrameworkDataElements.xsd
deleted file mode 100644
index e094c1b626..0000000000
--- a/BaseTools/Conf/XMLSchema/FrameworkDataElements.xsd
+++ /dev/null
@@ -1,728 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://www.TianoCore.org/2007/Edk2.1" targetNamespace="http://www.TianoCore.org/2007/Edk2.1">
- <!--
- Filename: FrameworkDataElements.xsd
-
- Copyright (c) 2007, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which may be found at http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- -->
- <xs:annotation>
- <xs:documentation xml:lang="en"> This schema defines EFI and Framework Data Elements </xs:documentation>
- </xs:annotation>
- <xs:include schemaLocation="NamingConvention.xsd"/>
- <xs:include schemaLocation="FrameworkDataTypes.xsd"/>
- <xs:include schemaLocation="FrameworkDataAttributes.xsd"/>
- <xs:element name="Abstract" type="Sentence">
- <xs:annotation>
- <xs:documentation xml:lang="en">Abstract is valid for all Description Files</xs:documentation>
- <xs:documentation xml:lang="en">This section is required. This is a single sentence to describe the module and will be used in sample files as the abstract data in the header comment section.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="BootModes">
- <xs:annotation>
- <xs:documentation xml:lang="en">BootModes is valid for all Description Files</xs:documentation>
- <xs:documentation xml:lang="en">This is a list of BootModes Supported by the Module</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="BootMode">
- <xs:complexType>
- <xs:sequence minOccurs="0">
- <xs:element name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="BootModeAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Copyright" type="Paragraph"/>
- <xs:element name="DataHubs">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is a list of DataHubRecord elements.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="DataHubRecord">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="DataHubCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="DataHubAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="DefaultValue">
- <xs:annotation>
- <xs:documentation xml:lang="en">The default setting of a PCD entry.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString"/>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="Depex">
- <xs:annotation>
- <xs:documentation xml:lang="en">This section is used to describe the DXE or PEI Dependency code</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="Define" type="xs:normalizedString"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="Expression" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Description" type="Paragraph">
- <xs:annotation>
- <xs:documentation xml:lang="en">This section is required for new modules and libraries and must contain more information than the Abstract.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="BinaryFiles">
- <xs:annotation>
- <xs:documentation xml:lang="en">Multiple Filenames may be specified, and they may also be scoped to a specific Architecture.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Filename">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="PathAndFilename">
- <xs:attributeGroup ref="BinaryFileAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Events">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is a list of MSA Events</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="1" name="CreateEvents">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="EventTypes">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="EventType" type="EventTypes"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="EventAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element minOccurs="0" maxOccurs="1" name="SignalEvents">
- <xs:annotation>
- <xs:documentation xml:lang="en">Module has an event that is waiting to be signaled. Event is named by GUID.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="EventTypes">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="EventType" type="EventTypes"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="EventAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Externs">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is a child of MSA files.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence minOccurs="1">
- <xs:element minOccurs="0" maxOccurs="1" name="PcdIsDriver" type="PcdDriverTypes"/>
- <xs:element minOccurs="0" maxOccurs="1" name="TianoR8FlashMap_h" type="xs:boolean" default="false"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="Specification" type="Sentence"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="Extern">
- <xs:complexType>
- <xs:choice minOccurs="1" maxOccurs="1">
- <xs:sequence minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en">Driver Module</xs:documentation>
- </xs:annotation>
- <xs:element minOccurs="0" maxOccurs="1" name="ModuleEntryPoint" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="ModuleUnloadImage" type="C_NameType"/>
- </xs:sequence>
- <xs:sequence minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en">Library Module</xs:documentation>
- </xs:annotation>
- <xs:element minOccurs="0" maxOccurs="1" name="Constructor" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="Destructor" type="C_NameType"/>
- </xs:sequence>
- <xs:sequence minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en">Allow multiple entries for DriverBinding, ComponentName, DriverConfig and DriverDiag elements. For ComponentName, DriverConfig and/or DriverDiag - you must have a 1:1 mapping to DriverBinding if the element is defined.</xs:documentation>
- <xs:documentation xml:lang="en">Permit User Defined Extern Tags</xs:documentation>
- </xs:annotation>
- <xs:element minOccurs="1" maxOccurs="1" name="DriverBinding" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="ComponentName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="DriverConfig" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="DriverDiag" type="C_NameType"/>
- </xs:sequence>
- <xs:sequence minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en"> Module Call Backs</xs:documentation>
- </xs:annotation>
- <xs:element minOccurs="0" maxOccurs="1" name="SetVirtualAddressMapCallBack" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="ExitBootServicesCallBack" type="C_NameType"/>
- </xs:sequence>
- </xs:choice>
- <xs:attributeGroup ref="ExternAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Filename">
- <xs:annotation>
- <xs:documentation xml:lang="en">Describe the valid content of a filename This should extend PathAndFilename - Variable names not allowed here!</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="PathAndFilename">
- <xs:attributeGroup ref="FilenameAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="Filenames">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is a list of Filenames</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence minOccurs="1">
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="Filename"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="GuidDeclarations">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is a child of PackageSurfaceArea (SPD) </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Entry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="C_Name" type="C_NameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="GuidDeclarationAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Guids">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="GuidCNames">
- <xs:annotation>
- <xs:documentation xml:lang="en">Describe the valid content of a GUID element in and MSA file.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="GuidAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="HiiPackages">
- <xs:annotation>
- <xs:documentation xml:lang="en">Describe the list of a HiiPackage elements</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="HiiPackage">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="HiiCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="HiiPackageAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Hobs">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="HobTypes">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="HobType" type="HobTypes"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="HobAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="IncludeHeader">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="PathAndFilename">
- <xs:attributeGroup ref="IncludeHeaderAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="IndustryStdIncludes">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" ref="IndustryStdHeader"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="IndustryStdHeader">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="IncludeHeader" type="PathAndFilename"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="IndustryStdHeaderAttributes"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="LibraryClass">
- <xs:annotation>
- <xs:documentation xml:lang="en">Used in MSA files. This defines what class of library is being supported = produced (library module) or consumed by a module.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="Keyword" type="KeywordType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="LibraryClassAttributes"/>
- </xs:complexType>
- </xs:element>
- <!-- LAH This is SPD LibraryClassDeclarations FINAL version -->
- <xs:element name="LibraryClassDeclarations">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="LibraryClass">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="IncludeHeader" type="PathAndFilename"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="LibraryClassDeclarationAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="LibraryClassDefinitions">
- <xs:annotation>
- <xs:documentation xml:lang="en">This section defines what Classes of Library that this library supports. A Library may belong to multiple different library classes.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" ref="LibraryClass"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="License">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="Paragraph">
- <xs:attribute name="URL" type="xs:anyURI" use="optional"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="ModuleBuildOptions">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="1" ref="Options"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="ModuleDefinitions">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="SupportedArchitectures" type="ArchListType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="BinaryModule" type="xs:boolean" default="false"/>
- <xs:element minOccurs="1" maxOccurs="1" name="OutputFileBasename" type="FileNameConvention"/>
- <xs:element minOccurs="0" maxOccurs="1" name="ClonedFrom">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Cloned">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="PackageGuid" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="PackageVersion" type="VersionDataType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="ModuleGuid" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="ModuleVersion" type="VersionDataType"/>
- </xs:sequence>
- <!-- The Id is a number used to track heritage the first entry will be 0 and increment from then on. -->
- <xs:attribute name="Id" type="xs:nonNegativeInteger" use="required"/>
- <!-- If the original module was installed from a FAR, track the FAR it came from. -->
- <xs:attribute name="FarGuid" type="GuidType" use="optional"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="ModuleType" type="ModuleTypeDef">
- <xs:annotation>
- <xs:documentation xml:lang="en">Describe the valid EFI Phase that the Module is designed to execute under.</xs:documentation>
- </xs:annotation>
- </xs:element>
- <!-- Use in Final -->
- <xs:element name="MsaFiles">
- <xs:annotation>
- <xs:documentation xml:lang="en">MsaFiles is a child of Surface Area Package Description (SPD) files</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Filename" type="PathAndFilename"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Options">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" ref="Option"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="NonProcessedFiles">
- <xs:complexType>
- <xs:sequence minOccurs="1" maxOccurs="unbounded">
- <xs:element name="Filename" type="PathAndFilename"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Option">
- <!-- This element is used to store flags from the Tools -->
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString">
- <xs:attributeGroup ref="OptionAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element name="PackageDefinitions">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="ReadOnly" type="xs:boolean" default="false"/>
- <xs:element minOccurs="1" maxOccurs="1" name="RePackage" type="xs:boolean" default="false"/>
- <xs:element minOccurs="0" maxOccurs="1" name="ClonedFrom">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Cloned">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="PackageGuid" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="PackageVersion" type="VersionDataType"/>
- </xs:sequence>
- <!-- The Id is a number used to track heritage the first entry will be 0 and increment from then on. -->
- <xs:attribute name="Id" type="xs:nonNegativeInteger" use="required"/>
- <!-- If the original Package was installed from a FAR, track the FAR it came from. -->
- <xs:attribute name="FarGuid" type="GuidType" use="optional"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="PackageDependencies">
- <xs:annotation>
- <xs:documentation xml:lang="en">This tag is used in the Module Surface Area Description File (MSA) to track package dependencies for a module.</xs:documentation>
- <xs:documentation xml:lang="en">Attributes to PackageName include Required: Usage PackageGuid PackageVesion, Optional: FeatureFlag</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Package">
- <xs:complexType>
- <xs:attributeGroup ref="PackageAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="PackageHeaders">
- <xs:annotation>
- <xs:documentation xml:lang="en">PackageHeaders is a child of PackageSurfaceArea (SPD) </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="IncludePkgHeader">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="PathAndFilename">
- <xs:attributeGroup ref="PackageHeaderAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="PackageList">
- <!-- Valid for DB usage only! -->
- <xs:annotation>
- <xs:documentation xml:lang="en">This tag is used in the Framework Package Database File to track all packages (SPD files) installed in a workspace. (Database)</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Filename">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="PathAndFilename">
- <xs:attributeGroup ref="PackageNameAttributes"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="PcdCoded">
- <xs:annotation>
- <xs:documentation xml:lang="en">Child of Module Surface Area Description (MSA)</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="PcdEntry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="C_Name" type="C_NameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="TokenSpaceGuidCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="DefaultValue" type="DefaultValueType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <!-- MSA file declares a single usage, and must match one of the entries in what the SPD file declares as the set of possible Item Types. -->
- <xs:attributeGroup ref="PcdCodedAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <!-- LAH This is PcdDeclarations FINAL version -->
- <xs:element name="PcdDeclarations">
- <xs:annotation>
- <xs:documentation xml:lang="en">PcdDeclaratins is a child of Package Surface Area Description (SPD)</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence minOccurs="1">
- <xs:element maxOccurs="unbounded" name="PcdEntry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="C_Name" type="C_NameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="Token" type="TokenDataType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="TokenSpaceGuidCName" type="C_NameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="DatumType" type="PcdDataTypes"/>
- <xs:element minOccurs="1" maxOccurs="1" name="ValidUsage" type="PcdListType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="DefaultValue" type="DefaultValueType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="PcdDeclarationAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="FarList">
- <!-- Valid for DB usage only! -->
- <xs:annotation>
- <xs:documentation xml:lang="en">This tag is used in the Framework Package Database File to track all DISTRIBUTION packages (FAR files) installed in a workspace. (Database)</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Filename" type="DbPathAndFilename"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="PpiDeclarations">
- <xs:annotation>
- <xs:documentation xml:lang="en">PpiDeclarations is a child of PackageSurfaceArea (SPD) </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Entry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="C_Name" type="C_NameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="PpiDeclarationAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="PPIs">
- <xs:annotation>
- <xs:documentation xml:lang="en">Provide for one or more Ppi or PpiNotify sections. </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence minOccurs="1">
- <xs:element minOccurs="0" maxOccurs="unbounded" name="Ppi">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="PpiCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="PpiAttributes"/>
- </xs:complexType>
- </xs:element>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="PpiNotify">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="PpiNotifyCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="PpiNotifyAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="ProtocolDeclarations">
- <xs:annotation>
- <xs:documentation xml:lang="en">ProtocolDeclarations is a child of PackageSurfaceArea (SPD) </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Entry">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="C_Name" type="C_NameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="ProtocolDeclarationAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Protocols">
- <xs:annotation>
- <xs:documentation xml:lang="en">If either Protocol or ProtocolNotify sections are needed, one or more of them should be specified within this section</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="Protocol">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="ProtocolCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="ProtocolAttributes"/>
- </xs:complexType>
- </xs:element>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="ProtocolNotify">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="ProtocolNotifyCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="ProtocolNotifyAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="SourceFiles">
- <xs:annotation>
- <xs:documentation xml:lang="en">Multiple Filenames may be specified, and they may also be scoped to a specific Architecture.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" ref="Filename"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="SystemTables">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is list of System Table elements.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="SystemTableCNames">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="SystemTableCName" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="SystemTableAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="UserExtensions">
- <xs:complexType>
- <xs:sequence>
- <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
- </xs:sequence>
- <xs:attribute name="UserID" type="xs:NCName" use="required"/>
- <xs:attribute name="Identifier" type="xs:string" use="required"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="Variables">
- <xs:annotation>
- <xs:documentation xml:lang="en">An MSA FILE list of EFI Variables described by string pair.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Variable">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is an EFI Variable Entry</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="VariableName" type="HexWordArrayType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidC_Name" type="C_NameType"/>
- <xs:element minOccurs="0" maxOccurs="1" name="HelpText" type="Paragraph"/>
- </xs:sequence>
- <xs:attributeGroup ref="VariableAttributes"/>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="Version" type="VersionDataType"/>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/FrameworkDataTypes.xsd b/BaseTools/Conf/XMLSchema/FrameworkDataTypes.xsd
deleted file mode 100644
index 9a46a02a2e..0000000000
--- a/BaseTools/Conf/XMLSchema/FrameworkDataTypes.xsd
+++ /dev/null
@@ -1,581 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://www.TianoCore.org/2007/Edk2.1" targetNamespace="http://www.TianoCore.org/2007/Edk2.1">
- <!--
- Filename: FrameworkDataTypes.xsd
-
- Copyright (c) 2007, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which may be found at http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- -->
- <xs:annotation>
- <xs:documentation xml:lang="en">This schema defines EFI and Framework Data Types. Only simpleType are specified in this file. </xs:documentation>
- </xs:annotation>
- <xs:include schemaLocation="NamingConvention.xsd"/>
- <xs:simpleType name="PrimaryArchListType">
- <xs:list itemType="SupportedArchitectures"/>
- </xs:simpleType>
- <xs:simpleType name="ArchListType">
- <xs:restriction base="PrimaryArchListType">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="BinFileType">
- <xs:restriction base="xs:NCName">
- <xs:enumeration value="LIB"/>
- <xs:enumeration value="UNI_UI"/>
- <xs:enumeration value="UNI_VER"/>
- <xs:enumeration value="PE32"/>
- <xs:enumeration value="FW"/>
- <xs:enumeration value="GUID"/>
- <xs:enumeration value="FREEFORM"/>
- <xs:enumeration value="UEFI_APP"/>
- <xs:enumeration value="PIC"/>
- <xs:enumeration value="PEI_DEPEX"/>
- <xs:enumeration value="DXE_DEPEX"/>
- <xs:enumeration value="TE"/>
- <xs:enumeration value="VER"/>
- <xs:enumeration value="UI"/>
- <xs:enumeration value="BIN"/>
- <xs:enumeration value="FV"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="BlockNameType">
- <xs:restriction base="UCNameType">
- <xs:pattern value="\s*BLOCK[A-F0-9]{2}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="BootModeNames">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="FULL"/>
- <xs:enumeration value="MINIMAL"/>
- <xs:enumeration value="NO_CHANGE"/>
- <xs:enumeration value="DIAGNOSTICS"/>
- <xs:enumeration value="DEFAULT"/>
- <xs:enumeration value="S2_RESUME"/>
- <xs:enumeration value="S3_RESUME"/>
- <xs:enumeration value="S4_RESUME"/>
- <xs:enumeration value="S5_RESUME"/>
- <xs:enumeration value="FLASH_UPDATE"/>
- <xs:enumeration value="RECOVERY_FULL"/>
- <xs:enumeration value="RECOVERY_MINIMAL"/>
- <xs:enumeration value="RECOVERY_NO_CHANGE"/>
- <xs:enumeration value="RECOVERY_DIAGNOSTICS"/>
- <xs:enumeration value="RECOVERY_DEFAULT"/>
- <xs:enumeration value="RECOVERY_S2_RESUME"/>
- <xs:enumeration value="RECOVERY_S3_RESUME"/>
- <xs:enumeration value="RECOVERY_S4_RESUME"/>
- <xs:enumeration value="RECOVERY_S5_RESUME"/>
- <xs:enumeration value="RECOVERY_FLASH_UPDATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="BootModeUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="BuildTargetList">
- <xs:restriction base="BuildTargetUList">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="BuildTargetUList">
- <xs:list itemType="BrUType"/>
- </xs:simpleType>
- <xs:simpleType name="BrUType">
- <xs:union memberTypes="BrType UCNameType"/>
- </xs:simpleType>
- <xs:simpleType name="BrType">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="DEBUG"/>
- <xs:enumeration value="RELEASE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ComponentExecutionPhase">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="MDE"/>
- <xs:enumeration value="SEC"/>
- <xs:enumeration value="PEI_CORE"/>
- <xs:enumeration value="PEIM"/>
- <xs:enumeration value="DXE_CORE"/>
- <xs:enumeration value="DXE_DRIVER"/>
- <xs:enumeration value="DXE_RUNTIME_DRIVER"/>
- <xs:enumeration value="DXE_SAL_DRIVER"/>
- <xs:enumeration value="DXE_SMM_DRIVER"/>
- <xs:enumeration value="UEFI"/>
- <xs:enumeration value="UEFI_APPLICATION"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="DataHubUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="DatumSizeLimitation">
- <xs:restriction base="xs:nonNegativeInteger">
- <xs:maxExclusive value="13777216"/>
- <xs:pattern value="(\s)*[1-9][0-9]*(\s)*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="DefaultValueType">
- <xs:union memberTypes="xs:normalizedString Hex64BitDataType UnicodeString HexByteArrayType"/>
- </xs:simpleType>
- <xs:simpleType name="EfiSectionType">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="EFI_SECTION_FREEFORM_SUBTYPE_GUID"/>
- <xs:enumeration value="EFI_SECTION_VERSION"/>
- <xs:enumeration value="EFI_SECTION_USER_INTERFACE"/>
- <xs:enumeration value="EFI_SECTION_DXE_DEPEX"/>
- <xs:enumeration value="EFI_SECTION_PEI_DEPEX"/>
- <xs:enumeration value="EFI_SECTION_PE32"/>
- <xs:enumeration value="EFI_SECTION_PIC"/>
- <xs:enumeration value="EFI_SECTION_TE"/>
- <xs:enumeration value="EFI_SECTION_RAW"/>
- <xs:enumeration value="EFI_SECTION_COMPRESSION"/>
- <xs:enumeration value="EFI_SECTION_GUID_DEFINED"/>
- <xs:enumeration value="EFI_SECTION_COMPATIBILITY16"/>
- <xs:enumeration value="EFI_SECTION_FIRMWARE_VOLUME_IMAGE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="EventTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="EVENT_GROUP_GUID"/>
- <xs:enumeration value="EVENT_TYPE_PERIODIC_TIMER"/>
- <xs:enumeration value="EVENT_TYPE_RELATIVE_TIMER"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="EventUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ExecutionType">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="REL" id="Relocatable"/>
- <xs:enumeration value="NREL" id="Non-Relocatable"/>
- <xs:enumeration value="XIP" id="Execute_In_Place"/>
- <xs:enumeration value="PIC" id="Position_Independent_Code"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ExternType">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="1"/>
- <!--<xs:pattern value="((\w)+(\W)*(\s)*)+"/>-->
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ExternUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="FileNameUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="FeatureFlagExpressionType">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="FrameworkComponentListType">
- <xs:list itemType="FrameworkComponentTypes"/>
- </xs:simpleType>
- <xs:simpleType name="FrameworkComponentTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="APRIORI"/>
- <xs:enumeration value="SEC"/>
- <xs:enumeration value="LIBRARY"/>
- <xs:enumeration value="FV_IMAGE_FILE"/>
- <xs:enumeration value="BS_DRIVER"/>
- <xs:enumeration value="RT_DRIVER"/>
- <xs:enumeration value="SAL_RT_DRIVER"/>
- <xs:enumeration value="PE32_PEIM"/>
- <xs:enumeration value="PIC_PEIM"/>
- <xs:enumeration value="COMBINED_PEIM_DRIVER"/>
- <xs:enumeration value="PEI_CORE"/>
- <xs:enumeration value="DXE_CORE"/>
- <xs:enumeration value="BS_DRIVER_EFI"/>
- <xs:enumeration value="SHELLAPP"/>
- <xs:enumeration value="BINARY"/>
- <xs:enumeration value="LOGO"/>
- <xs:enumeration value="USER_DEFINED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="FrameworkModuleTypes">
- <xs:restriction base="ModuleTypeDef">
- <xs:enumeration value="BASE"/>
- <xs:enumeration value="SEC"/>
- <xs:enumeration value="PEI_CORE"/>
- <xs:enumeration value="PEIM"/>
- <xs:enumeration value="DXE_CORE"/>
- <xs:enumeration value="DXE_DRIVER"/>
- <xs:enumeration value="DXE_RUNTIME_DRIVER"/>
- <xs:enumeration value="DXE_SAL_DRIVER"/>
- <xs:enumeration value="DXE_SMM_DRIVER"/>
- <xs:enumeration value="UEFI_DRIVER"/>
- <xs:enumeration value="UEFI_APPLICATION"/>
- <xs:enumeration value="USER_DEFINED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="FvRegionTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="FV_MAIN"/>
- <xs:enumeration value="FV_MAIN_COMPACT"/>
- <xs:enumeration value="NV_STORAGE"/>
- <xs:enumeration value="FV_RECOVERY"/>
- <xs:enumeration value="FV_RECOVERY_FLOPPY"/>
- <xs:enumeration value="FV_FILE"/>
- <xs:enumeration value="CAPSULE_CARGO"/>
- <xs:enumeration value="NULL"/>
- <xs:enumeration value="USER_DEFINED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PrimaryGuidListType">
- <xs:list itemType="GuidTypes"/>
- </xs:simpleType>
- <xs:simpleType name="GuidListType">
- <xs:restriction base="PrimaryGuidListType">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="GuidTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="DATA_HUB_RECORD"/>
- <xs:enumeration value="EFI_EVENT"/>
- <xs:enumeration value="EFI_SYSTEM_CONFIGURATION_TABLE"/>
- <xs:enumeration value="EFI_VARIABLE"/>
- <xs:enumeration value="GUID"/>
- <xs:enumeration value="HII_PACKAGE_LIST"/>
- <xs:enumeration value="HOB"/>
- <xs:enumeration value="TOKEN_SPACE_GUID"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="GuidUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexByteArrayListType">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="4"/>
- <xs:pattern value="\s*((( )?0x[a-fA-F0-9]{2})(,)?)+( )?"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexByteArrayType">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="4"/>
- <xs:pattern value="((\s)*0x([a-fA-F0-9]){2}(,)?(\s)*)+"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexWordArrayType">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="6"/>
- <xs:pattern value="((\s)*0x([a-fA-F0-9]){4}(,)?(\s)*)+"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HiiPackageUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HobTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="PHIT"/>
- <xs:enumeration value="MEMORY_ALLOCATION"/>
- <xs:enumeration value="RESOURCE_DESCRIPTOR"/>
- <xs:enumeration value="GUID_EXTENSION"/>
- <xs:enumeration value="FIRMWARE_VOLUME"/>
- <xs:enumeration value="CPU"/>
- <xs:enumeration value="POOL"/>
- <xs:enumeration value="CAPSULE_VOLUME"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HobUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="IntermediateOutputType">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="MODULE"/>
- <xs:enumeration value="UNIFIED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="LibraryUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ModuleTypeDef">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="BASE"/>
- <xs:enumeration value="SEC"/>
- <xs:enumeration value="PEI_CORE"/>
- <xs:enumeration value="PEIM"/>
- <xs:enumeration value="DXE_CORE"/>
- <xs:enumeration value="DXE_DRIVER"/>
- <xs:enumeration value="DXE_RUNTIME_DRIVER"/>
- <xs:enumeration value="DXE_SAL_DRIVER"/>
- <xs:enumeration value="DXE_SMM_DRIVER"/>
- <xs:enumeration value="TOOL"/>
- <xs:enumeration value="UEFI_DRIVER"/>
- <xs:enumeration value="UEFI_APPLICATION"/>
- <xs:enumeration value="USER_DEFINED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="Md5sumType">
- <xs:restriction base="xs:normalizedString">
- <xs:pattern value="\s*[a-fA-F0-9]{32}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PrimaryModuleListType">
- <xs:list itemType="FrameworkModuleTypes"/>
- </xs:simpleType>
- <xs:simpleType name="ModuleListType">
- <xs:restriction base="PrimaryModuleListType">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PackageType">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="SOURCE"/>
- <xs:enumeration value="BINARY"/>
- <xs:enumeration value="MIXED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PackageUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PcdListType">
- <xs:restriction base="PrimaryPcdListType">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PrimaryPcdListType">
- <xs:list itemType="PcdItemTypes"/>
- </xs:simpleType>
- <xs:simpleType name="PcdTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="FIXED_AT_BUILD"/>
- <xs:enumeration value="FEATURE_FLAG"/>
- <xs:enumeration value="PATCHABLE_IN_MODULE"/>
- <xs:enumeration value="DYNAMIC"/>
- <xs:enumeration value="DYNAMIC_EX"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PcdDriverTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="PEI_PCD_DRIVER"/>
- <xs:enumeration value="DXE_PCD_DRIVER"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PcdDataTypes">
- <xs:restriction base="xs:normalizedString">
- <xs:enumeration value="UINT8"/>
- <xs:enumeration value="UINT16"/>
- <xs:enumeration value="UINT32"/>
- <xs:enumeration value="UINT64"/>
- <xs:enumeration value="VOID*"/>
- <xs:enumeration value="BOOLEAN"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PcdFeatureFlagUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PcdItemTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="FEATURE_FLAG"/>
- <xs:enumeration value="FIXED_AT_BUILD"/>
- <xs:enumeration value="PATCHABLE_IN_MODULE"/>
- <xs:enumeration value="DYNAMIC"/>
- <xs:enumeration value="DYNAMIC_EX"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PcdUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PpiNotifyUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PpiUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ProtocolNotifyUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ProtocolUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="TO_START"/>
- <xs:enumeration value="BY_START"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="SkuListType">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="1"/>
- <xs:pattern value="\s*(\d)+((,)?(\s)*(\d)+)*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="SupportedArchitectures">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="EBC"/>
- <xs:enumeration value="IA32"/>
- <xs:enumeration value="X64"/>
- <xs:enumeration value="IPF"/>
- <xs:enumeration value="ARM"/>
- <xs:enumeration value="PPC"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="SystemTableUsage">
- <xs:restriction base="UsageTypes">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="TokenDataType">
- <xs:union memberTypes="HexDoubleWordDataType xs:nonNegativeInteger"/>
- </xs:simpleType>
- <xs:simpleType name="ToolChains">
- <xs:restriction base="UCNameType">
- <xs:minLength value="2"/>
- <xs:enumeration value="MSFT"/>
- <xs:enumeration value="INTEL"/>
- <xs:enumeration value="GCC"/>
- <xs:enumeration value="CYGWIN"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="UiNameType">
- <xs:restriction base="xs:string">
- <xs:minLength value="1"/>
- <xs:pattern value="[^ ].*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="UnicodeString">
- <xs:restriction base="xs:normalizedString">
- <xs:minLength value="3"/>
- <xs:pattern value="(\s)*L(\:)?&quot;[^&quot;]*&quot;(\s)*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="UsageListType">
- <xs:restriction base="PrimaryUsageList">
- <xs:minLength value="1"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="PrimaryUsageList">
- <xs:list itemType="UsageTypes"/>
- </xs:simpleType>
- <!-- UsageTypes describes all of the Usage Attributes that are defined in the Module Surface Area Specification -->
- <xs:simpleType name="UsageTypes">
- <xs:restriction base="UCNameType">
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <xs:enumeration value="TO_START"/>
- <xs:enumeration value="BY_START"/>
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="VariableOffsetValues">
- <xs:restriction base="xs:string">
- <xs:minLength value="1"/>
- <xs:pattern value="\s*\d+(:)?\d*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="VariableUsage">
- <xs:restriction base="UsageTypes">
- <!-- Module requires the variable entry to be set -->
- <xs:enumeration value="ALWAYS_CONSUMED"/>
- <!-- Module will use the variable entry if it's set -->
- <xs:enumeration value="SOMETIMES_CONSUMED"/>
- <!-- Module Always will write the variable -->
- <xs:enumeration value="ALWAYS_PRODUCED"/>
- <!-- Module sometimes writes the variable -->
- <xs:enumeration value="SOMETIMES_PRODUCED"/>
- <!-- Variable is produced and consumed only by this module -->
- <xs:enumeration value="PRIVATE"/>
- </xs:restriction>
- </xs:simpleType>
- <!-- Complex Data Types -->
- <xs:complexType name="DbPathAndFilename">
- <xs:simpleContent>
- <xs:extension base="PathAndFilename">
- <xs:attribute name="FarGuid" type="GuidType" use="optional"/>
- <xs:attribute name="Md5sum" type="Md5sumType"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="ArgsType">
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:element name="Arg" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="ToolType">
- <xs:sequence>
- <xs:element name="ToolName" type="xs:string"/>
- <xs:element name="ToolArgs" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/FrameworkHeaders.xsd b/BaseTools/Conf/XMLSchema/FrameworkHeaders.xsd
deleted file mode 100644
index e2745af378..0000000000
--- a/BaseTools/Conf/XMLSchema/FrameworkHeaders.xsd
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.TianoCore.org/2007/Edk2.1" xmlns="http://www.TianoCore.org/2007/Edk2.1">
- <!--
- Filename: FrameworkHeaders.xsd
-
- Copyright (c) 2007, Intel Corporation. All rights reserved.
-
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which may be found at http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- APPROVED: 05-Jun-2007
- -->
- <xs:include schemaLocation="FrameworkDataElements.xsd"/>
- <xs:element name="FdbHeader">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is the header for the Framework Package Database (DB) file.</xs:documentation>
- <xs:documentation xml:lang="en">The Guid MUST change if backward compatibility breaks caused by a new release of XML Schema.</xs:documentation>
- <xs:documentation xml:lang="en">The Version will change if a minor change to XML Schema has been made, but backward compatiblity is maintained.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="DatabaseName" type="UiNameType" fixed="FrameworkDatabase"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType" default="DD6913E0-3E4E-4B83-8838-57EE7FB71DD1"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Version"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Abstract"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Description"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Copyright"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="License"/>
- <xs:element minOccurs="1" maxOccurs="1" name="Specification" type="Sentence" default="FRAMEWORK_PACKAGING_SPECIFICATION 0x00090000"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="FarHeader">
- <xs:annotation>
- <xs:documentation xml:lang="en">This is the header for the Framework Archive Manifest file.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="FarName" type="UiNameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Version"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Abstract"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Description"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Copyright"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="License"/>
- <xs:element minOccurs="1" maxOccurs="1" name="Specification" type="Sentence" default="FRAMEWORK_PACKAGING_SPECIFICATION 0x00090000"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="MsaHeader">
- <xs:annotation>
- <xs:documentation xml:lang="en">This header is for the Module Surface Area Description (MSA) files</xs:documentation>
- <xs:documentation xml:lang="en">The Guid MUST change if the Module changes break backward compatibility.</xs:documentation>
- <xs:documentation xml:lang="en">The Version MUST change if the Module changes, however, backward compatiblity is maintained.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="ModuleName" type="UiNameType"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="ModuleType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Version"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Abstract"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Description"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Copyright"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="License"/>
- <xs:element minOccurs="1" maxOccurs="1" name="Specification" type="Sentence" default="FRAMEWORK_PACKAGING_SPECIFICATION 0x00090000"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="SpdHeader">
- <xs:annotation>
- <xs:documentation xml:lang="en">This head is for the Surface Area Package Description file (SPD)</xs:documentation>
- <xs:documentation xml:lang="en">The Guid MUST change when the contents of the file undergo MAJOR FUNCTIONALITY changes.</xs:documentation>
- <xs:documentation xml:lang="en">The Version MUST change when the contents of the file undergo MINOR FUNCTIONALITY changes.</xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="PackageName" type="UiNameType"/>
- <xs:element minOccurs="1" maxOccurs="1" name="GuidValue" type="GuidType"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Version"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Abstract"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Description"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="Copyright"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="License"/>
- <xs:element minOccurs="1" maxOccurs="1" name="Specification" type="Sentence" default="FRAMEWORK_PACKAGING_SPECIFICATION 0x00090000"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/NamingConvention.xsd b/BaseTools/Conf/XMLSchema/NamingConvention.xsd
deleted file mode 100644
index 8a76639777..0000000000
--- a/BaseTools/Conf/XMLSchema/NamingConvention.xsd
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.TianoCore.org/2007/Edk2.1" xmlns="http://www.TianoCore.org/2007/Edk2.1">
- <!--
- Filename: NamingConvention.xsd
-
- Copyright (c) 2007, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which may be found at http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- -->
- <xs:annotation>
- <xs:documentation xml:lang="en"> This schema defines various data types and naming conventions including: base name, filename and directory naming conventions. These are all simple data types.</xs:documentation>
- </xs:annotation>
- <xs:simpleType name="C_NameType">
- <xs:annotation>
- <xs:documentation xml:lang="en"> C_Names must start with either an underscore (_) character followed by one or more alpha characters, followed by any combination of underscore or alphanumeric characters.</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*(_)*[a-zA-Z]+((_)*[a-zA-Z0-9]*)*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="FileNameConvention">
- <xs:annotation>
- <xs:documentation xml:lang="en"> This defines what a Filename is: Alphanumeric characters and optional underscore (_) or dash (-) characters, followed by a optional dot and more alphanumeric characters. </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*[a-zA-Z](\.?[\-_a-zA-Z0-9]+)*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="GuidType">
- <xs:annotation>
- <xs:documentation xml:lang="en"> The GUID data was a union of GuidType1 and GuidType2; standardizing on GuidType2. </xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="GuidType2"/>
- </xs:simpleType>
- <xs:simpleType name="GuidType1">
- <xs:annotation>
- <xs:documentation xml:lang="en"> This defines the minimum specification for a GUID Array which is 8 Hex Digits - 4 Hex Digits - 4 Hex Digits - 8 Hex Bytes, the last 16 Hex Digits can be enclosed in sqiggle {} brackets.</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*0x[a-fA-F0-9]{1,8},( )*0x[a-fA-F0-9]{1,4},( )*0x[a-fA-F0-9]{1,4}(,( )*\{)?(,?( )*0x[a-fA-F0-9]{1,2}){8}( )*(\})?\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="GuidType2">
- <xs:annotation>
- <xs:documentation xml:lang="en"> A GUID must contain five different Hexadecimal character sets that are separated by a dash (-) character. </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="Hex64BitDataType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex 64 Bit Value to be 0x[a-f0-9]{16}</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*(0x)?[a-fA-F0-9]{1,16}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexAddressType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex Address, 0x[a-fA-F0-9]{1,16}</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*0x[a-fA-F0-9]{1,16}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexByteDataType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex Byte Value to be 0x[a-f0-9]{2}</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*(0x)?[a-fA-F0-9]{1,2}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexDataType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex Value to be 0x[a-f0-9]+</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*0x[a-fA-F0-9]+\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexDigitType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex Diget to be 0x[a-f0-9]</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*[a-fA-F0-9]{1}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexDoubleWordDataType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex Double Word Value to be 0x[a-f0-9]{8}</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*0x[a-fA-F0-9]{1,8}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="HexWordDataType">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define a Hex Word Value to be 0x[a-f0-9]{4}</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*0x[a-fA-F0-9]{1,4}\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="KeywordList">
- <xs:restriction base="xs:string">
- <xs:minLength value="1"/>
- <xs:pattern value="\s*[a-zA-Z]+(\ *_*[a-zA-Z0-9]*)*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="KeywordType">
- <xs:restriction base="xs:normalizedString">
- <xs:pattern value="\s*[a-zA-Z]+(_*[a-zA-Z0-9]*)*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="Paragraph">
- <xs:annotation>
- <xs:documentation xml:lang="en">This describes the normal text of a paragraph that can be used in a license or description tag.</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string"/>
- </xs:simpleType>
- <xs:simpleType name="PathAndFilename">
- <xs:annotation>
- <xs:documentation xml:lang="en"> Naming convention for a path and file name</xs:documentation>
- </xs:annotation>
- <xs:union memberTypes="xs:normalizedString xs:anyURI"/>
- </xs:simpleType>
- <xs:simpleType name="Polarity">
- <xs:annotation>
- <xs:documentation xml:lang="en">Limit Polarity vaild values to 0 and 1</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:int">
- <xs:pattern value="\s*0|1\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="Sentence">
- <xs:annotation>
- <xs:documentation xml:lang="en"> This data type requires two or more words </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:normalizedString">
- <xs:pattern value="\s*(\w+\W*)+( )+(\W*\w*\W*\s*)*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="ToolsNameConvention">
- <xs:annotation>
- <xs:documentation xml:lang="en">This data type is used for ToolCommand, ToolChainFamily and TagName.</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:NCName">
- <xs:pattern value="\s*[a-zA-Z][a-zA-Z0-9]*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="UCNameType">
- <xs:annotation>
- <xs:documentation xml:lang="en"> Definition of a UpperCase Name, which can be any combination of upper case characters followed by zero or more underscore and/or uppercase alphanumeric characters </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*[A-Z]+(_*[A-Z0-9]*)*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="VersionDataType">
- <xs:annotation>
- <xs:documentation xml:lang="en"> Definition of a Version Number, which is one or more strings of decimal digits separated by dots. </xs:documentation>
- <xs:documentation>
- The algorithm to compare two versions A and B is as follows. if A==B, then A is the same version as B. Otherwise, say A is a1.a2.a3...an and B is b1.b2.b3...bn. For the first pair (ai, bi), for i less than n and i less than m, where ai is not equal to bi, if ai is less than bi, then A is less than B. If ai is greater than bi, then A is greater than B.
- </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:string">
- <xs:pattern value="\s*\d+(\.\d+)*\s*"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="Zero">
- <xs:annotation>
- <xs:documentation xml:lang="en">Define Zero as a vaild value</xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:int">
- <xs:pattern value="\s*0\s*"/>
- </xs:restriction>
- </xs:simpleType>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/SurfaceArea.xsd b/BaseTools/Conf/XMLSchema/SurfaceArea.xsd
deleted file mode 100644
index c941be81e7..0000000000
--- a/BaseTools/Conf/XMLSchema/SurfaceArea.xsd
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.TianoCore.org/2007/Edk2.1" xmlns="http://www.TianoCore.org/2007/Edk2.1">
- <!--
- Filename: SurfaceArea.xsd
-
- Copyright (c) 2007, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which may be found at http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- APPROVED: 05-Jun-2007
- -->
- <xs:include schemaLocation="FrameworkHeaders.xsd"/>
- <xs:include schemaLocation="FrameworkDataElements.xsd"/>
- <xs:annotation>
- <xs:documentation xml:lang="en">This describes the valid content of a FrameworkDatabase (DB) File.</xs:documentation>
- </xs:annotation>
- <xs:element name="FrameworkDatabase">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" ref="FdbHeader"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="PackageList"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="FarList"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:annotation>
- <xs:documentation xml:lang="en">This describes the valid content for a Module Surface Area Description (MSA) file.</xs:documentation>
- </xs:annotation>
- <xs:element name="ModuleSurfaceArea">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" ref="MsaHeader"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="ModuleDefinitions"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="LibraryClassDefinitions"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="SourceFiles"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="BinaryFiles"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="NonProcessedFiles"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="PackageDependencies"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Protocols"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Events"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Hobs"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="PPIs"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Variables"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="BootModes"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="SystemTables"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="DataHubs"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="HiiPackages"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Guids"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Externs"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="PcdCoded"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="Depex"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="ModuleBuildOptions"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:annotation>
- <xs:documentation xml:lang="en">This describes the valid content for a Package Surface Area Description (SPD) file.</xs:documentation>
- </xs:annotation>
- <xs:element name="PackageSurfaceArea">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" ref="SpdHeader"/>
- <xs:element minOccurs="1" maxOccurs="1" ref="PackageDefinitions"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="LibraryClassDeclarations"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="IndustryStdIncludes"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="MsaFiles"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="PackageHeaders"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="GuidDeclarations"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="ProtocolDeclarations"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="PpiDeclarations"/>
- <xs:element minOccurs="0" maxOccurs="1" ref="PcdDeclarations"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-</xs:schema>
diff --git a/BaseTools/Conf/XMLSchema/SurfaceArea.xsdconfig b/BaseTools/Conf/XMLSchema/SurfaceArea.xsdconfig
deleted file mode 100644
index 5d86b98fe7..0000000000
--- a/BaseTools/Conf/XMLSchema/SurfaceArea.xsdconfig
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2007, Intel Corporation. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which may be found at http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
--->
-<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
- <xb:namespace uri="http://www.TianoCore.org/2007/Edk2.1">
- <xb:package>org.tianocore</xb:package>
- </xb:namespace>
-</xb:config>
-
diff --git a/BaseTools/Conf/XMLSchema/WorkspaceContent.xsd b/BaseTools/Conf/XMLSchema/WorkspaceContent.xsd
deleted file mode 100644
index 1c9491a5e6..0000000000
--- a/BaseTools/Conf/XMLSchema/WorkspaceContent.xsd
+++ /dev/null
@@ -1,409 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Filename: WorkspaceContent.xsd
-
- Copyright (c) 2008, Intel Corporation. All rights reserved.
-
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License which may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://edk2.TianoCore.org/2008/1.0"
- xmlns="http://edk2.TianoCore.org/2008/1.0">
- <xs:annotation>
- <xs:documentation xml:lang="en-us">This document covers the
- WorkspaceContent.xml file that tracks what has been installed into an EDK
- II development WORKSPACE.</xs:documentation>
- </xs:annotation>
- <xs:element name="WorkspaceContent">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This file describes the distributions,
- packages, stand-alone (non-package) modules and miscellaneous files that
- have been installed in THIS WORKSPACE. Additionally, any tools that are
- installed as part of a distribution are tracked (tools are not required
- to be installed within a WORKSPACE.) </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="Header" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This section tracks required
- information about this WORKSPACE. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element ref="DistributionPackage" minOccurs="1"
- maxOccurs="unbounded">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The list of UEFI/PI distribution
- packages that have been installed in this WORKSPACE.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="Header">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="1" name="Name"
- type="xs:normalizedString">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This User Interface Name can be
- entered during initialization of a WORKSPACE to permit a developer
- to uniquely identify a WORKSPACE. </xs:documentation>
- <xs:documentation xml:lang="en-us"> This value can be used by report
- generators. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="1" maxOccurs="1" name="AbsolutePath"
- type="xs:anyURI">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> When the WORKSPACE is first
- initialized, this is the absolute path to the WORKSPACE. If the
- user moves or re-names the directory, the RmPkg tool will need to
- verify the content of this WORKSPACE before removing any content.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="1" maxOccurs="1" name="LastModifiedDate"
- type="xs:dateTime">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The date and time of the last
- Package Installation or Removal. The format is:
- YYYY-MM-DDThh:mm:ss, for example: 2001-01-31T13:30:00 (note the T
- character separator between the calendar date and the time.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="1" maxOccurs="1"
- name="WorkspaceContentSpecification" default="1.0" type="xs:decimal"
- />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
-
-
- <xs:element name="ModuleList">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" name="Module">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Name" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The User Interface Name of
- the module. </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString">
- <xs:attribute name="BaseName" type="xs:NCName"
- use="required">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The BaseName is
- used to create files and folders during a build, and
- is used by packaging tools as a keyword to create
- the INF file. </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element ref="GUID" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the GUID of the
- module. Backward compatible versions of a module can use the
- same GUID, however the version attribute must be changed
- (incrementally.) Non-backward compatible versions of a
- module must also provide a new GUID, while resetting the
- version attribute is optional. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="InstalledFolder" minOccurs="1" maxOccurs="1"
- type="xs:anyURI">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the WORKSPACE
- relative path that the Module was installed in.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="InfFilename" minOccurs="1" maxOccurs="1"
- type="xs:anyURI">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is filename of the
- INF file created in the InstalledFolder (listed above)
- during installation. </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="DistributionPackage">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="1" name="Name">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The User Interface Name of the
- distribution. </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString">
- <xs:attribute name="BaseName" type="xs:NCName" use="required">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the actual
- BaseName used during the installation. Since users may
- change the Distribution Package's default BaseName (used
- to create the PKG and MANIFEST files) this is the real
- name used to create the files. </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element ref="GUID" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the GUID of the
- distribution, backward compatible versions of a distribution can
- use the same GUID, however the version attribute must be changed
- (incrementally.) Non-backward compatible versions of a
- distribution must also provide a new GUID, while resetting the
- version attribute is optional. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="1" maxOccurs="1" name="PkgFilename"
- type="xs:anyURI">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the filename of the XML
- distribution package surface area (PKG) file that was stored in
- the Conf/Pkgs folder of the WORKSPACE for this distribution
- package. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="1" maxOccurs="1" name="ManifestFilename"
- type="xs:anyURI">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the filename of the
- distribution package manifest (.manifest) file that was created
- and stored in the Conf/Pkgs folder of the WORKSPACE for this
- distribution package. The InstallPkg tool must create this file
- using the extracted locations of the content zip file (or,
- alternatively, the user can create the file by redirecting the
- output of the zip -Tv Contents.zip.) </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element minOccurs="1" maxOccurs="1" name="InstalledDate"
- type="xs:dateTime" />
- <xs:element name="DistributionProperties" minOccurs="0" maxOccurs="1"
- nillable="true">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This section tracks information
- and content that is not associated with either packages or
- modules, or is not required for building packages or modules.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:attribute name="ReadOnly" type="xs:boolean" default="false"
- use="optional">
- <xs:annotation>
- <xs:documentation xml:lang="en-us">If set to true, all content
- within this distribution package should NOT be
- modified.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="RePackage" type="xs:boolean" default="false"
- use="optional">
- <xs:annotation>
- <xs:documentation xml:lang="en-us">If set to true, then the
- content can be repackaged into another distribution
- package.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="ModifiedToolsDef" type="xs:boolean"
- default="false" use="optional">
- <xs:annotation>
- <xs:documentation xml:lang="en-us">If set to true, then either
- the distribution or one of its packages has a user extensions
- section that modified the tools_def.txt file.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="ProvidesTools" type="xs:boolean" default="false"
- use="optional">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is used to identify a
- distribution that provides tools that may or may not be
- installed in a WORKSPACE. </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="ProvidesMiscellaneousFiles" type="xs:boolean"
- default="false" use="optional">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is used to identify a
- distribution that provides miscellaneous files that must be
- installed in a WORKSPACE. </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="UnknownUserExtensions" type="xs:boolean"
- default="false" use="optional">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is used to identify a
- distribution that has a UserExtensions section at the
- Distribution, Package or Module level that uses an Identifier
- other than BuildOptions, ToolsDef or DistributionPackage.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element name="PackageList" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This section tracks individual
- packages (collections of related items.) Each package listed in
- this section must have a DEC file associated with it.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Package" minOccurs="1" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="Name" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The User Interface
- Name of the package. </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:normalizedString">
- <xs:attribute name="BaseName" type="xs:NCName"
- use="required">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> The BaseName
- is used to create files and folders during a
- build, and is used by packaging tools as a
- keyword to create the DEC file.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
- <xs:element ref="GUID" minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the GUID of
- the package, backward compatible versions of a package
- can use the same GUID, however the version attribute
- must be changed (incrementally.) Non-backward
- compatible versions of a package must also provide a
- new GUID, while resetting the version attribute is
- optional. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="InstalledFolder" type="xs:anyURI"
- minOccurs="1" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is used to
- track the actual installation location, relative to
- the WORKSPACE. During an installation, the user may be
- presented with an option to relocate package content
- from the ZIP portion of the archive into a different
- location. </xs:documentation>
- <xs:documentation> Any installation tools must modify
- this value if the location is different from the
- default location. </xs:documentation>
- <xs:documentation> Any removal tools must check this
- value to locate correctly, the items that will be
- removed. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element name="DecFilename" minOccurs="1" maxOccurs="1"
- type="xs:anyURI">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This is the filename
- of the package declaration (DEC) filename created
- during installation in the InstalledFolder listed
- above. </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element ref="ModuleList" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This section is used
- to track the actual installation location, relative to
- the WORKSPACE. Every module that is part of this
- package must be listed here. During an installation,
- the user may be presented with an option to relocate
- module content from the ZIP portion of the archive
- into a different location, the installation tools must
- modify this value if the location is different from
- the default location. Any removal tools must check
- this value to locate correctly, the items that will be
- removed. </xs:documentation>
- <xs:documentation xml:lang="en-us"> The name of any INF
- files that were created during the installation of a
- distribution must also be listed in this section.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element ref="ModuleList" minOccurs="0" maxOccurs="1">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> This section is used to record
- distribution packages that contain modules that are not part of a
- package. Modules that are part of packages are listed under the
- Package element of the PackageList section. </xs:documentation>
- <xs:documentation xml:lang="en-us"> Module only distribution will
- typically be for binary only modules, like the enhanced FAT
- driver. </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="GUID">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="RegistryFormatGuid">
- <xs:attribute name="Version" type="xs:decimal" use="required" />
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- </xs:element>
-
- <!-- Simple Types that further restrict allowed content. -->
-
- <xs:simpleType name="RegistryFormatGuid">
- <xs:annotation>
- <xs:documentation xml:lang="en-us"> A Registry format GUID must contain
- five different Hexadecimal character sets that are separated by a dash
- (-) character. </xs:documentation>
- </xs:annotation>
- <xs:restriction base="xs:normalizedString">
- <xs:pattern
- value="\s*[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\s*"
- />
- </xs:restriction>
- </xs:simpleType>
-
-</xs:schema>
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 257f732cd0..107e783d2e 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -105,6 +105,10 @@
# Unicode-Text-File
#
+## Build Rule Version Number
+# build_rule_version=0.1
+#
+
[C-Code-File]
<InputFile>
?.c
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 68caf86fe6..738cd65052 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -37,6 +37,16 @@ DEFINE VS2008x86_DLL = C:\Program Files (x86)\Microsoft Visual Studio 9.0\Com
DEFINE VS2008x86_BINX64 = DEF(VS2008x86_BIN)\x86_amd64
DEFINE VS2008x86_BIN64 = DEF(VS2008x86_BIN)\x86_ia64
+DEFINE VS2010_BIN = C:\Program Files\Microsoft Visual Studio 10.0\Vc\bin
+DEFINE VS2010_DLL = C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;DEF(VS2010_BIN)
+DEFINE VS2010_BINX64 = DEF(VS2010_BIN)\x86_amd64
+DEFINE VS2010_BIN64 = DEF(VS2010_BIN)\x86_ia64
+
+DEFINE VS2010x86_BIN = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Vc\bin
+DEFINE VS2010x86_DLL = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;DEF(VS2010x86_BIN)
+DEFINE VS2010x86_BINX64 = DEF(VS2010x86_BIN)\x86_amd64
+DEFINE VS2010x86_BIN64 = DEF(VS2010x86_BIN)\x86_ia64
+
DEFINE WINSDK_VERSION = v6.0A
DEFINE WINSDK_BIN = c:\Program Files\Microsoft SDKs\Windows\DEF(WINSDK_VERSION)\bin
DEFINE WINSDKx86_BIN = c:\Program Files (x86)\Microsoft SDKs\Windows\DEF(WINSDK_VERSION)\bin
@@ -225,6 +235,15 @@ DEFINE CLANG_BIN = /usr/bin/
# Required to build platforms or ACPI tables:
# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
# http://www.acpica.org/downloads/previous_releases.php
+# VS2010 -win32- Requires:
+# Microsoft Visual Studio 2010 Premium Edition
+# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
+# Optional:
+# Required to build EBC drivers:
+# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
+# Required to build platforms or ACPI tables:
+# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
+# http://www.acpica.org/downloads/previous_releases.php
# DDK3790 -win32- Requires:
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
@@ -333,6 +352,15 @@ DEFINE CLANG_BIN = /usr/bin/
# Required to build platforms or ACPI tables:
# Microsoft ASL ACPI Compiler (asl.exe) v4.0.0 from
# http://download.microsoft.com/download/2/c/1/2c16c7e0-96c1-40f5-81fc-3e4bf7b65496/microsoft_asl_compiler-v4-0-0.msi
+# VS2010xASL -win32- Requires:
+# Microsoft Visual Studio 2010 Premium Edition
+# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
+# Optional:
+# Required to build EBC drivers:
+# Intel(r) Compiler for Efi Byte Code (Intel(r) EBC Compiler)
+# Required to build platforms or ACPI tables:
+# Microsoft ASL ACPI Compiler (asl.exe) v4.0.0 from
+# http://download.microsoft.com/download/2/c/1/2c16c7e0-96c1-40f5-81fc-3e4bf7b65496/microsoft_asl_compiler-v4-0-0.msi
# DDK3790xASL -win32- Requires:
# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
# Optional:
@@ -390,6 +418,13 @@ DEFINE CLANG_BIN = /usr/bin/
# Required to build platforms or ACPI tables:
# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
# http://www.acpica.org/downloads/previous_releases.php
+# VS2010x86 -win64- Requires:
+# Microsoft Visual Studio 2010 (x86) Premium Edition
+# Microsoft Windows Server 2003 Driver Development Kit (Microsoft WINDDK) version 3790.1830
+# Optional:
+# Required to build platforms or ACPI tables:
+# Intel(r) ACPI Compiler (iasl.exe) v20101013 from
+# http://www.acpica.org/downloads/previous_releases.php
# ICCx86 -win64- Requires:
# Intel C Compiler V9.1(x86)
# Dependencies:
@@ -430,6 +465,13 @@ DEFINE CLANG_BIN = /usr/bin/
# Required to build platforms or ACPI tables:
# Microsoft ASL ACPI Compiler (asl.exe) v4.0.0 from
# http://download.microsoft.com/download/2/c/1/2c16c7e0-96c1-40f5-81fc-3e4bf7b65496/microsoft_asl_compiler-v4-0-0.msi
+# VS2010x86xASL -win64- Requires:
+# Microsoft Visual Studio 2010 (x86) Premium Edition
+# Microsoft Windows Server 2003 Driver Development Kit(Microsoft WINDDK) version 3790.1830
+# Optional:
+# Required to build platforms or ACPI tables:
+# Microsoft ASL ACPI Compiler (asl.exe) v4.0.0 from
+# http://download.microsoft.com/download/2/c/1/2c16c7e0-96c1-40f5-81fc-3e4bf7b65496/microsoft_asl_compiler-v4-0-0.msi
# ICCx86xASL -win64- Requires:
# Intel C Compiler V9.1 (x86)
# Dependencies:
@@ -727,9 +769,9 @@ NOOPT_VS2005_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE
RELEASE_VS2005_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
NOOPT_VS2005_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
- DEBUG_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
-NOOPT_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:I386 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+ DEBUG_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2005_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
##################
# X64 definitions
@@ -1728,6 +1770,513 @@ NOOPT_VS2008x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:R
####################################################################################
#
+# Microsoft Visual Studio 2010
+#
+# VS2010 - Microsoft Visual Studio 2010 Premium Edition
+# ASL - Intel ACPI Source Language Compiler
+####################################################################################
+# VS2010 - Microsoft Visual Studio 2010 Premium Edition
+*_VS2010_*_*_FAMILY = MSFT
+
+*_VS2010_*_MAKE_PATH = DEF(VS2010_BIN)\nmake.exe
+*_VS2010_*_MAKE_FLAGS = /nologo
+*_VS2010_*_RC_PATH = DEF(WINSDK_BIN)\rc.exe
+
+*_VS2010_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2010_*_APP_FLAGS = /nologo /E /TC
+*_VS2010_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+*_VS2010_*_ASM16_PATH = DEF(VS2010_BIN)\ml.exe
+
+##################
+# ASL definitions
+##################
+*_VS2010_*_ASL_PATH = DEF(DEFAULT_WIN_ASL_BIN)
+*_VS2010_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
+*_VS2010_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
+*_VS2010_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2010_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2010_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2010_IA32_*_DLL = DEF(VS2010_DLL)
+
+*_VS2010_IA32_MAKE_PATH = DEF(VS2010_BIN)\nmake.exe
+*_VS2010_IA32_CC_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010_IA32_VFRPP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010_IA32_SLINK_PATH = DEF(VS2010_BIN)\lib.exe
+*_VS2010_IA32_DLINK_PATH = DEF(VS2010_BIN)\link.exe
+*_VS2010_IA32_APP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010_IA32_PP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010_IA32_ASM_PATH = DEF(VS2010_BIN)\ml.exe
+*_VS2010_IA32_ASLCC_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010_IA32_ASLPP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010_IA32_ASLDLINK_PATH = DEF(VS2010_BIN)\link.exe
+
+ *_VS2010_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od
+
+ DEBUG_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+NOOPT_VS2010_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+
+ DEBUG_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# X64 definitions
+##################
+*_VS2010_X64_*_DLL = DEF(VS2010_DLL)
+
+*_VS2010_X64_CC_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010_X64_PP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010_X64_APP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010_X64_VFRPP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010_X64_ASM_PATH = DEF(VS2010_BINX64)\ml64.exe
+*_VS2010_X64_SLINK_PATH = DEF(VS2010_BINX64)\lib.exe
+*_VS2010_X64_DLINK_PATH = DEF(VS2010_BINX64)\link.exe
+*_VS2010_X64_ASLCC_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010_X64_ASLPP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010_X64_ASLDLINK_PATH = DEF(VS2010_BINX64)\link.exe
+
+
+ DEBUG_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od
+
+ DEBUG_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+NOOPT_VS2010_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+
+ DEBUG_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# IPF definitions
+##################
+*_VS2010_IPF_*_DLL = DEF(VS2010_DLL)
+
+*_VS2010_IPF_PP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010_IPF_APP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010_IPF_VFRPP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010_IPF_CC_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010_IPF_ASM_PATH = DEF(VS2010_BIN64)\ias.exe
+*_VS2010_IPF_SLINK_PATH = DEF(VS2010_BIN64)\lib.exe
+*_VS2010_IPF_DLINK_PATH = DEF(VS2010_BIN64)\link.exe
+*_VS2010_IPF_ASLCC_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010_IPF_ASLPP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010_IPF_ASLDLINK_PATH = DEF(VS2010_BIN64)\link.exe
+
+ DEBUG_VS2010_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2010_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+NOOPT_VS2010_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /FIAutoGen.h /QIPF_fr32 /Zi /Od
+
+ DEBUG_VS2010_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2010_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+NOOPT_VS2010_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+
+ DEBUG_VS2010_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2010_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+NOOPT_VS2010_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+
+##################
+# EBC definitions
+##################
+*_VS2010_EBC_*_FAMILY = INTEL
+
+*_VS2010_EBC_MAKE_PATH = DEF(VS2010_BIN)\nmake.exe
+*_VS2010_EBC_PP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2010_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2010_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2010_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
+*_VS2010_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+
+*_VS2010_EBC_MAKE_FLAGS = /nologo
+*_VS2010_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2010_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
+*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2010_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
+*_VS2010_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER
+
+####################################################################################
+#
+# Microsoft Visual Studio 2010
+#
+# VS2010 - Microsoft Visual Studio 2010 Premium Edition
+# ASL - Microsoft ACPI Source Language Compiler (asl.exe)
+####################################################################################
+# VS2010xASL - Microsoft Visual Studio 2010 Premium Edition
+*_VS2010xASL_*_*_FAMILY = MSFT
+
+*_VS2010xASL_*_MAKE_PATH = DEF(VS2010_BIN)\nmake.exe
+*_VS2010xASL_*_MAKE_FLAG = /nologo
+*_VS2010xASL_*_RC_PATH = DEF(WINSDK_BIN)\rc.exe
+
+*_VS2010xASL_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2010xASL_*_APP_FLAGS = /nologo /E /TC
+*_VS2010xASL_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2010xASL_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+*_VS2010xASL_*_ASM16_PATH = DEF(VS2010_BIN)\ml.exe
+
+##################
+# ASL definitions
+##################
+*_VS2010xASL_*_ASL_PATH = DEF(WIN_ASL_BIN)
+*_VS2010xASL_*_ASL_FLAGS =
+*_VS2010xASL_*_ASL_OUTFLAGS = DEF(MS_ASL_OUTFLAGS)
+*_VS2010xASL_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2010xASL_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2010xASL_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2010xASL_IA32_*_DLL = DEF(VS2010_DLL)
+
+*_VS2010xASL_IA32_MAKE_PATH = DEF(VS2010_BIN)\nmake.exe
+*_VS2010xASL_IA32_CC_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010xASL_IA32_VFRPP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010xASL_IA32_SLINK_PATH = DEF(VS2010_BIN)\lib.exe
+*_VS2010xASL_IA32_DLINK_PATH = DEF(VS2010_BIN)\link.exe
+*_VS2010xASL_IA32_APP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010xASL_IA32_PP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010xASL_IA32_ASM_PATH = DEF(VS2010_BIN)\ml.exe
+*_VS2010xASL_IA32_ASLCC_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010xASL_IA32_ASLPP_PATH = DEF(VS2010_BIN)\cl.exe
+*_VS2010xASL_IA32_ASLDLINK_PATH = DEF(VS2010_BIN)\link.exe
+
+ *_VS2010xASL_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2010xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2010xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od
+
+ DEBUG_VS2010xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2010xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+NOOPT_VS2010xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+
+ DEBUG_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# X64 definitions
+##################
+*_VS2010xASL_X64_*_DLL = DEF(VS2010_DLL)
+
+*_VS2010xASL_X64_CC_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010xASL_X64_PP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010xASL_X64_APP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010xASL_X64_VFRPP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010xASL_X64_ASM_PATH = DEF(VS2010_BINX64)\ml64.exe
+*_VS2010xASL_X64_SLINK_PATH = DEF(VS2010_BINX64)\lib.exe
+*_VS2010xASL_X64_DLINK_PATH = DEF(VS2010_BINX64)\link.exe
+*_VS2010xASL_X64_ASLCC_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010xASL_X64_ASLPP_PATH = DEF(VS2010_BINX64)\cl.exe
+*_VS2010xASL_X64_ASLDLINK_PATH = DEF(VS2010_BINX64)\link.exe
+
+
+ DEBUG_VS2010xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2010xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od
+
+ DEBUG_VS2010xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2010xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+NOOPT_VS2010xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+
+ DEBUG_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# IPF definitions
+##################
+*_VS2010xASL_IPF_*_DLL = DEF(VS2010_DLL)
+
+*_VS2010xASL_IPF_PP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010xASL_IPF_APP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010xASL_IPF_VFRPP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010xASL_IPF_CC_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010xASL_IPF_ASM_PATH = DEF(VS2010_BIN64)\ias.exe
+*_VS2010xASL_IPF_SLINK_PATH = DEF(VS2010_BIN64)\lib.exe
+*_VS2010xASL_IPF_DLINK_PATH = DEF(VS2010_BIN64)\link.exe
+*_VS2010xASL_IPF_ASLCC_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010xASL_IPF_ASLPP_PATH = DEF(VS2010_BIN64)\cl.exe
+*_VS2010xASL_IPF_ASLDLINK_PATH = DEF(VS2010_BIN64)\link.exe
+
+ DEBUG_VS2010xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2010xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+NOOPT_VS2010xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /FIAutoGen.h /QIPF_fr32 /Zi /Od
+
+ DEBUG_VS2010xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2010xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+NOOPT_VS2010xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+
+ DEBUG_VS2010xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2010xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+NOOPT_VS2010xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+
+##################
+# EBC definitions
+##################
+*_VS2010xASL_EBC_*_FAMILY = INTEL
+
+*_VS2010xASL_EBC_MAKE_PATH = DEF(VS2010_BIN)\nmake.exe
+*_VS2010xASL_EBC_PP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2010xASL_EBC_VFRPP_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2010xASL_EBC_CC_PATH = DEF(EBC_BIN)\iec.exe
+*_VS2010xASL_EBC_SLINK_PATH = DEF(EBC_BIN)\link.exe
+*_VS2010xASL_EBC_DLINK_PATH = DEF(EBC_BIN)\link.exe
+
+*_VS2010xASL_EBC_MAKE_FLAGS = /nologo
+*_VS2010xASL_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2010xASL_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT)
+*_VS2010xASL_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+*_VS2010xASL_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
+*_VS2010xASL_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER
+
+
+####################################################################################
+# VS2010x86 - Microsoft Visual Studio 2010 (x86) with Intel ASL
+# ASL - Intel ACPI Source Language Compiler (iasl.exe)
+####################################################################################
+# VS2010x86 - Microsoft Visual Studio 2010 (x86) ALL Edition with Intel ASL
+*_VS2010x86_*_*_FAMILY = MSFT
+
+*_VS2010x86_*_MAKE_PATH = DEF(VS2010x86_BIN)\nmake.exe
+*_VS2010x86_*_MAKE_FLAG = /nologo
+*_VS2010x86_*_RC_PATH = DEF(WINSDK_BIN)\rc.exe
+
+*_VS2010x86_*_MAKE_FLAGS = /nologo
+*_VS2010x86_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2010x86_*_APP_FLAGS = /nologo /E /TC
+*_VS2010x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+*_VS2010x86_*_ASM16_PATH = DEF(VS2010x86_BIN)\ml.exe
+
+##################
+# ASL definitions
+##################
+*_VS2010x86_*_ASL_PATH = DEF(WIN_IASL_BIN)
+*_VS2010x86_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
+*_VS2010x86_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
+*_VS2010x86_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2010x86_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2010x86_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2010x86_IA32_*_DLL = DEF(VS2010x86_DLL)
+
+*_VS2010x86_IA32_MAKE_PATH = DEF(VS2010x86_BIN)\nmake.exe
+*_VS2010x86_IA32_CC_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86_IA32_VFRPP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86_IA32_ASLCC_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86_IA32_ASLPP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86_IA32_SLINK_PATH = DEF(VS2010x86_BIN)\lib.exe
+*_VS2010x86_IA32_DLINK_PATH = DEF(VS2010x86_BIN)\link.exe
+*_VS2010x86_IA32_ASLDLINK_PATH= DEF(VS2010x86_BIN)\link.exe
+*_VS2010x86_IA32_APP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86_IA32_PP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86_IA32_ASM_PATH = DEF(VS2010x86_BIN)\ml.exe
+
+ *_VS2010x86_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010x86_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od
+
+ DEBUG_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+NOOPT_VS2010x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+
+ DEBUG_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# X64 definitions
+##################
+*_VS2010x86_X64_*_DLL = DEF(VS2010x86_DLL)
+
+*_VS2010x86_X64_CC_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86_X64_PP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86_X64_APP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86_X64_VFRPP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86_X64_ASLCC_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86_X64_ASLPP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86_X64_ASM_PATH = DEF(VS2010x86_BINX64)\ml64.exe
+*_VS2010x86_X64_SLINK_PATH = DEF(VS2010x86_BINX64)\lib.exe
+*_VS2010x86_X64_DLINK_PATH = DEF(VS2010x86_BINX64)\link.exe
+*_VS2010x86_X64_ASLDLINK_PATH = DEF(VS2010x86_BINX64)\link.exe
+
+ DEBUG_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010x86_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od
+
+ DEBUG_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+NOOPT_VS2010x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+
+ DEBUG_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+
+##################
+# IPF definitions
+##################
+*_VS2010x86_IPF_*_DLL = DEF(VS2010x86_DLL)
+
+*_VS2010x86_IPF_PP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86_IPF_APP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86_IPF_VFRPP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86_IPF_ASLCC_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86_IPF_ASLPP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86_IPF_CC_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86_IPF_ASM_PATH = DEF(VS2010x86_BIN64)\ias.exe
+*_VS2010x86_IPF_SLINK_PATH = DEF(VS2010x86_BIN64)\lib.exe
+*_VS2010x86_IPF_DLINK_PATH = DEF(VS2010x86_BIN64)\link.exe
+*_VS2010x86_IPF_ASLDLINK_PATH = DEF(VS2010x86_BIN64)\link.exe
+
+ DEBUG_VS2010x86_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2010x86_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+NOOPT_VS2010x86_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /FIAutoGen.h /QIPF_fr32 /Zi /Od
+
+ DEBUG_VS2010x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2010x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+NOOPT_VS2010x86_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+
+ DEBUG_VS2010x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2010x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+NOOPT_VS2010x86_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+
+
+####################################################################################
+# VS2010x86xASL - Microsoft Visual Studio 2010 with Microsoft ASL
+# ASL - Microsoft ACPI Source Language Compiler (asl.exe)
+####################################################################################
+*_VS2010x86xASL_*_*_FAMILY = MSFT
+
+*_VS2010x86xASL_*_MAKE_PATH = DEF(VS2010x86_BIN)\nmake.exe
+*_VS2010x86xASL_*_MAKE_FLAG = /nologo
+*_VS2010x86xASL_*_RC_PATH = DEF(WINSDK_BIN)\rc.exe
+
+*_VS2010x86xASL_*_MAKE_FLAGS = /nologo
+*_VS2010x86xASL_*_SLINK_FLAGS = /NOLOGO /LTCG
+*_VS2010x86xASL_*_APP_FLAGS = /nologo /E /TC
+*_VS2010x86xASL_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
+*_VS2010x86xASL_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
+
+*_VS2010x86xASL_*_ASM16_PATH = DEF(VS2010x86_BIN)\ml.exe
+
+##################
+# ASL definitions
+##################
+*_VS2010x86xASL_*_ASL_PATH = DEF(WIN_ASL_BIN)
+*_VS2010x86xASL_*_ASL_FLAGS = DEF(MS_ASL_FLAGS)
+*_VS2010x86xASL_*_ASL_OUTFLAGS = DEF(MS_ASL_OUTFLAGS)
+*_VS2010x86xASL_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
+*_VS2010x86xASL_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
+*_VS2010x86xASL_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
+
+##################
+# IA32 definitions
+##################
+*_VS2010x86xASL_IA32_*_DLL = DEF(VS2010x86_DLL)
+
+*_VS2010x86xASL_IA32_MAKE_PATH = DEF(VS2010x86_BIN)\nmake.exe
+*_VS2010x86xASL_IA32_CC_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86xASL_IA32_VFRPP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86xASL_IA32_ASLCC_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86xASL_IA32_ASLPP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86xASL_IA32_SLINK_PATH = DEF(VS2010x86_BIN)\lib.exe
+*_VS2010x86xASL_IA32_DLINK_PATH = DEF(VS2010x86_BIN)\link.exe
+*_VS2010x86xASL_IA32_ASLDLINK_PATH= DEF(VS2010x86_BIN)\link.exe
+*_VS2010x86xASL_IA32_APP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86xASL_IA32_PP_PATH = DEF(VS2010x86_BIN)\cl.exe
+*_VS2010x86xASL_IA32_ASM_PATH = DEF(VS2010x86_BIN)\ml.exe
+
+ *_VS2010x86xASL_IA32_MAKE_FLAGS = /nologo
+ DEBUG_VS2010x86xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm
+RELEASE_VS2010x86xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1ib2 /GL /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010x86xASL_IA32_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od
+
+ DEBUG_VS2010x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+RELEASE_VS2010x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
+NOOPT_VS2010x86xASL_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
+
+ DEBUG_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010x86xASL_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# X64 definitions
+##################
+*_VS2010x86xASL_X64_*_DLL = DEF(VS2010x86_DLL)
+
+*_VS2010x86xASL_X64_CC_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86xASL_X64_PP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86xASL_X64_APP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86xASL_X64_VFRPP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86xASL_X64_ASLCC_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86xASL_X64_ASLPP_PATH = DEF(VS2010x86_BINX64)\cl.exe
+*_VS2010x86xASL_X64_ASM_PATH = DEF(VS2010x86_BINX64)\ml64.exe
+*_VS2010x86xASL_X64_SLINK_PATH = DEF(VS2010x86_BINX64)\lib.exe
+*_VS2010x86xASL_X64_DLINK_PATH = DEF(VS2010x86_BINX64)\link.exe
+*_VS2010x86xASL_X64_ASLDLINK_PATH = DEF(VS2010x86_BINX64)\link.exe
+
+ DEBUG_VS2010x86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm
+RELEASE_VS2010x86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /O1ib2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF
+NOOPT_VS2010x86xASL_X64_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od
+
+ DEBUG_VS2010x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+RELEASE_VS2010x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
+NOOPT_VS2010x86xASL_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
+
+ DEBUG_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+RELEASE_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.data=.text /MERGE:.rdata=.text
+NOOPT_VS2010x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
+
+##################
+# IPF definitions
+##################
+*_VS2010x86xASL_IPF_*_DLL = DEF(VS2010x86_DLL)
+
+*_VS2010x86xASL_IPF_PP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86xASL_IPF_APP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86xASL_IPF_VFRPP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86xASL_IPF_ASLCC_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86xASL_IPF_ASLPP_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86xASL_IPF_CC_PATH = DEF(VS2010x86_BIN64)\cl.exe
+*_VS2010x86xASL_IPF_ASM_PATH = DEF(VS2010x86_BIN64)\ias.exe
+*_VS2010x86xASL_IPF_SLINK_PATH = DEF(VS2010x86_BIN64)\lib.exe
+*_VS2010x86xASL_IPF_DLINK_PATH = DEF(VS2010x86_BIN64)\link.exe
+*_VS2010x86xASL_IPF_ASLDLINK_PATH = DEF(VS2010x86_BIN64)\link.exe
+
+ DEBUG_VS2010x86xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32 /Zi
+RELEASE_VS2010x86xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /Os /GL /FIAutoGen.h /QIPF_fr32
+NOOPT_VS2010x86xASL_IPF_CC_FLAGS = /nologo /c /WX /GS- /X /W4 /EHs-c- /GR- /Gy /FIAutoGen.h /QIPF_fr32 /Zi /Od
+
+ DEBUG_VS2010x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+RELEASE_VS2010x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4
+NOOPT_VS2010x86xASL_IPF_ASM_FLAGS = -N us -X explicit -M ilp64 -N so -W4 -d debug
+
+ DEBUG_VS2010x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+RELEASE_VS2010x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb
+NOOPT_VS2010x86xASL_IPF_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT:REF,ICF /IGNORE:4001 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:IA64 /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MAP:$(DEBUG_DIR)/$(BASE_NAME).map /PDB:$(DEBUG_DIR)/$(BASE_NAME).pdb /DEBUG
+
+
+####################################################################################
+#
# Microsoft Device Driver Kit 3790.1830 (IA-32, X64, Itanium, with Link Time Code Generation)
# And Intel ACPI Compiler
#
@@ -4370,6 +4919,14 @@ RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM
*_*_*_LZMA_GUID = EE4E5898-3914-4259-9D6E-DC7BD79403CF
##################
+# LzmaF86Compress tool definitions with converter for x86 code.
+# It can improve the compression ratio if the input file is IA32 or X64 PE image.
+# Notes: If X64 PE image is built based on GCC44, it may not get the better compression.
+##################
+*_*_*_LZMAF86_PATH = LzmaF86Compress
+*_*_*_LZMAF86_GUID = D42AE6BD-1352-4bfb-909A-CA72A6EAE889
+
+##################
# TianoCompress tool definitions
##################
*_*_*_TIANO_PATH = TianoCompress
diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
index ad034be538..e0dde3e085 100644
--- a/BaseTools/Source/C/GNUmakefile
+++ b/BaseTools/Source/C/GNUmakefile
@@ -1,7 +1,7 @@
## @file
# GNU Make makefile for C tools build.
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -22,10 +22,7 @@ ifndef ARCH
ifeq ($(uname_m),x86_64)
ARCH=X64
endif
- ifeq ($(uname_m),i386)
- ARCH=IA32
- endif
- ifeq ($(uname_m),i686)
+ ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)
ARCH=IA32
endif
ifndef ARCH
diff --git a/BaseTools/Source/C/Include/Common/BuildVersion.h b/BaseTools/Source/C/Include/Common/BuildVersion.h
index 22327e7ec7..f9144e5f01 100644
--- a/BaseTools/Source/C/Include/Common/BuildVersion.h
+++ b/BaseTools/Source/C/Include/Common/BuildVersion.h
@@ -14,4 +14,4 @@
**/
-#define __BUILD_VERSION "Build 2474"
+#define __BUILD_VERSION "Build 2518"
diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index 1cabc959d8..82d391ce3a 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which accompanies this
@@ -613,7 +613,7 @@ typedef union {
#define EFI_IFR_INCONSISTENT_IF_OP 0x11
#define EFI_IFR_EQ_ID_VAL_OP 0x12
#define EFI_IFR_EQ_ID_ID_OP 0x13
-#define EFI_IFR_EQ_ID_LIST_OP 0x14
+#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
#define EFI_IFR_AND_OP 0x15
#define EFI_IFR_OR_OP 0x16
#define EFI_IFR_NOT_OP 0x17
diff --git a/BaseTools/Source/C/LzmaCompress/GNUmakefile b/BaseTools/Source/C/LzmaCompress/GNUmakefile
index 99e9cbbeb0..07f0a90b60 100644
--- a/BaseTools/Source/C/LzmaCompress/GNUmakefile
+++ b/BaseTools/Source/C/LzmaCompress/GNUmakefile
@@ -1,7 +1,7 @@
## @file
# Windows makefile for 'LzmaCompress' module build.
#
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -24,7 +24,8 @@ OBJECTS = \
$(SDK_C)/LzmaDec.o \
$(SDK_C)/LzmaEnc.o \
$(SDK_C)/7zFile.o \
- $(SDK_C)/7zStream.o
+ $(SDK_C)/7zStream.o \
+ $(SDK_C)/Bra86.o
include $(MAKEROOT)/Makefiles/app.makefile
diff --git a/BaseTools/Source/C/LzmaCompress/LzmaCompress.c b/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
index 7d254ed49a..b569b4e4d9 100644
--- a/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
+++ b/BaseTools/Source/C/LzmaCompress/LzmaCompress.c
@@ -5,7 +5,7 @@
LzmaUtil.c -- Test application for LZMA compression
2008-11-23 : Igor Pavlov : Public domain
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -27,8 +27,17 @@
#include "Sdk/C/7zVersion.h"
#include "Sdk/C/LzmaDec.h"
#include "Sdk/C/LzmaEnc.h"
+#include "Sdk/C/Bra.h"
#include "CommonLib.h"
+#define LZMA_HEADER_SIZE (LZMA_PROPS_SIZE + 8)
+
+typedef enum {
+ NoConverter,
+ X86Converter,
+ MaxConverter
+} CONVERTER_TYPE;
+
const char *kCantReadMessage = "Can not read input file";
const char *kCantWriteMessage = "Can not write output file";
const char *kCantAllocateMessage = "Can not allocate memory";
@@ -39,12 +48,13 @@ static void SzFree(void *p, void *address) { p = p; MyFree(address); }
static ISzAlloc g_Alloc = { SzAlloc, SzFree };
static Bool mQuietMode = False;
+static CONVERTER_TYPE mConType = NoConverter;
#define UTILITY_NAME "LzmaCompress"
#define UTILITY_MAJOR_VERSION 0
-#define UTILITY_MINOR_VERSION 1
+#define UTILITY_MINOR_VERSION 2
#define INTEL_COPYRIGHT \
- "Copyright (c) 2009, Intel Corporation. All rights reserved."
+ "Copyright (c) 2009-2012, Intel Corporation. All rights reserved."
void PrintHelp(char *buffer)
{
strcat(buffer,
@@ -54,6 +64,7 @@ void PrintHelp(char *buffer)
" -e: encode file\n"
" -d: decode file\n"
" -o FileName, --output FileName: specify the output filename\n"
+ " --f86: enable converter for x86 code\n"
" -v, --verbose: increase output messages\n"
" -q, --quiet: reduce output messages\n"
" --debug [0-9]: set debug level\n"
@@ -86,121 +97,151 @@ void PrintVersion(char *buffer)
sprintf (buffer, "%s Version %d.%d %s ", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
-#define IN_BUF_SIZE (1 << 16)
-#define OUT_BUF_SIZE (1 << 16)
-
-static SRes Decode2(CLzmaDec *state, ISeqOutStream *outStream, ISeqInStream *inStream,
- UInt64 unpackSize)
+static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 fileSize)
{
- int thereIsSize = (unpackSize != (UInt64)(Int64)-1);
- Byte inBuf[IN_BUF_SIZE];
- Byte outBuf[OUT_BUF_SIZE];
- size_t inPos = 0, inSize = 0, outPos = 0;
- LzmaDec_Init(state);
- for (;;)
- {
- if (inPos == inSize)
- {
- inSize = IN_BUF_SIZE;
- RINOK(inStream->Read(inStream, inBuf, &inSize));
- inPos = 0;
- }
- {
- SRes res;
- SizeT inProcessed = inSize - inPos;
- SizeT outProcessed = OUT_BUF_SIZE - outPos;
- ELzmaFinishMode finishMode = LZMA_FINISH_ANY;
- ELzmaStatus status;
- if (thereIsSize && outProcessed > unpackSize)
- {
- outProcessed = (SizeT)unpackSize;
- finishMode = LZMA_FINISH_END;
- }
-
- res = LzmaDec_DecodeToBuf(state, outBuf + outPos, &outProcessed,
- inBuf + inPos, &inProcessed, finishMode, &status);
- inPos += inProcessed;
- outPos += outProcessed;
- unpackSize -= outProcessed;
-
- if (outStream)
- if (outStream->Write(outStream, outBuf, outPos) != outPos)
- return SZ_ERROR_WRITE;
+ SRes res;
+ size_t inSize = (size_t)fileSize;
+ Byte *inBuffer = 0;
+ Byte *outBuffer = 0;
+ Byte *filteredStream = 0;
+ size_t outSize;
+ CLzmaEncProps props;
- outPos = 0;
+ LzmaEncProps_Init(&props);
+ LzmaEncProps_Normalize(&props);
+
+ if (inSize != 0) {
+ inBuffer = (Byte *)MyAlloc(inSize);
+ if (inBuffer == 0)
+ return SZ_ERROR_MEM;
+ } else {
+ return SZ_ERROR_INPUT_EOF;
+ }
+
+ if (SeqInStream_Read(inStream, inBuffer, inSize) != SZ_OK) {
+ res = SZ_ERROR_READ;
+ goto Done;
+ }
- if (res != SZ_OK || (thereIsSize && unpackSize == 0))
- return res;
+ // we allocate 105% of original size + 64KB for output buffer
+ outSize = (size_t)fileSize / 20 * 21 + (1 << 16);
+ outBuffer = (Byte *)MyAlloc(outSize);
+ if (outBuffer == 0) {
+ res = SZ_ERROR_MEM;
+ goto Done;
+ }
+
+ {
+ int i;
+ for (i = 0; i < 8; i++)
+ outBuffer[i + LZMA_PROPS_SIZE] = (Byte)(fileSize >> (8 * i));
+ }
- if (inProcessed == 0 && outProcessed == 0)
+ if (mConType != NoConverter)
+ {
+ filteredStream = (Byte *)MyAlloc(inSize);
+ if (filteredStream == 0) {
+ res = SZ_ERROR_MEM;
+ goto Done;
+ }
+ memcpy(filteredStream, inBuffer, inSize);
+
+ if (mConType == X86Converter) {
{
- if (thereIsSize || status != LZMA_STATUS_FINISHED_WITH_MARK)
- return SZ_ERROR_DATA;
- return res;
+ UInt32 x86State;
+ x86_Convert_Init(x86State);
+ x86_Convert(filteredStream, (SizeT) inSize, 0, &x86State, 1);
}
}
}
-}
-
-static SRes Decode(ISeqOutStream *outStream, ISeqInStream *inStream)
-{
- UInt64 unpackSize;
- int i;
- SRes res = 0;
- CLzmaDec state;
-
- /* header: 5 bytes of LZMA properties and 8 bytes of uncompressed size */
- unsigned char header[LZMA_PROPS_SIZE + 8];
-
- /* Read and parse header */
+ {
+ size_t outSizeProcessed = outSize - LZMA_HEADER_SIZE;
+ size_t outPropsSize = LZMA_PROPS_SIZE;
+
+ res = LzmaEncode(outBuffer + LZMA_HEADER_SIZE, &outSizeProcessed,
+ mConType != NoConverter ? filteredStream : inBuffer, inSize,
+ &props, outBuffer, &outPropsSize, 0,
+ NULL, &g_Alloc, &g_Alloc);
+
+ if (res != SZ_OK)
+ goto Done;
+
+ outSize = LZMA_HEADER_SIZE + outSizeProcessed;
+ }
- RINOK(SeqInStream_Read(inStream, header, sizeof(header)));
+ if (outStream->Write(outStream, outBuffer, outSize) != outSize)
+ res = SZ_ERROR_WRITE;
- unpackSize = 0;
- for (i = 0; i < 8; i++)
- unpackSize += (UInt64)header[LZMA_PROPS_SIZE + i] << (i * 8);
+Done:
+ MyFree(outBuffer);
+ MyFree(inBuffer);
+ MyFree(filteredStream);
- LzmaDec_Construct(&state);
- RINOK(LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc));
- res = Decode2(&state, outStream, inStream, unpackSize);
- LzmaDec_Free(&state, &g_Alloc);
return res;
}
-static SRes Encode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 fileSize, char *rs)
+static SRes Decode(ISeqOutStream *outStream, ISeqInStream *inStream, UInt64 fileSize)
{
- CLzmaEncHandle enc;
SRes res;
- CLzmaEncProps props;
+ size_t inSize = (size_t)fileSize;
+ Byte *inBuffer = 0;
+ Byte *outBuffer = 0;
+ size_t outSize = 0;
+ size_t inSizePure;
+ ELzmaStatus status;
+ UInt64 outSize64 = 0;
- rs = rs;
+ int i;
+
+ if (inSize < LZMA_HEADER_SIZE)
+ return SZ_ERROR_INPUT_EOF;
- enc = LzmaEnc_Create(&g_Alloc);
- if (enc == 0)
+ inBuffer = (Byte *)MyAlloc(inSize);
+ if (inBuffer == 0)
return SZ_ERROR_MEM;
+
+ if (SeqInStream_Read(inStream, inBuffer, inSize) != SZ_OK) {
+ res = SZ_ERROR_READ;
+ goto Done;
+ }
- LzmaEncProps_Init(&props);
- res = LzmaEnc_SetProps(enc, &props);
+ for (i = 0; i < 8; i++)
+ outSize64 += ((UInt64)inBuffer[LZMA_PROPS_SIZE + i]) << (i * 8);
+
+ outSize = (size_t)outSize64;
+ if (outSize != 0) {
+ outBuffer = (Byte *)MyAlloc(outSize);
+ if (outBuffer == 0) {
+ res = SZ_ERROR_MEM;
+ goto Done;
+ }
+ } else {
+ res = SZ_OK;
+ goto Done;
+ }
- if (res == SZ_OK)
- {
- Byte header[LZMA_PROPS_SIZE + 8];
- size_t headerSize = LZMA_PROPS_SIZE;
- int i;
+ inSizePure = inSize - LZMA_HEADER_SIZE;
+ res = LzmaDecode(outBuffer, &outSize, inBuffer + LZMA_HEADER_SIZE, &inSizePure,
+ inBuffer, LZMA_PROPS_SIZE, LZMA_FINISH_END, &status, &g_Alloc);
- res = LzmaEnc_WriteProperties(enc, header, &headerSize);
- for (i = 0; i < 8; i++)
- header[headerSize++] = (Byte)(fileSize >> (8 * i));
- if (outStream->Write(outStream, header, headerSize) != headerSize)
- res = SZ_ERROR_WRITE;
- else
- {
- if (res == SZ_OK)
- res = LzmaEnc_Encode(enc, outStream, inStream, NULL, &g_Alloc, &g_Alloc);
- }
+ if (res != SZ_OK)
+ goto Done;
+
+ if (mConType == X86Converter)
+ {
+ UInt32 x86State;
+ x86_Convert_Init(x86State);
+ x86_Convert(outBuffer, (SizeT) outSize, 0, &x86State, 0);
}
- LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc);
+
+ if (outStream->Write(outStream, outBuffer, outSize) != outSize)
+ res = SZ_ERROR_WRITE;
+
+Done:
+ MyFree(outBuffer);
+ MyFree(inBuffer);
+
return res;
}
@@ -214,6 +255,7 @@ int main2(int numArgs, const char *args[], char *rs)
const char *inputFile = NULL;
const char *outputFile = "file.tmp";
int param;
+ UInt64 fileSize;
FileSeqInStream_CreateVTable(&inStream);
File_Construct(&inStream.file);
@@ -231,6 +273,8 @@ int main2(int numArgs, const char *args[], char *rs)
if (strcmp(args[param], "-e") == 0 || strcmp(args[param], "-d") == 0) {
encodeMode = (args[param][1] == 'e');
modeWasSet = True;
+ } else if (strcmp(args[param], "--f86") == 0) {
+ mConType = X86Converter;
} else if (strcmp(args[param], "-o") == 0 ||
strcmp(args[param], "--output") == 0) {
if (numArgs < (param + 2)) {
@@ -292,21 +336,21 @@ int main2(int numArgs, const char *args[], char *rs)
if (OutFile_Open(&outStream.file, outputFile) != 0)
return PrintError(rs, "Can not open output file");
+ File_GetLength(&inStream.file, &fileSize);
+
if (encodeMode)
{
- UInt64 fileSize;
- File_GetLength(&inStream.file, &fileSize);
if (!mQuietMode) {
printf("Encoding\n");
}
- res = Encode(&outStream.s, &inStream.s, fileSize, rs);
+ res = Encode(&outStream.s, &inStream.s, fileSize);
}
else
{
if (!mQuietMode) {
printf("Decoding\n");
}
- res = Decode(&outStream.s, &inStream.s);
+ res = Decode(&outStream.s, &inStream.s, fileSize);
}
File_Close(&outStream.file);
diff --git a/BaseTools/Source/C/LzmaCompress/LzmaF86Compress.bat b/BaseTools/Source/C/LzmaCompress/LzmaF86Compress.bat
new file mode 100644
index 0000000000..77749dfd16
--- /dev/null
+++ b/BaseTools/Source/C/LzmaCompress/LzmaF86Compress.bat
@@ -0,0 +1,31 @@
+@REM
+@REM This script will exec LzmaCompress tool with --f86 option that enables converter for x86 code.
+@REM
+@REM Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
+@REM This program and the accompanying materials
+@REM are licensed and made available under the terms and conditions of the BSD License
+@REM which accompanies this distribution. The full text of the license may be found at
+@REM http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+@REM
+
+@echo off
+@setlocal
+
+:Begin
+if "%1"=="" goto End
+if "%1"=="-e" (
+ set FLAG=--f86
+)
+if "%1"=="-d" (
+ set FLAG=--f86
+)
+set ARGS=%ARGS% %1
+shift
+goto Begin
+
+:End
+LzmaCompress %ARGS% %FLAG%
+@echo on
diff --git a/BaseTools/Source/C/LzmaCompress/Makefile b/BaseTools/Source/C/LzmaCompress/Makefile
index 1c1ba2bc38..872e899512 100644
--- a/BaseTools/Source/C/LzmaCompress/Makefile
+++ b/BaseTools/Source/C/LzmaCompress/Makefile
@@ -1,7 +1,7 @@
## @file
# Windows makefile for 'LzmaCompress' module build.
#
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -25,7 +25,17 @@ OBJECTS = \
$(SDK_C)\LzmaDec.obj \
$(SDK_C)\LzmaEnc.obj \
$(SDK_C)\7zFile.obj \
- $(SDK_C)\7zStream.obj
+ $(SDK_C)\7zStream.obj \
+ $(SDK_C)\Bra86.obj
!INCLUDE ..\Makefiles\ms.app
+all: $(BIN_PATH)\LzmaF86Compress.bat
+
+$(BIN_PATH)\LzmaF86Compress.bat: LzmaF86Compress.bat
+ copy LzmaF86Compress.bat $(BIN_PATH)\LzmaF86Compress.bat /Y
+
+cleanall: localCleanall
+
+localCleanall:
+ del /f /q $(BIN_PATH)\LzmaF86Compress.bat > nul
diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/Bra.h b/BaseTools/Source/C/LzmaCompress/Sdk/C/Bra.h
new file mode 100644
index 0000000000..b9018eb991
--- /dev/null
+++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/Bra.h
@@ -0,0 +1,60 @@
+/* Bra.h -- Branch converters for executables
+2008-10-04 : Igor Pavlov : Public domain */
+
+#ifndef __BRA_H
+#define __BRA_H
+
+#include "Types.h"
+
+/*
+These functions convert relative addresses to absolute addresses
+in CALL instructions to increase the compression ratio.
+
+ In:
+ data - data buffer
+ size - size of data
+ ip - current virtual Instruction Pinter (IP) value
+ state - state variable for x86 converter
+ encoding - 0 (for decoding), 1 (for encoding)
+
+ Out:
+ state - state variable for x86 converter
+
+ Returns:
+ The number of processed bytes. If you call these functions with multiple calls,
+ you must start next call with first byte after block of processed bytes.
+
+ Type Endian Alignment LookAhead
+
+ x86 little 1 4
+ ARMT little 2 2
+ ARM little 4 0
+ PPC big 4 0
+ SPARC big 4 0
+ IA64 little 16 0
+
+ size must be >= Alignment + LookAhead, if it's not last block.
+ If (size < Alignment + LookAhead), converter returns 0.
+
+ Example:
+
+ UInt32 ip = 0;
+ for ()
+ {
+ ; size must be >= Alignment + LookAhead, if it's not last block
+ SizeT processed = Convert(data, size, ip, 1);
+ data += processed;
+ size -= processed;
+ ip += processed;
+ }
+*/
+
+#define x86_Convert_Init(state) { state = 0; }
+SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding);
+SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+
+#endif
diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/Bra86.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/Bra86.c
new file mode 100644
index 0000000000..93566cb212
--- /dev/null
+++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/Bra86.c
@@ -0,0 +1,85 @@
+/* Bra86.c -- Converter for x86 code (BCJ)
+2008-10-04 : Igor Pavlov : Public domain */
+
+#include "Bra.h"
+
+#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
+
+const Byte kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0};
+const Byte kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3};
+
+SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding)
+{
+ SizeT bufferPos = 0, prevPosT;
+ UInt32 prevMask = *state & 0x7;
+ if (size < 5)
+ return 0;
+ ip += 5;
+ prevPosT = (SizeT)0 - 1;
+
+ for (;;)
+ {
+ Byte *p = data + bufferPos;
+ Byte *limit = data + size - 4;
+ for (; p < limit; p++)
+ if ((*p & 0xFE) == 0xE8)
+ break;
+ bufferPos = (SizeT)(p - data);
+ if (p >= limit)
+ break;
+ prevPosT = bufferPos - prevPosT;
+ if (prevPosT > 3)
+ prevMask = 0;
+ else
+ {
+ prevMask = (prevMask << ((int)prevPosT - 1)) & 0x7;
+ if (prevMask != 0)
+ {
+ Byte b = p[4 - kMaskToBitNumber[prevMask]];
+ if (!kMaskToAllowedStatus[prevMask] || Test86MSByte(b))
+ {
+ prevPosT = bufferPos;
+ prevMask = ((prevMask << 1) & 0x7) | 1;
+ bufferPos++;
+ continue;
+ }
+ }
+ }
+ prevPosT = bufferPos;
+
+ if (Test86MSByte(p[4]))
+ {
+ UInt32 src = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]);
+ UInt32 dest;
+ for (;;)
+ {
+ Byte b;
+ int index;
+ if (encoding)
+ dest = (ip + (UInt32)bufferPos) + src;
+ else
+ dest = src - (ip + (UInt32)bufferPos);
+ if (prevMask == 0)
+ break;
+ index = kMaskToBitNumber[prevMask] * 8;
+ b = (Byte)(dest >> (24 - index));
+ if (!Test86MSByte(b))
+ break;
+ src = dest ^ ((1 << (32 - index)) - 1);
+ }
+ p[4] = (Byte)(~(((dest >> 24) & 1) - 1));
+ p[3] = (Byte)(dest >> 16);
+ p[2] = (Byte)(dest >> 8);
+ p[1] = (Byte)dest;
+ bufferPos += 5;
+ }
+ else
+ {
+ prevMask = ((prevMask << 1) & 0x7) | 1;
+ bufferPos++;
+ }
+ }
+ prevPosT = bufferPos - prevPosT;
+ *state = ((prevPosT > 3) ? 0 : ((prevMask << ((int)prevPosT - 1)) & 0x7));
+ return bufferPos;
+}
diff --git a/BaseTools/Source/C/Makefile b/BaseTools/Source/C/Makefile
index 367a5dbead..789e06f18d 100644
--- a/BaseTools/Source/C/Makefile
+++ b/BaseTools/Source/C/Makefile
@@ -1,7 +1,7 @@
## @file
# Windows makefile for C tools build.
#
-# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -59,6 +59,7 @@ install: $(LIB_PATH) $(BIN_PATH)
@echo ######################
@-xcopy $(LIB_PATH)\*.lib $(SYS_LIB_PATH) /I /D /E /F /Y > NUL 2>&1
@-xcopy $(BIN_PATH)\*.exe $(SYS_BIN_PATH) /I /D /E /F /Y > NUL 2>&1
+ @-xcopy $(BIN_PATH)\*.bat $(SYS_BIN_PATH) /I /D /E /F /Y > NUL 2>&1
.PHONY: clean
clean:
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index b4f9d8fd7f..2e859b8dfa 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -2,7 +2,7 @@
The definition of CFormPkg's member function
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -963,7 +963,7 @@ CIfrRecordInfoDB::CheckIdOpCode (
switch (OpCode) {
case EFI_IFR_EQ_ID_VAL_OP:
case EFI_IFR_EQ_ID_ID_OP:
- case EFI_IFR_EQ_ID_LIST_OP:
+ case EFI_IFR_EQ_ID_VAL_LIST_OP:
case EFI_IFR_QUESTION_REF1_OP:
return TRUE;
default:
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index 92e47d97a3..5f4d87aa0a 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -2,7 +2,7 @@
The definition of CFormPkg's member function
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1885,8 +1885,8 @@ private:
public:
CIfrEqIdList (
IN UINT32 LineNo
- ) : CIfrObj (EFI_IFR_EQ_ID_LIST_OP, (CHAR8 **)&mEqIdVList, sizeof (EFI_IFR_EQ_ID_VAL_LIST), TRUE),
- CIfrOpHeader (EFI_IFR_EQ_ID_LIST_OP, &mEqIdVList->Header) {
+ ) : CIfrObj (EFI_IFR_EQ_ID_VAL_LIST_OP, (CHAR8 **)&mEqIdVList, sizeof (EFI_IFR_EQ_ID_VAL_LIST), TRUE),
+ CIfrOpHeader (EFI_IFR_EQ_ID_VAL_LIST_OP, &mEqIdVList->Header) {
SetLineNo (LineNo);
mEqIdVList->QuestionId = EFI_QUESTION_ID_INVALID;
mEqIdVList->ListLength = 0;
diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
index c3a729eabf..0444677e86 100644
--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp
@@ -2,7 +2,7 @@
Vfr common library functions.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -3067,6 +3067,83 @@ CVfrStringDB::SetStringFileName(IN CHAR8 *StringFileName)
mStringFileName[FileLen - 1] = '\0';
}
+
+/**
+ Returns TRUE or FALSE whether SupportedLanguages contains the best matching language
+ from a set of supported languages.
+
+ @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that
+ contains a set of language codes.
+ @param[in] Language A variable that contains pointers to Null-terminated
+ ASCII strings that contain one language codes.
+
+ @retval FALSE The best matching language could not be found in SupportedLanguages.
+ @retval TRUE The best matching language could be found in SupportedLanguages.
+
+**/
+BOOLEAN
+CVfrStringDB::GetBestLanguage (
+ IN CONST CHAR8 *SupportedLanguages,
+ IN CHAR8 *Language
+ )
+{
+ UINTN CompareLength;
+ UINTN LanguageLength;
+ CONST CHAR8 *Supported;
+
+ if (SupportedLanguages == NULL || Language == NULL){
+ return FALSE;
+ }
+
+ //
+ // Determine the length of the first RFC 4646 language code in Language
+ //
+ for (LanguageLength = 0; Language[LanguageLength] != 0 && Language[LanguageLength] != ';'; LanguageLength++);
+
+ //
+ // Trim back the length of Language used until it is empty
+ //
+ while (LanguageLength > 0) {
+ //
+ // Loop through all language codes in SupportedLanguages
+ //
+ for (Supported = SupportedLanguages; *Supported != '\0'; Supported += CompareLength) {
+ //
+ // Skip ';' characters in Supported
+ //
+ for (; *Supported != '\0' && *Supported == ';'; Supported++);
+ //
+ // Determine the length of the next language code in Supported
+ //
+ for (CompareLength = 0; Supported[CompareLength] != 0 && Supported[CompareLength] != ';'; CompareLength++);
+ //
+ // If Language is longer than the Supported, then skip to the next language
+ //
+ if (LanguageLength > CompareLength) {
+ continue;
+ }
+
+ //
+ // See if the first LanguageLength characters in Supported match Language
+ //
+ if (strncmp (Supported, Language, LanguageLength) == 0) {
+ return TRUE;
+ }
+ }
+
+ //
+ // Trim Language from the right to the next '-' character
+ //
+ for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--);
+ }
+
+ //
+ // No matches were found
+ //
+ return FALSE;
+}
+
+
CHAR8 *
CVfrStringDB::GetVarStoreNameFormStringId (
IN EFI_STRING_ID StringId
@@ -3122,17 +3199,18 @@ CVfrStringDB::GetVarStoreNameFormStringId (
}
//
- // Search the language, only search the "en-US".
+ // Search the language, get best language base on RFC 4647 matching algorithm.
//
Current = StringPtr;
- while (strcmp (PkgHeader->Language, "en-US") != 0) {
+ while (!GetBestLanguage ("en", PkgHeader->Language)) {
Current += PkgHeader->Header.Length;
PkgHeader = (EFI_HII_STRING_PACKAGE_HDR *) Current;
//
- // If can't find "en-US" string package, just return the first string package.
+ // If can't find string package base on language, just return the first string package.
//
if (Current - StringPtr >= Length) {
Current = StringPtr;
+ PkgHeader = (EFI_HII_STRING_PACKAGE_HDR *) StringPtr;
break;
}
}
diff --git a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
index 9facce8149..2c0ed7bd54 100644
--- a/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
+++ b/BaseTools/Source/C/VfrCompile/VfrUtilityLib.h
@@ -2,7 +2,7 @@
Vfr common library functions.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -438,6 +438,11 @@ private:
UINT32 GetUnicodeStringTextSize (
IN UINT8 *StringSrc
);
+
+ BOOLEAN GetBestLanguage (
+ IN CONST CHAR8 *SupportedLanguages,
+ IN CHAR8 *Language
+ );
public:
CVfrStringDB ();
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 894ec8dcd8..2f38c6afd5 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -46,6 +46,9 @@ gMakeTypeMap = {"MSFT":"nmake", "GCC":"gmake"}
## Build rule configuration file
gBuildRuleFile = 'Conf/build_rule.txt'
+## Build rule default version
+AutoGenReqBuildRuleVerNum = "0.1"
+
## default file name for AutoGen
gAutoGenCodeFileName = "AutoGen.c"
gAutoGenHeaderFileName = "AutoGen.h"
@@ -288,8 +291,25 @@ class WorkspaceAutoGen(AutoGen):
# apply SKU and inject PCDs from Flash Definition file
for Arch in self.ArchList:
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
+
+ DecPcds = set()
+ PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
+ Pkgs = PGen.PackageList
+ for Pkg in Pkgs:
+ for Pcd in Pkg.Pcds.keys():
+ DecPcds.add((Pcd[0], Pcd[1]))
+ Platform.IsPlatformPcdDeclared(DecPcds)
+
Platform.SkuName = self.SkuId
for Name, Guid in PcdSet:
+ if (Name, Guid) not in DecPcds:
+ EdkLogger.error(
+ 'build',
+ PARSER_ERROR,
+ "PCD (%s.%s) used in FDF is not declared in DEC files." % (Guid, Name),
+ File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
+ Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
+ )
Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
Pa = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
@@ -334,11 +354,14 @@ class WorkspaceAutoGen(AutoGen):
#
InfFoundFlag = False
for Pa in self.AutoGenObjectList:
+ if InfFoundFlag:
+ break
for Module in Pa.ModuleAutoGenList:
if path.normpath(Module.MetaFile.File) == path.normpath(FfsFile.InfFileName):
InfFoundFlag = True
if not Module.Guid.upper() in _GuidDict.keys():
_GuidDict[Module.Guid.upper()] = FfsFile
+ break
else:
EdkLogger.error("build",
FORMAT_INVALID,
@@ -1230,6 +1253,15 @@ class PlatformAutoGen(AutoGen):
if BuildRuleFile in [None, '']:
BuildRuleFile = gBuildRuleFile
self._BuildRule = BuildRule(BuildRuleFile)
+ if self._BuildRule._FileVersion == "":
+ self._BuildRule._FileVersion = AutoGenReqBuildRuleVerNum
+ else:
+ if self._BuildRule._FileVersion < AutoGenReqBuildRuleVerNum :
+ # If Build Rule's version is less than the version number required by the tools, halting the build.
+ EdkLogger.error("build", AUTOGEN_ERROR,
+ ExtraData="The version number [%s] of build_rule.txt is less than the version number required by the AutoGen.(the minimum required version number is [%s])"\
+ % (self._BuildRule._FileVersion, AutoGenReqBuildRuleVerNum))
+
return self._BuildRule
## Summarize the packages used by modules in this platform
diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
index 45a560448e..5a7527ef4b 100644
--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
@@ -354,6 +354,7 @@ class BuildRule:
self._FamilyList = []
self._TotalToolChainFamilySet = set()
self._RuleObjectList = [] # FileBuildRule object list
+ self._FileVersion = ""
self.Parse()
@@ -368,7 +369,11 @@ class BuildRule:
# Clean up the line and replace path separator with native one
Line = self.RuleContent[Index].strip().replace(self._PATH_SEP, os.path.sep)
self.RuleContent[Index] = Line
-
+
+ # find the build_rule_version
+ if Line and Line[0] == "#" and Line.find(TAB_BUILD_RULE_VERSION) <> -1:
+ if Line.find("=") <> -1 and Line.find("=") < (len(Line)-1) and (Line[(Line.find("=") + 1):]).split():
+ self._FileVersion = (Line[(Line.find("=") + 1):]).split()[0]
# skip empty or comment line
if Line == "" or Line[0] == "#":
continue
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py
index 63131cee24..fafcd70b86 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -1,7 +1,7 @@
## @file
# Routines for generating AutoGen.h and AutoGen.c
#
-# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -103,17 +103,17 @@ typedef struct {
} SKU_HEAD;
typedef struct {
+ UINT32 StringIndex; // Offset in String Table in units of UINT32.
+ UINT32 DefaultValueOffset; // Offset of the Default Value
UINT16 GuidTableIndex; // Offset in Guid Table in units of GUID.
- UINT16 StringIndex; // Offset in String Table in units of UINT16.
UINT16 Offset; // Offset in Variable
- UINT16 DefaultValueOffset; // Offset of the Default Value
} VARIABLE_HEAD;
typedef struct {
UINT32 Offset;
} VPD_HEAD;
-typedef UINT16 STRING_HEAD;
+typedef UINT32 STRING_HEAD;
typedef UINT16 SIZE_INFO;
@@ -1346,13 +1346,13 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, Phase):
VariableHeadGuidIndex = GuidList.index(VariableGuid)
if "PCD_TYPE_STRING" in Pcd.TokenTypeList:
- VariableHeadValueList.append('%dU, %dU, %sU, offsetof(%s_PCD_DATABASE, Init.%s_%s)' %
- (VariableHeadGuidIndex, VariableHeadStringIndex, Sku.VariableOffset,
- Phase, CName, TokenSpaceGuid))
+ VariableHeadValueList.append('%dU, offsetof(%s_PCD_DATABASE, Init.%s_%s), %dU, %sU' %
+ (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid,
+ VariableHeadGuidIndex, Sku.VariableOffset))
else:
- VariableHeadValueList.append('%dU, %dU, %sU, offsetof(%s_PCD_DATABASE, Init.%s_%s_VariableDefault_%s)' %
- (VariableHeadGuidIndex, VariableHeadStringIndex, Sku.VariableOffset,
- Phase, CName, TokenSpaceGuid, SkuIdIndex))
+ VariableHeadValueList.append('%dU, offsetof(%s_PCD_DATABASE, Init.%s_%s_VariableDefault_%s), %dU, %sU' %
+ (VariableHeadStringIndex, Phase, CName, TokenSpaceGuid, SkuIdIndex,
+ VariableHeadGuidIndex, Sku.VariableOffset))
Dict['VARDEF_CNAME_'+Pcd.DatumType].append(CName)
Dict['VARDEF_GUID_'+Pcd.DatumType].append(TokenSpaceGuid)
Dict['VARDEF_SKUID_'+Pcd.DatumType].append(SkuIdIndex)
diff --git a/BaseTools/Source/Python/Common/BuildVersion.py b/BaseTools/Source/Python/Common/BuildVersion.py
index b6b02cf8ae..c5dae6daa4 100644
--- a/BaseTools/Source/Python/Common/BuildVersion.py
+++ b/BaseTools/Source/Python/Common/BuildVersion.py
@@ -13,4 +13,4 @@
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
-gBUILD_VERSION = "Build 2474"
+gBUILD_VERSION = "Build 2518"
diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/Python/Common/DataType.py
index fc0a7ad026..e5e7eaeede 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -29,6 +29,7 @@ TAB_OPTION_START = '<'
TAB_OPTION_END = '>'
TAB_SLASH = '\\'
TAB_BACK_SLASH = '/'
+TAB_LINE_BREAK = '\n'
TAB_EDK_SOURCE = '$(EDK_SOURCE)'
TAB_EFI_SOURCE = '$(EFI_SOURCE)'
@@ -421,3 +422,11 @@ TAB_DEPENDENCY_EXPRESSION_FILE = "DEPENDENCY-EXPRESSION-FILE"
TAB_UNKNOWN_FILE = "UNKNOWN-TYPE-FILE"
TAB_DEFAULT_BINARY_FILE = "_BINARY_FILE_"
+# used by BRG
+TAB_BRG_PCD = 'PCD'
+TAB_BRG_LIBRARY = 'Library'
+
+#
+# Build Rule File Version Definition
+#
+TAB_BUILD_RULE_VERSION = "build_rule_version"
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 8b112d50b3..a4853b78a4 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -36,6 +36,7 @@ ERR_STRING_CMP = 'Unicode string and general string cannot be compared:
ERR_ARRAY_TOKEN = 'Bad C array or C format GUID token: [%s].'
ERR_ARRAY_ELE = 'This must be HEX value for NList or Array: [%s].'
ERR_EMPTY_EXPR = 'Empty expression is not allowed.'
+ERR_IN_OPERAND = 'Macro after IN operator can only be: $(FAMILY), $(ARCH), $(TOOL_CHAIN_TAG) and $(TARGET).'
## SplitString
# Split string to list according double quote
@@ -88,22 +89,29 @@ def ReplaceExprMacro(String, Macros, ExceptionList = None):
# If an undefined macro name appears in the constant-expression of
# !if or !elif, it is replaced by the integer constant 0.
RetStr += '0'
- elif not InQuote and ExceptionList and Macro in ExceptionList:
+ elif not InQuote:
+ Tklst = RetStr.split()
+ if Tklst and Tklst[-1] in ['IN', 'in'] and ExceptionList and Macro not in ExceptionList:
+ raise BadExpression(ERR_IN_OPERAND)
# Make sure the macro in exception list is encapsulated by double quote
# For example: DEFINE ARCH = IA32 X64
# $(ARCH) is replaced with "IA32 X64"
- RetStr += '"' + Macros[Macro] + '"'
- else:
- if Macros[Macro].strip() != "":
+ if ExceptionList and Macro in ExceptionList:
+ RetStr += '"' + Macros[Macro] + '"'
+ elif Macros[Macro].strip():
RetStr += Macros[Macro]
else:
RetStr += '""'
+ else:
+ RetStr += Macros[Macro]
RetStr += String[MacroEndPos+1:]
String = RetStr
MacroStartPos = String.find('$(')
StrList[i] = RetStr
return ''.join(StrList)
+SupportedInMacroList = ['TARGET', 'TOOL_CHAIN_TAG', 'ARCH', 'FAMILY']
+
class ValueExpression(object):
# Logical operator mapping
LogicalOperators = {
@@ -213,7 +221,7 @@ class ValueExpression(object):
self._Expr = ReplaceExprMacro(Expression.strip(),
SymbolTable,
- ['TARGET', 'TOOL_CHAIN_TAG', 'ARCH'])
+ SupportedInMacroList)
if not self._Expr.strip():
raise BadExpression(ERR_EMPTY_EXPR)
@@ -457,7 +465,9 @@ class ValueExpression(object):
# PCD token
if self.PcdPattern.match(self._Token):
if self._Token not in self._Symb:
- raise BadExpression(ERR_PCD_RESOLVE % self._Token)
+ Ex = BadExpression(ERR_PCD_RESOLVE % self._Token)
+ Ex.Pcd = self._Token
+ raise Ex
self._Token = ValueExpression(self._Symb[self._Token], self._Symb)(True)
if type(self._Token) != type(''):
self._LiteralToken = hex(self._Token)
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index 492aa39962..d566a57844 100644
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -26,6 +26,10 @@ gAllFiles = None
gGlobalDefines = {}
gPlatformDefines = {}
+# PCD name and value pair for fixed at build and feature flag
+gPlatformPcds = {}
+# PCDs with type that are not fixed at build and feature flag
+gPlatformOtherPcds = {}
gActivePlatform = None
gCommandLineDefines = {}
gEdkGlobal = {}
diff --git a/BaseTools/Source/Python/Common/String.py b/BaseTools/Source/Python/Common/String.py
index 0f2a61b1b9..068a63d1c1 100644
--- a/BaseTools/Source/Python/Common/String.py
+++ b/BaseTools/Source/Python/Common/String.py
@@ -319,7 +319,7 @@ def NormPath(Path, Defines={}):
#
# @retval Path Formatted path
#
-def CleanString(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyleComment=False):
+def CleanString(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyleComment=False, BuildOption=False):
#
# remove whitespace
#
@@ -343,7 +343,7 @@ def CleanString(Line, CommentCharacter=DataType.TAB_COMMENT_SPLIT, AllowCppStyle
Line = Line[0: Index]
break
- if CommentInString:
+ if CommentInString and BuildOption:
Line = Line.replace('"', '')
ChIndex = Line.find('#')
while ChIndex >= 0:
diff --git a/BaseTools/Source/Python/Ecc/Ecc.py b/BaseTools/Source/Python/Ecc/Ecc.py
index e2e92ef672..b1a0ab8272 100644
--- a/BaseTools/Source/Python/Ecc/Ecc.py
+++ b/BaseTools/Source/Python/Ecc/Ecc.py
@@ -28,6 +28,7 @@ from Common.String import NormPath
from Common.BuildVersion import gBUILD_VERSION
from Common import BuildToolError
from Common.Misc import PathClass
+from Common.Misc import DirCache
from MetaFileWorkspace.MetaFileParser import DscParser
from MetaFileWorkspace.MetaFileParser import DecParser
from MetaFileWorkspace.MetaFileParser import InfParser
@@ -106,6 +107,11 @@ class Ecc(object):
EccGlobalData.gDb = Database.Database(Database.DATABASE_PATH)
EccGlobalData.gDb.InitDatabase(self.IsInit)
+ #
+ # Get files real name in workspace dir
+ #
+ GlobalData.gAllFiles = DirCache(GlobalData.gWorkspace)
+
# Build ECC database
self.BuildDatabase()
@@ -137,13 +143,13 @@ class Ecc(object):
EccGlobalData.gDb.TblReport.Create()
# Build database
- if self.IsInit:
- if self.ScanSourceCode:
- EdkLogger.quiet("Building database for source code ...")
- c.CollectSourceCodeDataIntoDB(EccGlobalData.gTarget)
+ if self.IsInit:
if self.ScanMetaData:
- EdkLogger.quiet("Building database for source code done!")
+ EdkLogger.quiet("Building database for Meta Data File ...")
self.BuildMetaDataFileDatabase()
+ if self.ScanSourceCode:
+ EdkLogger.quiet("Building database for Meta Data File Done!")
+ c.CollectSourceCodeDataIntoDB(EccGlobalData.gTarget)
EccGlobalData.gIdentifierTableList = GetTableList((MODEL_FILE_C, MODEL_FILE_H), 'Identifier', EccGlobalData.gDb)
EccGlobalData.gCFileList = GetFileList(MODEL_FILE_C, EccGlobalData.gDb)
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py
index 3060698288..643c228665 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaDataTable.py
@@ -96,7 +96,10 @@ class Table(object):
#
def Drop(self):
SqlCommand = """drop table IF EXISTS %s""" % self.Table
- self.Cur.execute(SqlCommand)
+ try:
+ self.Cur.execute(SqlCommand)
+ except sqlite3.Error, e:
+ print "An error occurred when Drop a table:", e.args[0]
## Get count
#
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
index 9ca00f043b..d10265e973 100644
--- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
@@ -1162,8 +1162,9 @@ class DscParser(MetaFileParser):
self._IdMapping[Id] = self._LastItem
RecordList = self._Table.GetAll()
- self._Table.Drop()
+
self._RawTable.Drop()
+ self._Table.Drop()
for Record in RecordList:
EccGlobalData.gDb.TblDsc.Insert(Record[1],Record[2],Record[3],Record[4],Record[5],Record[6],Record[7],Record[8],Record[9],Record[10],Record[11],Record[12],Record[13],Record[14])
GlobalData.gPlatformDefines.update(self._FileLocalMacros)
diff --git a/BaseTools/Source/Python/Fdb/__init__.py b/BaseTools/Source/Python/Fdb/__init__.py
deleted file mode 100644
index c9dbe8e4f1..0000000000
--- a/BaseTools/Source/Python/Fdb/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'Fdb' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Source/Python/FixFlash/__init__.py b/BaseTools/Source/Python/FixFlash/__init__.py
deleted file mode 100644
index b648fcaf0e..0000000000
--- a/BaseTools/Source/Python/FixFlash/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'FixFlash' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 7a569e88dd..dc5c4fa034 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -77,6 +77,7 @@ SEPERATOR_TUPLE = ('=', '|', ',', '{', '}')
RegionSizePattern = re.compile("\s*(?P<base>(?:0x|0X)?[a-fA-F0-9]+)\s*\|\s*(?P<size>(?:0x|0X)?[a-fA-F0-9]+)\s*")
RegionSizeGuidPattern = re.compile("\s*(?P<base>\w+\.\w+)\s*\|\s*(?P<size>\w+\.\w+)\s*")
+ShortcutPcdPattern = re.compile("\s*\w+\s*=\s*(?P<value>(?:0x|0X)?[a-fA-F0-9]+)\s*\|\s*(?P<name>\w+\.\w+)\s*")
IncludeFileList = []
@@ -679,7 +680,7 @@ class FdfParser:
PreIndex = 0
StartPos = CurLine.find('$(', PreIndex)
EndPos = CurLine.find(')', StartPos+2)
- while StartPos != -1 and EndPos != -1 and not (self.__Token == '!ifdef' or self.__Token == '!ifndef'):
+ while StartPos != -1 and EndPos != -1 and self.__Token not in ['!ifdef', '!ifndef', '!if', '!elseif']:
MacroName = CurLine[StartPos+2 : EndPos]
MacorValue = self.__GetMacroValue(MacroName)
if MacorValue != None:
@@ -711,6 +712,8 @@ class FdfParser:
self.__SetMacroValue(Macro, Value)
self.__WipeOffArea.append(((DefineLine, DefineOffset), (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
elif self.__Token == 'SET':
+ SetLine = self.CurrentLineNumber - 1
+ SetOffset = self.CurrentOffsetWithinLine - len('SET')
PcdPair = self.__GetNextPcdName()
PcdName = "%s.%s" % (PcdPair[1], PcdPair[0])
if not self.__IsToken( "="):
@@ -720,6 +723,12 @@ class FdfParser:
Value = self.__EvaluateConditional(Value, self.CurrentLineNumber, 'eval', True)
self.__PcdDict[PcdName] = Value
+
+ self.Profile.PcdDict[PcdPair] = Value
+ FileLineTuple = GetRealFileLine(self.FileName, self.CurrentLineNumber)
+ self.Profile.PcdFileLineDict[PcdPair] = FileLineTuple
+
+ self.__WipeOffArea.append(((SetLine, SetOffset), (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
elif self.__Token in ('!ifdef', '!ifndef', '!if'):
IfStartPos = (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - len(self.__Token))
IfList.append([IfStartPos, None, None])
@@ -773,6 +782,11 @@ class FdfParser:
if self.CurrentLineNumber <= RegionLayoutLine:
# Don't try the same line twice
continue
+ SetPcd = ShortcutPcdPattern.match(self.Profile.FileLinesList[self.CurrentLineNumber - 1])
+ if SetPcd:
+ self.__PcdDict[SetPcd.group('name')] = SetPcd.group('value')
+ RegionLayoutLine = self.CurrentLineNumber
+ continue
RegionSize = RegionSizePattern.match(self.Profile.FileLinesList[self.CurrentLineNumber - 1])
if not RegionSize:
RegionLayoutLine = self.CurrentLineNumber
@@ -793,6 +807,7 @@ class FdfParser:
MacroDict = {}
# PCD macro
+ MacroDict.update(GlobalData.gPlatformPcds)
MacroDict.update(self.__PcdDict)
# Lowest priority
@@ -838,7 +853,19 @@ class FdfParser:
Line=Line)
return Excpt.result
except Exception, Excpt:
- raise Warning("Invalid expression", *FileLineTuple)
+ if hasattr(Excpt, 'Pcd'):
+ if Excpt.Pcd in GlobalData.gPlatformOtherPcds:
+ Info = GlobalData.gPlatformOtherPcds[Excpt.Pcd]
+ raise Warning("Cannot use this PCD (%s) in an expression as"
+ " it must be defined in a [PcdsFixedAtBuild] or [PcdsFeatureFlag] section"
+ " of the DSC file (%s), and it is currently defined in this section:"
+ " %s, line #: %d." % (Excpt.Pcd, GlobalData.gPlatformOtherPcds['DSCFILE'], Info[0], Info[1]),
+ *FileLineTuple)
+ else:
+ raise Warning("PCD (%s) is not defined in DSC file (%s)" % (Excpt.Pcd, GlobalData.gPlatformOtherPcds['DSCFILE']),
+ *FileLineTuple)
+ else:
+ raise Warning(str(Excpt), *FileLineTuple)
else:
if Expression.startswith('$(') and Expression[-1] == ')':
Expression = Expression[2:-1]
@@ -2287,6 +2314,10 @@ class FdfParser:
if not self.__GetNextToken():
raise Warning("expected INF file path", self.FileName, self.CurrentLineNumber)
ffsInf.InfFileName = self.__Token
+
+ ffsInf.CurrentLineNum = self.CurrentLineNumber
+ ffsInf.CurrentLineContent = self.__CurrentLine()
+
if ffsInf.InfFileName.replace('$(WORKSPACE)', '').find('$') == -1:
#do case sensitive check for file path
ErrorCode, ErrorInfo = PathClass(NormPath(ffsInf.InfFileName), GenFdsGlobalVariable.WorkSpaceDir).Validate()
@@ -2306,9 +2337,6 @@ class FdfParser:
else:
raise Warning("Unknown reloc strip flag '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
- ffsInf.CurrentLineNum = self.CurrentLineNumber
- ffsInf.CurrentLineContent = self.__CurrentLine()
-
if ForCapsule:
capsuleFfs = CapsuleData.CapsuleFfs()
capsuleFfs.Ffs = ffsInf
@@ -2419,9 +2447,6 @@ class FdfParser:
FfsFileObj.NameGuid = self.__Token
- FfsFileObj.CurrentLineNum = self.CurrentLineNumber
- FfsFileObj.CurrentLineContent = self.__CurrentLine()
-
self.__GetFilePart( FfsFileObj, MacroDict.copy())
if ForCapsule:
@@ -2511,6 +2536,8 @@ class FdfParser:
self.__UndoToken()
self.__GetSectionData( FfsFileObj, MacroDict)
else:
+ FfsFileObj.CurrentLineNum = self.CurrentLineNumber
+ FfsFileObj.CurrentLineContent = self.__CurrentLine()
FfsFileObj.FileName = self.__Token
if FfsFileObj.FileName.replace('$(WORKSPACE)', '').find('$') == -1:
#
diff --git a/BaseTools/Source/Python/GenFds/Ffs.py b/BaseTools/Source/Python/GenFds/Ffs.py
index d9f1cdaff0..c8c5a6e861 100644
--- a/BaseTools/Source/Python/GenFds/Ffs.py
+++ b/BaseTools/Source/Python/GenFds/Ffs.py
@@ -64,6 +64,7 @@ class Ffs(FDClassObject):
'COMPAT16' : '.com16',
'RAW' : '.raw',
'FREEFORM_SUBTYPE_GUID': '.guid',
+ 'SUBTYPE_GUID' : '.guid',
'FV_IMAGE' : 'fv.sec',
'COMPRESS' : '.com',
'GUIDED' : '.guided',
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py
index 8a742d95be..fb86a152b6 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -314,7 +314,7 @@ def myOptionParser():
Parser.add_option("-r", "--rom_image", dest="uiFdName", help="Build the image using the [FD] section named by FdUiName.")
Parser.add_option("-i", "--FvImage", dest="uiFvName", help="Build the FV image using the [FV] section named by UiFvName")
Parser.add_option("-C", "--CapsuleImage", dest="uiCapName", help="Build the Capsule image using the [Capsule] section named by UiCapName")
- Parser.add_option("-b", "--buildtarget", type="choice", choices=['DEBUG','RELEASE', 'NOOPT'], dest="BuildTarget", help="Build TARGET is one of list: DEBUG, RELEASE, NOOPT.",
+ Parser.add_option("-b", "--buildtarget", type="string", dest="BuildTarget", help="Set the build TARGET, overrides target.txt TARGET setting.",
action="callback", callback=SingleCheckCallback)
Parser.add_option("-t", "--tagname", type="string", dest="ToolChain", help="Using the tools: TOOL_CHAIN_TAG name to build the platform.",
action="callback", callback=SingleCheckCallback)
@@ -516,10 +516,13 @@ class GenFds :
for ModuleFile in PlatformDataBase.Modules:
Module = BuildDb.BuildObject[ModuleFile, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
GuidXRefFile.write("%s %s\n" % (Module.Guid, Module.BaseName))
- SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False)
+ if GuidXRefFile.getvalue():
+ SaveFileOnChange(GuidXRefFileName, GuidXRefFile.getvalue(), False)
+ GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName)
+ elif os.path.exists(GuidXRefFileName):
+ os.remove(GuidXRefFileName)
GuidXRefFile.close()
- GenFdsGlobalVariable.InfLogger("\nGUID cross reference file can be found at %s" % GuidXRefFileName)
-
+
##Define GenFd as static function
GenFd = staticmethod(GenFd)
GetFvBlockSize = staticmethod(GetFvBlockSize)
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
index ea6b191bc1..b457937628 100644
--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
+++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
@@ -1,7 +1,7 @@
## @file
# Global variables for GenFds
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -581,7 +581,7 @@ class GenFdsGlobalVariable:
sys.stdout.write('\n')
try:
- PopenObject = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr= subprocess.PIPE)
+ PopenObject = subprocess.Popen(' '.join(cmd), stdout=subprocess.PIPE, stderr= subprocess.PIPE, shell=True)
except Exception, X:
EdkLogger.error("GenFds", COMMAND_FAILURE, ExtraData="%s: %s" % (str(X), cmd[0]))
(out, error) = PopenObject.communicate()
diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile
index a1a0a5e639..fec8b43646 100644
--- a/BaseTools/Source/Python/Makefile
+++ b/BaseTools/Source/Python/Makefile
@@ -21,7 +21,7 @@ MODULES=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8,encodings
BIN_DIR=$(EDK_TOOLS_PATH)\Bin\Win32
-APPLICATIONS=$(BIN_DIR)\build.exe $(BIN_DIR)\GenFds.exe $(BIN_DIR)\Trim.exe $(BIN_DIR)\MigrationMsa2Inf.exe $(BIN_DIR)\Fpd2Dsc.exe $(BIN_DIR)\TargetTool.exe $(BIN_DIR)\spd2dec.exe $(BIN_DIR)\GenDepex.exe $(BIN_DIR)\GenPatchPcdTable.exe $(BIN_DIR)\PatchPcdValue.exe $(BIN_DIR)\BPDG.exe $(BIN_DIR)\UPT.exe
+APPLICATIONS=$(BIN_DIR)\build.exe $(BIN_DIR)\GenFds.exe $(BIN_DIR)\Trim.exe $(BIN_DIR)\TargetTool.exe $(BIN_DIR)\GenDepex.exe $(BIN_DIR)\GenPatchPcdTable.exe $(BIN_DIR)\PatchPcdValue.exe $(BIN_DIR)\BPDG.exe $(BIN_DIR)\UPT.exe
COMMON_PYTHON=$(BASE_TOOLS_PATH)\Source\Python\Common\BuildToolError.py \
$(BASE_TOOLS_PATH)\Source\Python\Common\Database.py \
@@ -77,15 +77,6 @@ $(BIN_DIR)\GenFds.exe: $(BASE_TOOLS_PATH)\Source\Python\GenFds\GenFds.py $(COMMO
$(BIN_DIR)\Trim.exe: $(BASE_TOOLS_PATH)\Source\Python\Trim\Trim.py $(COMMON_PYTHON)
@pushd . & @cd Trim & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) Trim.py & @popd
-$(BIN_DIR)\MigrationMsa2Inf.exe: $(BASE_TOOLS_PATH)\Source\Python\MigrationMsa2Inf\MigrationMsa2Inf.py $(COMMON_PYTHON)
- @pushd . & @cd MigrationMsa2Inf & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) MigrationMsa2Inf.py & @popd
-
-$(BIN_DIR)\Fpd2Dsc.exe: $(BASE_TOOLS_PATH)\Source\Python\Fpd2Dsc\Fpd2Dsc.py $(COMMON_PYTHON)
- @pushd . & @cd Fpd2Dsc & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) Fpd2Dsc.py & @popd
-
-$(BIN_DIR)\spd2dec.exe: $(BASE_TOOLS_PATH)\Source\Python\spd2dec\Spd2Dec.py $(COMMON_PYTHON)
- @pushd . & @cd Spd2Dec & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) Spd2Dec.py & @popd
-
$(BIN_DIR)\GenDepex.exe: $(BASE_TOOLS_PATH)\Source\Python\AutoGen\GenDepex.py $(COMMON_PYTHON)
@pushd . & @cd AutoGen & @$(FREEZE) --include-modules=$(MODULES) --install-dir=$(BIN_DIR) GenDepex.py & @popd
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py b/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py
deleted file mode 100644
index 37fff885a8..0000000000
--- a/BaseTools/Source/Python/MigrationMsa2Inf/AutoGenExterns.py
+++ /dev/null
@@ -1,369 +0,0 @@
-#!/usr/bin/env python
-#
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-
-#
-# Import Modules
-#
-import re, os, glob
-from Common.XmlRoutines import *
-
-#"ModuleType"=>(PackageGuid, headerFileName) List
-HeaderFiles = {}
-GuidList = []
-GuidMap = {}
-HeaderFileContents = {}
-gTest = {}
-GuidMacro2CName = {}
-GuidAliasList = []
-
-def collectIncludeFolder(pkgDirName, guidType, pkgName):
- includeFolder = os.path.join(pkgDirName, "Include", guidType)
- if os.path.exists(includeFolder) and os.path.isdir(includeFolder):
- for headerFileName in os.listdir(includeFolder):
- if headerFileName[-2:] == ".h":
- headerFile = open(os.path.join(includeFolder, headerFileName))
- HeaderFileContents[(guidType, headerFileName, pkgName)] = headerFile.read()
- headerFile.close()
-
-GuidMacroReg = re.compile(r"\b(?!EFI_GUID\b)[A-Z0-9_]+_GUID\b")
-GuidCNameReg = re.compile(r"\bg\w+Guid\b")
-GuidAliasReg = re.compile(r"#define\s+([A-Z0-9_]+_GUID)\s+([A-Z0-9_]+_GUID)\b")
-
-def collectPackageInfo(spdFileName):
- pkgDirName = os.path.dirname(spdFileName)
-
- spd = XmlParseFile(spdFileName)
-
- pkgName = XmlElement(spd, "/PackageSurfaceArea/SpdHeader/PackageName")
- pkgGuid = XmlElement(spd, "/PackageSurfaceArea/SpdHeader/GuidValue")
-
-
- for IncludePkgHeader in XmlList(spd, "/PackageSurfaceArea/PackageHeaders/IncludePkgHeader"):
- moduleType = XmlAttribute(IncludePkgHeader, "ModuleType")
- headerFilePath = XmlElementData(IncludePkgHeader)
- headerFilePath = re.sub("Include/", "", headerFilePath, 1)
-
- headerTuple = HeaderFiles.get(moduleType, [])
- headerTuple.append((pkgGuid, headerFilePath))
- HeaderFiles[moduleType] = headerTuple
-
- guidTypes = ["Guid", "Protocol", "Ppi"]
-
- for guidType in guidTypes:
- for guidEntry in XmlList(spd, "/PackageSurfaceArea/" + guidType + "Declarations/Entry"):
- guidCName = XmlElement(guidEntry, "Entry/C_Name")
- GuidList.append(guidCName)
-
- collectIncludeFolder(pkgDirName, guidType, pkgName)
-
- for DecFile in glob.glob(os.path.join(pkgDirName, "*.dec")):
- fileContents = open(DecFile).read()
- for GuidCNameMatch in GuidCNameReg.finditer(fileContents):
- GuidCName = GuidCNameMatch.group(0)
- if GuidCName not in GuidList:
- GuidList.append(GuidCName)
-
-def AddGuidMacro2GuidCName(GuidMacros, GuidCNames):
- for GuidMacro in GuidMacros:
- GuessGuidCName = "g" + GuidMacro.lower().title().replace("_", "")
- if GuessGuidCName in GuidCNames:
- GuidMacro2CName[GuidMacro] = GuessGuidCName
- elif len(GuidCNames) == 1:
- GuidMacro2CName[GuidMacro] = GuidCNames[0]
- else:
- for GuidCName in GuidCNames:
- if GuidCName.lower() == GuessGuidCName.lower():
- GuidMacro2CName[GuidMacro] = GuidCName
- break
- else:
- pass
- #print "No matching GuidMacro %s" % GuidMacro
-
-
-def TranslateGuid(GuidMacroMatch):
- GuidMacro = GuidMacroMatch.group(0)
- return GuidMacro2CName.get(GuidMacro, GuidMacro)
-
-DepexReg = re.compile(r"DEPENDENCY_START(.*?)DEPENDENCY_END", re.DOTALL)
-
-def TranslateDpxSection(fileContents):
- DepexMatch = DepexReg.search(fileContents)
- if not DepexMatch:
- return "", []
-
- fileContents = DepexMatch.group(1)
- fileContents = re.sub(r"\s+", " ", fileContents).strip()
- fileContents = GuidMacroReg.sub(TranslateGuid, fileContents)
- return fileContents, GuidMacroReg.findall(fileContents)
-
-def InitializeAutoGen(workspace, db):
-
-
- for spdFile in XmlList(db, "/FrameworkDatabase/PackageList/Filename"):
- spdFileName = XmlElementData(spdFile)
- collectPackageInfo(os.path.join(workspace, spdFileName))
-
-
- BlockCommentReg = re.compile(r"/\*.*?\*/", re.DOTALL)
- LineCommentReg = re.compile(r"//.*")
- GuidReg = re.compile(r"\b(" + '|'.join(GuidList) + r")\b")
-
- for headerFile in HeaderFileContents:
- Contents = HeaderFileContents[headerFile]
- Contents = BlockCommentReg.sub("", Contents)
- Contents = LineCommentReg.sub("", Contents)
-
- FoundGuids = GuidReg.findall(Contents)
- for FoundGuid in FoundGuids:
- GuidMap[FoundGuid] = "%s/%s" % (headerFile[0], headerFile[1])
- #print "%-40s %s/%s" % (FoundGuid, headerFile[0], headerFile[1])
-
- GuidMacros = GuidMacroReg.findall(Contents)
- GuidCNames = GuidCNameReg.findall(Contents)
-
- for GuidAliasMatch in GuidAliasReg.finditer(Contents):
- Name1, Name2 = GuidAliasMatch.group(1), GuidAliasMatch.group(2)
- GuidAliasList.append((Name1, Name2))
-
- AddGuidMacro2GuidCName(GuidMacros, GuidCNames)
-
-def AddSystemIncludeStatement(moduleType, PackageList):
- IncludeStatement = "\n"
-
- headerList = HeaderFiles.get(moduleType, [])
-
- for pkgGuid in PackageList:
-
- for pkgTuple in headerList:
- if pkgTuple[0] == pkgGuid:
- IncludeStatement += "#include <%s>\n" % pkgTuple[1]
-
- return IncludeStatement
-
-
-def AddLibraryClassStatement(LibraryClassList):
- IncludeStatement = "\n"
- for LibraryClass in LibraryClassList:
- IncludeStatement += "#include <Library/%s.h>\n" % LibraryClass
-
- return IncludeStatement
-
-def AddGuidStatement(GuidList):
- IncludeStatement = "\n"
- GuidIncludeSet = {}
- for Guid in GuidList:
- if Guid in GuidMap:
- GuidIncludeSet[GuidMap[Guid]] = 1
- else:
- print "GUID CName: %s cannot be found in any public header file" % Guid
-
- for GuidInclude in GuidIncludeSet:
- IncludeStatement += "#include <%s>\n" % GuidInclude
-
- return IncludeStatement
-
-DriverBindingMap = {
- "gEfiDriverBindingProtocolGuid" : "EFI_DRIVER_BINDING_PROTOCOL",
- "gEfiComponentNameProtocolGuid" : "EFI_COMPONENT_NAME_PROTOCOL",
- "gEfiDriverConfigurationProtocolGuid" : "EFI_DRIVER_CONFIGURATION_PROTOCOL",
- "gEfiDriverDiagnosticProtocolGuid" : "EFI_DRIVER_CONFIGURATION_PROTOCOL"
- }
-
-def AddDriverBindingProtocolStatement(AutoGenDriverModel):
- InstallStatement = "\n"
- DBindingHandle = "ImageHandle"
- GlobalDeclaration = "\n"
-
-
- for DriverModelItem in AutoGenDriverModel:
-
- if DriverModelItem[1] == "NULL" and DriverModelItem[2] == "NULL" and DriverModelItem[3] == "NULL":
- InstallStatement += " Status = EfiLibInstallDriverBinding (\n"
- InstallStatement += " ImageHandle,\n"
- InstallStatement += " SystemTable,\n"
- InstallStatement += " %s,\n" % DriverModelItem[0]
- InstallStatement += " %s\n" % DBindingHandle
- InstallStatement += " );\n"
- else:
- InstallStatement += " Status = EfiLibInstallAllDriverProtocols (\n"
- InstallStatement += " ImageHandle,\n"
- InstallStatement += " SystemTable,\n"
- InstallStatement += " %s,\n" % DriverModelItem[0]
- InstallStatement += " %s,\n" % DBindingHandle
- InstallStatement += " %s,\n" % DriverModelItem[1]
- InstallStatement += " %s,\n" % DriverModelItem[2]
- InstallStatement += " %s\n" % DriverModelItem[3]
- InstallStatement += " );\n"
-
- InstallStatement += " ASSERT_EFI_ERROR (Status);\n\n"
-
- GlobalDeclaration += "extern EFI_DRIVER_BINDING_PROTOCOL %s;\n" % DriverModelItem[0][1:]
- if (DriverModelItem[1] != "NULL"):
- GlobalDeclaration += "extern EFI_COMPONENT_NAME_PROTOCOL %s;\n" % DriverModelItem[1][1:]
- if (DriverModelItem[2] != "NULL"):
- GlobalDeclaration += "extern EFI_DRIVER_CONFIGURATION_PROTOCOL %s;\n" % DriverModelItem[2][1:]
- if (DriverModelItem[3] != "NULL"):
- GlobalDeclaration += "extern EFI_DRIVER_CONFIGURATION_PROTOCOL %s;\n" % DriverModelItem[3][1:]
-
- DBindingHandle = "NULL"
-
- return (InstallStatement, "", "", GlobalDeclaration)
-
-EventDeclarationTemplate = """
-//
-// Declaration for callback Event.
-//
-VOID
-EFIAPI
-%s (
- IN EFI_EVENT Event,
- IN VOID *Context
- );
-"""
-
-def AddBootServiceEventStatement(EventList):
- FinalEvent = ""
- if len(EventList) > 1:
-
- print "Current prototype does not support multi boot service event"
- else:
- FinalEvent = EventList[0]
-
- CreateStatement = "\n"
- CreateStatement += " Status = gBS->CreateEvent (\n"
- CreateStatement += " EVT_SIGNAL_EXIT_BOOT_SERVICES,\n"
- CreateStatement += " EFI_TPL_NOTIFY,\n"
- CreateStatement += " " + FinalEvent + ",\n"
- CreateStatement += " NULL,\n"
- CreateStatement += " &mExitBootServicesEvent\n"
- CreateStatement += " );\n"
- CreateStatement += " ASSERT_EFI_ERROR (Status);\n"
-
- GlobalDefinition = "\n"
- GlobalDefinition += "STATIC EFI_EVENT mExitBootServicesEvent = NULL;\n"
-
- GlobalDeclaration = EventDeclarationTemplate % FinalEvent
-
- DestroyStatement = "\n"
- DestroyStatement += " Status = gBS->CloseEvent (mExitBootServicesEvent);\n"
- DestroyStatement += " ASSERT_EFI_ERROR (Status);\n"
- return (CreateStatement, "", GlobalDefinition, GlobalDeclaration)
-
-def AddVirtualAddressEventStatement(EventList):
- FinalEvent = ""
- if len(EventList) > 1:
- print "Current prototype does not support multi virtual address change event"
- else:
- FinalEvent = EventList[0]
-
- CreateStatement = "\n"
-
- CreateStatement += " Status = gBS->CreateEvent (\n"
- CreateStatement += " EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,\n"
- CreateStatement += " TPL_NOTIFY,\n"
- CreateStatement += " " + FinalEvent + ",\n"
- CreateStatement += " NULL,\n"
- CreateStatement += " &mVirtualAddressChangedEvent\n"
- CreateStatement += " );\n"
- CreateStatement += " ASSERT_EFI_ERROR (Status);\n"
-
- GlobalDefinition = "\n"
- GlobalDefinition += "STATIC EFI_EVENT mVirtualAddressChangedEvent = NULL;\n"
-
- GlobalDeclaration = EventDeclarationTemplate % FinalEvent
-
- DestroyStatement = "\n"
- DestroyStatement += " Status = gBS->CloseEvent (mVirtualAddressChangedEvent);\n"
- DestroyStatement += " ASSERT_EFI_ERROR (Status);\n"
-
- return (CreateStatement, "", GlobalDefinition, GlobalDeclaration)
-
-
-EntryPointDeclarationTemplate = """
-//
-// Declaration for original Entry Point.
-//
-EFI_STATUS
-EFIAPI
-%s (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- );
-"""
-
-EntryPointHeader = r"""
-/**
- The user Entry Point for module %s. The user code starts with this function.
-
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
-
- @retval EFI_SUCCESS The entry point is executed successfully.
- @retval other Some error occurs when executing this entry point.
-
-**/
-"""
-def AddNewEntryPointContentsStatement (moduleName, EntryPoint, InstallStatement = ""):
- if EntryPoint != "Initialize%s" % moduleName:
- NewEntryPoint = "Initialize%s" % moduleName
- else:
- NewEntryPoint = "NewInitialize%s" % moduleName
-
- EntryPointContents = EntryPointHeader % moduleName
- EntryPointContents += "EFI_STATUS\n"
- EntryPointContents += "EFIAPI\n"
- EntryPointContents += NewEntryPoint + "(\n"
- EntryPointContents += " IN EFI_HANDLE ImageHandle,\n"
- EntryPointContents += " IN EFI_SYSTEM_TABLE *SystemTable\n"
- EntryPointContents += " )\n"
- EntryPointContents += "{\n"
- EntryPointContents += " EFI_STATUS Status;\n"
- EntryPointContents += InstallStatement + "\n"
- GlobalDeclaration = ""
-
- if EntryPoint != "":
- EntryPointContents += " //\n // Call the original Entry Point\n //\n"
- EntryPointContents += " Status = %s (ImageHandle, SystemTable);\n\n" % EntryPoint
- GlobalDeclaration += EntryPointDeclarationTemplate % EntryPoint
-
- EntryPointContents += " return Status;\n"
- EntryPointContents += "}\n"
-
- return (NewEntryPoint, EntryPointContents, GlobalDeclaration)
-
-reFileHeader = re.compile(r"^\s*/\*.*?\*/\s*", re.DOTALL)
-reNext = re.compile(r"#ifndef\s*(\w+)\s*#define\s*\1\s*")
-
-def AddCommonInclusionStatement(fileContents, includeStatement):
- if includeStatement in fileContents:
- return fileContents
-
- insertPos = 0
- matchFileHeader = reFileHeader.search(fileContents)
- if matchFileHeader:
- insertPos = matchFileHeader.end()
-
- matchFileHeader = reNext.search(fileContents, insertPos)
- if matchFileHeader:
- insertPos = matchFileHeader.end()
-
- includeStatement = "\n%s\n\n" % includeStatement
- fileContents = fileContents[0:insertPos] + includeStatement + fileContents[insertPos:]
- return fileContents
-
-# This acts like the main() function for the script, unless it is 'import'ed into another
-# script.
-if __name__ == '__main__':
-
- pass
-
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py b/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
deleted file mode 100644
index d69e2308f0..0000000000
--- a/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py
+++ /dev/null
@@ -1,2478 +0,0 @@
-#!/usr/bin/env python
-#
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-
-""" This program converts EDK II MSA files into EDK II Extended INF format files """
-
-import os, re, sys, fnmatch, xml.dom.minidom
-from optparse import OptionParser
-from AutoGenExterns import *
-from Common.XmlRoutines import * # XmlParseFile, XmlElement, XmlAttribute, XmlList, XmlElementData, XmlNode
-from Common.EdkIIWorkspace import *
-from Common.BuildVersion import gBUILD_VERSION
-
-versionNumber = ("0.9" + " " + gBUILD_VERSION)
-__version__ = "%prog Version " + versionNumber
-__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
-
-commonHeaderFilename = "CommonHeader.h"
-entryPointFilename = "EntryPoint.c"
-
-AutoGenLibraryMapping = {
- "HiiLib":"HiiLibFramework",
- "EdkIfrSupportLib":"IfrSupportLibFramework",
- "EdkScsiLib":"ScsiLib",
- "EdkUsbLib":"UsbLib",
- "EdkFvbServiceLib":"FvbServiceLib",
- "EdkGraphicsLib":"GraphicsLib"
- }
-
-def myOptionParser():
- """ Argument Parser """
- usage = "%prog [options] -f input_filename"
- parser = OptionParser(usage=usage,description=__copyright__,version="%prog " + str(versionNumber))
- parser.add_option("-f", "--file", dest="filename", help="Name of MSA file to convert")
- parser.add_option("-o", "--output", dest="outfile", help="Specific Name of the INF file to create, otherwise it is the MSA filename with the extension repalced.")
- parser.add_option("-a", "--auto", action="store_true", dest="autowrite", default=False, help="Automatically create output files and write the INF file")
- parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False, help="Set Interactive mode, user must approve each change.")
- parser.add_option("-q", "--quiet", action="store_const", const=0, dest="verbose", help="Do not print any messages, just return either 0 for succes or 1 for failure")
- parser.add_option("-v", "--verbose", action="count", dest="verbose", help="Do not print any messages, just return either 0 for succes or 1 for failure")
- parser.add_option("-d", "--debug", action="store_true", dest="debug", default=False, help="Enable printing of debug messages.")
- parser.add_option("-c", "--convert", action="store_true", dest="convert", default=False, help="Convert package: OldMdePkg->MdePkg EdkModulePkg->MdeModulePkg.")
- parser.add_option("-e", "--event", action="store_true", dest="event", default=False, help="Enable handling of Exit Boot Services & Virtual Address Changed Event")
- parser.add_option("-m", "--manual", action="store_true", dest="manual", default=False, help="Generate CommonHeader.txt, user picks up & copy it to a module common header")
- parser.add_option("-w", "--workspace", dest="workspace", default=str(os.environ.get('WORKSPACE')), help="Specify workspace directory.")
- (options, args) = parser.parse_args(sys.argv[1:])
-
- return options,args
-
-
-def openDatabase(f):
- """ Parse XML in the FrameworkDatabase.db file pointed to by f """
- if (options.debug and options.verbose > 1):
- print "Opening the database file:", f
- if os.path.exists(f):
- fdb = XmlParseFile(f)
- else:
- return "None"
- return fdb
-
-def openSpd(s):
- """ Parse XML in the SPD file pointed to by s """
- if (options.debug and options.verbose > 1):
- print "Opening the SPD file:", s
- if os.path.exists(s):
- spd = XmlParseFile(s)
- else:
- return "None"
- return spd
-
-def openMsa(m):
- """ Parse XML in the MSA file pointed to by m """
- if (options.debug and options.verbose > 1):
- print "Opening the MSA file:", m
- if os.path.exists(m):
- msa = XmlParseFile(m)
- else:
- return "None"
- return msa
-
-def AddGuid(ArchList, CName, Usage):
- """ Add a GUID to the Architecture array that the GUID is valid for. """
- if "IA32" in ArchList:
- GuidCNameIa32.insert(0, str(" %-45s # %s" % (CName, Usage)))
- if "X64" in ArchList:
- GuidCNameX64.insert(0, str(" %-45s # %s" % (CName, Usage)))
- if "IPF" in ArchList:
- GuidCNameIPF.insert(0, str(" %-45s # %s" % (CName, Usage)))
- if "EBC" in ArchList:
- GuidCNameEBC.insert(0, str(" %-45s # %s" % (CName, Usage)))
- if "ALL" in ArchList:
- GuidCName.insert(0, str(" %-45s # %s" % (CName, Usage)))
-
-
-def removeDups(CN, ListName):
- """ Remove Duplicate Entries from the Guid List passed in """
- for Entry in ListName[:]:
- if " " + CN + " " in Entry:
- if (options.verbose > 1):
- print "Removing C Name %s Entry from Guids List." % (CN)
- ListName.remove(Entry)
-
-def chkArch(Archs):
- """ Process the supported architectures passed in to combine if possible """
- Archs = Archs.upper()
- if (("IA32" in Archs) & ("X64" in Archs) & ("IPF" in Archs) & ("EBC" in Archs)):
- Archs = "ALL"
- if (len(Archs) == 0):
- Archs = "ALL"
- return Archs
-
-def saveSourceFile(moduleDir, sourceFilename, sourceFileContents):
- newFilename = os.path.join(moduleDir, sourceFilename)
-
- try:
- f = open(newFilename, "w+")
- f.write(sourceFileContents)
- f.close()
- except:
- print "IO error in saving %s" % sourceFilename
-
- return sourceFilename
-
-def openSourceFile(moduleDir, sourceFilename):
- newFilename = os.path.join(moduleDir, sourceFilename)
- sourceFileContents = ""
- try:
- f = open(newFilename, "r")
- sourceFileContents = f.read()
- f.close()
- except:
- print "IO error in opening %s" % sourceFilename
-
- return sourceFileContents
-
-def MatchOption(eline, ToolChainFamily, Targets, Archs, ToolCode, Value):
- IDs = eline.split("_")
-
- if len(IDs) < 5:
- return []
-
- MatchedTargets = []
- if (Targets[0] == "*") or IDs[0] in Targets:
- MatchedTargets.append(IDs[0])
- elif IDs[0] == "*":
- MatchedTargets = Targets
-
- MatchedArchs = []
- if Archs[0] == "*" or IDs[2] in Archs:
- MatchedArchs.append(IDs[2])
- elif IDs[2] == "*":
- MatchedArchs = Archs
-
- if IDs[3] != ToolCode and IDs[3] != "*":
- return []
-
- result = []
- for arch in MatchedArchs:
- for target in MatchedTargets:
- line = "%s:%s_%s_%s_%s_FLAGS = %s" % (ToolChainFamily, target, IDs[1], arch, ToolCode, Value)
- result.append(line)
-
- return result
-
-def main():
-
- AutoGenSource = ""
- AutoGenHeader = ""
- AutoGenDeclaration = ""
- AutoGenModuleFolder = None
-
- workspace = ""
-
- if (options.workspace == None):
- print "ERROR: E0000: WORKSPACE not defined.\n Please set the WORKSPACE environment variable to the location of the EDK II install directory."
- sys.exit(1)
- else:
- workspace = options.workspace
- if (options.debug):
- print "Using Workspace:", workspace
-
- try:
- options.verbose +=1
- except:
- options.verbose = 1
- pass
-
-
- FdbPath = os.path.join(workspace, "Conf")
- FdbPath = os.path.join(FdbPath, "FrameworkDatabase.db")
- if os.path.exists(FdbPath):
- FdbFile = FdbPath
- else:
- print "ERROR: E0001: WORKSPACE does not contain the FrameworkDatabase File.\n Please run EdkSetup from the EDK II install directory.\n"
- sys.exit(1)
-
- Fdb = openDatabase(FdbFile)
- if (Fdb == 'None'):
- print "ERROR: E0002 Could not open the Framework Database file:", FdbFile
- sys.exit(1)
-
- if (options.debug):
- print "FrameworkDataBase.db file:", FdbFile
-
- #
- InitializeAutoGen(workspace, Fdb)
-
- if (options.filename):
- filename = options.filename
- if ((options.verbose > 1) | (options.autowrite)):
- print "Filename:", filename
- else:
- print "ERROR: E0001 - You must specify an input filename"
- sys.exit(1)
-
- if (options.outfile):
- outputFile = options.outfile
- else:
- outputFile = filename.replace('.msa', '.inf')
-
- if ((options.verbose > 2) or (options.debug)):
- print "Output Filename:", outputFile
-
- Msa = openMsa(filename)
- if (Msa == 'None'):
- ## Maybe developer think WORKSPACE macro is the root directory of file name
- ## So we will try to add WORKSPACE path into filename
- MsaFileName = ""
- MsaFileName = os.path.join(workspace, filename)
- Msa = openMsa(MsaFileName)
- if (Msa == 'None'):
- print "ERROR: E0002: Could not open the file:", filename
- sys.exit(1)
-
- AutoGenModuleFolder = os.path.dirname(filename)
-
- MsaHeader = "/ModuleSurfaceArea/MsaHeader/"
- MsaDefs = "/ModuleSurfaceArea/ModuleDefinitions/"
- BaseName = str(XmlElement(Msa, MsaDefs + "OutputFileBasename")).strip()
-
- if (len(BaseName) < 1):
- BaseName = str(XmlElement(Msa, MsaHeader + "BaseName")).strip()
- BaseName = re.sub(' ', '_', BaseName)
-
- GuidValue = str(XmlElement(Msa, MsaHeader + "GuidValue")).strip()
- VerString = str(XmlElement(Msa, MsaHeader + "Version")).strip()
- ModType = str(XmlElement(Msa, MsaHeader + "ModuleType")).strip()
- CopyRight = str(XmlElement(Msa, MsaHeader + "Copyright")).strip()
- Abstract = str(XmlElement(Msa, MsaHeader + "Abstract")).strip()
- Description = str(XmlElement(Msa, MsaHeader + "Description")).strip().replace(" ", " ").replace(" ", " ").replace(" ", " ")
- if not CopyRight.find("2007"):
- CopyRight = CopyRight.replace("2006", "2007")
- License = str(XmlElement(Msa, MsaHeader + "License")).strip().replace(" ", " ")
- MsaDefs = "/ModuleSurfaceArea/ModuleDefinitions/"
- BinModule = ""
- try:
- BinModule = str(XmlElement(Msa, MsaDefs + "BinaryModule")).strip()
- except:
- pass
-
- SupportedArchitectures = ""
- try:
- SupportedArchitectures = str(XmlElement(Msa, MsaDefs + "SupportedArchitectures")).strip()
- except:
- pass
-
- DefinesComments = []
- if (len(SupportedArchitectures) > 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
- DefinesComments.append("# VALID_ARCHITECTURES = " + SupportedArchitectures + "\n")
- DefinesComments.append("#\n")
-
- MsaExtern = "/ModuleSurfaceArea/Externs/"
- PcdIsDriver = ""
- try:
- PcdIsDriver = str(XmlElement(Msa, MsaExtern + "PcdIsDriver")).strip()
- except:
- pass
-
- SpecList = []
- List = []
- try:
- List = XmlList(Msa, MsaExtern + "Specification")
- except:
- pass
-
- if (len(List) > 0):
- for spec in List[:]:
- SpecList.insert(0, str(XmlElementData(spec)).strip())
-
- DriverModules = []
- LibraryModules = []
- Externlist = []
- Flag = (DefinesComments == [])
-
- # Data structure to insert autogen code
- AutoGenDriverModel = []
- AutoGenExitBootServices = []
- AutoGenVirtualAddressChanged = []
- AutoGenEntryPoint = ""
- AutoGenUnload = ""
- AutoGenGuid = []
- AutoGenLibClass = []
- AutoGenPackage = []
- AutoGenSourceFiles = []
- OldEntryPoint = ""
- OldUnload = ""
-
- try:
- Externlist = XmlList(Msa, MsaExtern + "Extern")
- except:
- pass
-
- if (len(Externlist) > 0):
- if (options.debug and options.verbose > 2):
- print "In Extern Parsing Routine"
- for extern in Externlist:
- EntryPoint = ""
- Unload = ""
- DBinding = ""
- CompName = ""
- Diag = ""
- Config = ""
- Constr = ""
- Destr = ""
- CallBack = ""
- lFlag = False
- AutoGenDriverModelItem = []
- try:
- EntryPoint = str(XmlElementData(extern.getElementsByTagName("ModuleEntryPoint")[0])).strip()
- AutoGenEntryPoint = EntryPoint
- #DriverModules.append(" %-30s = %s\n" % ("ENTRY_POINT" , EntryPoint))
- except:
- pass
-
- try:
- Unload = str(XmlElementData(extern.getElementsByTagName("ModuleUnloadImage")[0])).strip()
- AutoGenUnload = Unload
- DriverModules.append(" %-30s = %s\n" % ("UNLOAD_IMAGE", Unload))
- except:
- pass
-
- try:
- DBinding = str(XmlElementData(extern.getElementsByTagName("DriverBinding")[0])).strip()
- AutoGenDriverModelItem.append("&" + DBinding)
- DefinesComments.append("# %-29s = %-45s\n" % ("DRIVER_BINDING", DBinding))
- lFlag = True
- except:
- pass
-
- try:
- CompName = str(XmlElementData(extern.getElementsByTagName("ComponentName")[0])).strip()
- AutoGenDriverModelItem.append("&" + CompName)
- DefinesComments.append("# %-29s = %-45s\n" % ("COMPONENT_NAME", CompName))
- lFlag = True
- except:
- if lFlag:
- AutoGenDriverModelItem.append("NULL")
- pass
-
- try:
- Config = str(XmlElementData(extern.getElementsByTagName("DriverConfig")[0])).strip()
- AutoGenDriverModelItem.append("&" + Config)
- DefinesComments.append("# %-29s = %-45s\n" % ("DRIVER_CONFIG", Config))
- lFlag = True
- except:
- if lFlag:
- AutoGenDriverModelItem.append("NULL")
- pass
-
- try:
- Diag = str(XmlElementData(extern.getElementsByTagName("DriverDiag")[0])).strip()
- AutoGenDriverModelItem.append("&" + Diag)
- DefinesComments.append("# %-29s = %-45s\n" % ("DRIVER_DIAG", Diag))
- lFlag = True
- except:
- if lFlag:
- AutoGenDriverModelItem.append("NULL")
- pass
-
- if len(AutoGenDriverModelItem) > 0:
- AutoGenDriverModel.append(AutoGenDriverModelItem)
-
- try:
- Constr = str(XmlElementData(extern.getElementsByTagName("Constructor")[0])).strip()
- LibraryModules.append(" %-30s = %s\n" % ("CONSTRUCTOR", Constr))
- except:
- pass
-
- try:
- Destr = str(XmlElementData(extern.getElementsByTagName("Destructor")[0])).strip()
- LibraryModules.append(" %-30s = %s\n" % ("DESTRUCTOR", Destr))
- except:
- pass
-
- try:
- CallBack = str(XmlElement(extern, "Extern/SetVirtualAddressMapCallBack")).strip()
- if CallBack != "":
- AutoGenVirtualAddressChanged.append(CallBack)
- DefinesComments.append("# %-29s = %-45s\n" % ("VIRTUAL_ADDRESS_MAP_CALLBACK", CallBack))
- lFlag = True
- except:
-
- pass
-
- try:
- CallBack = str(XmlElement(extern, "Extern/ExitBootServicesCallBack")).strip()
- if CallBack != "":
- AutoGenExitBootServices.append(CallBack)
- DefinesComments.append("# %-29s = %-45s\n" % ("EXIT_BOOT_SERVICES_CALLBACK", CallBack))
- lFlag = True
- except:
- pass
-
-
- Flag = False
-
- """ Get the Module's custom build options """
- MBOlines = []
- MBO = "/ModuleSurfaceArea/ModuleBuildOptions/Options/Option"
- mboList = []
- try:
- mboList = XmlList(Msa, MBO)
- except:
- pass
-
- if (len(mboList) > 0):
- for Option in mboList:
- Targets = []
- Archs = []
-
- bt = ""
- try:
- bt = str(Option.getAttribute("BuildTargets"))
- except:
- pass
-
- if (len(bt) > 0):
- if (re.findall(" ", bt) > 0):
- Targets = bt.split()
- else:
- Targets.insert(0, bt)
- else:
- Targets.insert(0, "*")
-
- if (options.debug and options.verbose > 2):
- print "Targets", len(Targets), Targets
-
- pro = ""
- try:
- pro = Option.getAttribute("SupArchList")
- if (re.findall(" ", pro) > 0):
- Archs = pro.split()
- elif (re.findall(",", pro) > 0):
- Archs = pro.split(",")
- except:
- pass
-
- if (len(pro) == 0):
- Archs.insert(0, "*")
-
- if (options.debug and options.verbose > 2):
- print "Archs", len(Archs), Archs
-
- ToolCode = ""
- try:
- ToolCode = str(Option.getAttribute("ToolCode"))
- except:
- pass
-
- if (len(ToolCode) == 0):
- ToolCode="*"
-
- value = ""
- try:
- value = str(XmlElementData(Option))
- except:
- pass
- Tags = []
- TagName = ""
- try:
- TagName = str(Option.getAttribute("TagName"))
- except:
- pass
-
- if (len(TagName) > 0) :
- if (options.debug and options.verbose > 2):
- print "TagName was defined:", TagName
- Tags.insert(0, TagName)
- else:
- if (options.debug and options.verbose > 2):
- print "TagName was NOT defined!"
- TagName = "*"
- Tags.insert(0, "*")
-
- Family = ""
- try:
- Family = str(Option.getAttribute("ToolChainFamily")).strip()
- except:
- pass
-
- if (len(Family) > 0):
- if (options.debug):
- print "Searching tools_def.txt for Tool Tags that belong to:", Family, "family"
- TCF = []
- tdFile = ""
- tdPath = os.path.join(workspace, "Tools")
- tdPath = os.path.join(tdPath, "Conf")
- tdPath = os.path.join(tdPath, "tools_def.txt")
- tdPath = tdPath.replace("\\", "/")
- if os.path.exists(tdPath):
- tdFile = tdPath
- else:
- tdPath = os.path.join(workspace, "Conf")
- tdPath = os.path.join(tdPath, "tools_def.txt")
- if os.path.exists(tdPath):
- tdFile = tdPath
- else:
- print "ERROR: E0001: WORKSPACE does not contain the tools_def.txt File.\n Please run EdkSetup from the EDK II install directory.\n"
- sys.exit(1)
-
- if (options.debug and options.verbose > 2):
- print "Opening:", tdFile
-
- TagNameList = []
- tools_def = open(tdFile, "r")
- for tdline in tools_def:
- if "# " in tdline:
- continue
- if "FAMILY" in tdline:
- if (options.debug and options.verbose > 2):
- print "Testing for FAMILY:", Family, "in the line:", tdline.strip()
- if Family in tdline:
- enter = tdline.split("=")[0]
- if (options.debug and options.verbose > 2):
- print "Adding TNL:", tdline
- TagNameList.insert(0, enter)
- tools_def.close()
-
- if (options.debug and options.verbose > 2):
- print "TagNameList:", TagNameList
-
- olinesSet = {}
- for eline in TagNameList:
- if "# " in eline:
- continue
- if (options.debug and options.verbose > 2):
- print "ToolsDef entry:", eline
-
- olines = MatchOption(eline, Family, Targets, Archs, ToolCode, value)
- for oline in olines:
- olinesSet[oline] = 1
-
- for oline in olinesSet:
- if (options.debug and options.verbose > 2):
- print "Adding:", str(oline)
- MBOlines.insert(0, oline)
- else:
- for targ in Targets:
- for arch in Archs:
- oline = " %s_%s_%s_%s_FLAGS = %s" % (targ, Tags[0], arch, str(ToolCode), str(Value))
- if (options.debug and options.verbose > 2):
- print "Adding:", str(oline)
- MBOlines.insert(0, oline)
-
-
-
-
- for tag in Tags:
- for targ in Targets:
- for arch in Archs:
- oline = " " + str(targ) + "_" + str(tag) + "_" + str(arch) + "_" + str(ToolCode) + "_FLAGS = " + str(value)
- if (options.debug and options.verbose > 2):
- print "Adding:", str(oline)
- #MBOlines.insert(0, oline)
-
-
- """ Get the Library Class information """
- MsaLcDefs = "/ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass"
- LcDefList = []
- try:
- LcDefList = XmlList(Msa, MsaLcDefs)
- except:
- pass
-
- IamLibrary = []
- LibClassList = []
- LibClassListIa32 = []
- LibClassListX64 = []
- LibClassListIpf = []
- LibClassListEbc = []
-
-
- if (len(LcDefList) > 0):
- for Lc in LcDefList:
- lcKeyword = ""
- try:
- lcKeyword = str(XmlElementData(Lc.getElementsByTagName("Keyword")[0]))
- except:
- raise SyntaxError, "The MSA is not correctly formed, a Library Class Keyword Element is required"
-
- lcUsage = ""
- try:
- lcUsage = str(XmlAttribute(Lc, "Usage"))
- except:
- raise SyntaxError, "The MSA is not correctly formed, a Usage Attribute is required for all Library Class Elements"
-
- Archs = ""
- try:
- Archs = str(XmlAttribute(Lc, "SupArchList"))
- except:
- pass
-
- Archs = chkArch(Archs)
-
- if (options.debug and options.verbose > 2):
- print "Attr: ", lcUsage, lcKeyword, Archs
-
- if (options.convert):
- lcKeyword = AutoGenLibraryMapping.get(lcKeyword, lcKeyword)
-
- if re.findall("PRODUCED", lcUsage, re.IGNORECASE):
- try:
- lcSupModList = ""
-
- try:
- lcSupModList = str(XmlAttribute(Lc, "SupModuleList"))
- except:
- lcSupModList = ""
- pass
-
- lcLine = lcKeyword
- AutoGenLibClass.append(lcKeyword)
- if len(lcSupModList) > 0:
- lcLine = lcLine + "|" + lcSupModList
- IamLibrary.insert(0, lcLine)
- except:
- pass
- elif lcKeyword != "UefiDriverModelLib":
- AutoGenLibClass.append(lcKeyword)
- # This section handles the library classes that are CONSUMED
- if "IA32" in Archs:
- LibClassListIa32.insert(0, lcKeyword)
- if "X64" in Archs:
- LibClassListX64.insert(0, lcKeyword)
- if "IPF" in Archs:
- LibClassListIpf.insert(0, lcKeyword)
- if "EBC" in Archs:
- LibClassListEbc.insert(0, lcKeyword)
- if "ALL" in Archs:
- LibClassList.insert(0, lcKeyword)
- if len(AutoGenDriverModel) > 0 and "UefiLib" not in LibClassList:
- AutoGenLibClass.append("UefiLib")
- LibClassList.insert(0, "UefiLib")
-
- AutoGenDxsFiles = []
- """ Get the Source File list """
- SrcFilenames = []
- SrcFilenamesIa32 = []
- SrcFilenamesX64 = []
- SrcFilenamesIpf = []
- SrcFilenamesEbc = []
- SrcFiles = "/ModuleSurfaceArea/SourceFiles/Filename"
- SrcList = []
- try:
- SrcList = XmlList(Msa, SrcFiles)
- except:
- pass
-
- if (len(SrcList) > 0):
- for fn in SrcList:
- file = ""
- Archs = ""
-
- try:
- Archs = fn.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- file = str(XmlElementData(fn))
- except:
- pass
-
- if file.endswith(".dxs"):
- AutoGenDxsFiles.append((file, Archs))
- else:
- AutoGenSourceFiles.append(file)
- if "IA32" in Archs:
- SrcFilenamesIa32.insert(0, file)
- if "X64" in Archs:
- SrcFilenamesX64.insert(0, file)
- if "IPF" in Archs:
- SrcFilenamesIpf.insert(0, file)
- if "EBC" in Archs:
- SrcFilenamesEbc.insert(0, file)
- if "ALL" in Archs:
- SrcFilenames.insert(0, file)
-
- """ Package Dependency section """
- DbPkgList = "/FrameworkDatabase/PackageList/Filename"
- WorkspacePkgs = []
- try:
- WorkspacePkgs = XmlList(Fdb, DbPkgList)
- except:
- print "Could not tet the package data from the database"
- sys.exit(1)
-
- PkgDb = []
- HeaderLocations = []
-
- if (options.debug and options.verbose > 1):
- print "Found %s packages in the WORKSPACE" % (len(WorkspacePkgs))
-
- Dirs = []
- GuidDecls = []
- if (len(WorkspacePkgs) > 0):
- SpdHeader = "/PackageSurfaceArea/SpdHeader/"
- for Pkg in WorkspacePkgs[:]:
- PackageGuid = ""
- PackageVersion = ""
- file = ""
- try:
- file = str(XmlElementData(Pkg))
- except:
- pass
-
- if (options.debug and options.verbose > 2):
- print "PKG:", file
-
- if fnmatch.fnmatch(file, "*.dec"):
- print "parsing " + os.path.join(workspace, file)
- PackageGuid = ""
- PackageVersion = ""
- try:
- Lines = open(os.path.join(workspace, file)).readlines()
- except:
- print "Could not parse the Package file:", file
- sys.exit(1)
-
- for Line in Lines:
- Line = Line.split("#")[0]
- Items = Line.split("=")
- if len(Items) != 2:
- continue
-
- Key = Items[0].strip().upper()
- if Key == "PACKAGE_GUID":
- PackageGuid = Items[1].strip()
- if Key == "PACKAGE_VERSION":
- PackageVersion = Items[1].strip()
-
- else:
- Spd = openSpd(os.path.join(workspace, file))
- if (Spd == 'None'):
- print "Could not parse the Package file:", file
- sys.exit(1)
-
- path = os.path.split(file)[0]
- file = file.replace(".nspd", ".dec")
- file = file.replace(".spd", ".dec")
-
- try:
- PackageGuid = str(XmlElement(Spd, SpdHeader + "GuidValue"))
- except:
- pass
-
- try:
- PackageVersion = str(XmlElement(Spd, SpdHeader + "Version"))
- except:
- pass
-
- file = file + "|" + PackageGuid + "|" + PackageVersion
- PkgDb.insert(0, file)
-
- GuidEntries = []
- try:
- GuidEntries = XmlList(Spd, "/PackageSurfaceArea/GuidDeclarations/Entry")
- except:
- pass
-
- if (len(GuidEntries) > 0):
- for Entry in GuidEntries[:]:
- try:
- GuidDecls.append(str(XmlElementData(Entry.getElementsByTagName("C_Name")[0])).strip())
- except:
- pass
-
-
- pHdrs = []
- try:
- pHdrs = XmlList(Spd, "/PackageSurfaceArea/PackageHeaders/IncludePkgHeader")
- except:
- pass
-
- if (len(pHdrs) > 0):
- for Hdr in pHdrs[:]:
- try:
- ModTypeList = str(Hdr.getAttribute("ModuleType"))
- if (ModType in ModTypeList):
- HeaderName= str(XmlElementData(Hdr))[0]
- Dirs.insert(0, os.path.join(packagepath,str(os.path.split(HeaderName))))
- except:
- pass
-
- # Get the Guid:Header from the Packages
- SpdLcDec = "/PackageSurfaceArea/LibraryClassDeclarations/LibraryClass"
- lcList = []
- try:
- lcList = XmlList(Spd, SpdLcDec)
- except:
- pass
-
- if (len(lcList) > 0):
- for Lc in lcList[:]:
- Name = ""
- try:
- Name = Lc.getAttribute("Name")
- except:
- pass
-
- Header = ""
- try:
- Header = XmlElementData(Lc.getElementsByTagName("IncludeHeader")[0])
- except:
- pass
-
- if ((len(Name) > 0) and (len(Header) > 0)):
- line = Name + "|" + os.path.join(path, Header)
- if (options.debug and options.verbose > 2):
- print "Adding:", line
- HeaderLocations.insert(0, line)
-
- ishList = []
- try:
- IndStdHeaders = "/PackageSurfaceArea/IndustryStdIncludes/IndustryStdHeader"
- ishList = XmlList(Spd, IndStdHeaders)
- except:
- pass
-
- if (len(ishList) > 0):
- for Lc in ishList[:]:
- Name = ""
- try:
- Name = str(Lc.getAttribute("Name")).strip()
- except:
- pass
-
- Header = ""
- try:
- Header = str(XmlElementData(Lc.getElementsByTagName("IncludeHeader")[0])).strip()
- except:
- pass
-
- if ((len(Name) > 0) and (len(Header) > 0)):
- line = Name + "|" + os.path.join(path, Header)
- HeaderLocations.insert(0, str(line))
-
- PkgList = []
- PkgListIa32 = []
- PkgListX64 = []
- PkgListIpf = []
- PkgListEbc = []
- Pkgs = "/ModuleSurfaceArea/PackageDependencies/Package"
- pkgL = []
- try:
- pkgL = XmlList(Msa, Pkgs)
- except:
- pass
-
-
- gUnknownPkgGuid = {}
- if (len(pkgL) > 0):
- if (options.debug and options.verbose > 1):
- print "Found %s packages in the module" % (len(pkgL))
- for pkg in pkgL[:]:
- Archs = ""
- pkgGuid = ""
- pkgVer = ""
-
- FindPkgGuid = False
- try:
- Archs = pkg.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- pkgGuid = pkg.getAttribute("PackageGuid")
- except:
- pass
-
- if options.convert:
- if pkgGuid.lower() == "5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec":
- pkgGuid = "1E73767F-8F52-4603-AEB4-F29B510B6766"
- if pkgGuid.lower() == "68169ab0-d41b-4009-9060-292c253ac43d":
- pkgGuid = "BA0D78D6-2CAF-414b-BD4D-B6762A894288"
- AutoGenPackage.append(pkgGuid)
- try:
- pkgVer = pkg.getAttribute("PackageVersion")
- except:
- pass
-
- for PkgEntry in PkgDb[:]:
- if pkgGuid in PkgEntry:
- if len(pkgVer) > 0:
- if pkgVer in PkgEntry:
- FindPkgGuid = True
- if "IA32" in Archs:
- PkgListIa32.insert(0, PkgEntry.split("|")[0])
- if "X64" in Archs:
- PkgListX64.insert(0, PkgEntry.split("|")[0])
- if "IPF" in Archs:
- PkgListIpf.insert(0, PkgEntry.split("|")[0])
- if "EBC" in Archs:
- PkgListEbc.insert(0, PkgEntry.split("|")[0])
- if "ALL" in Archs:
- PkgList.insert(0, PkgEntry.split("|")[0])
- else:
- FindPkgGuid = True
- if "IA32" in Archs:
- PkgListIa32.insert(0, PkgEntry.split("|")[0])
- if "X64" in Archs:
- PkgListX64.insert(0, PkgEntry.split("|")[0])
- if "IPF" in Archs:
- PkgListIpf.insert(0, PkgEntry.split("|")[0])
- if "EBC" in Archs:
- PkgListEbc.insert(0, PkgEntry.split("|")[0])
- if "ALL" in Archs:
- PkgList.insert(0, PkgEntry.split("|")[0])
-
- if not FindPkgGuid:
- gUnknownPkgGuid[str(pkgGuid)] = 1
-
- for UnknownPkgGuid in gUnknownPkgGuid:
- print "Cannot resolve package dependency Guid:", UnknownPkgGuid
-
- PkgList.reverse()
- PkgListIa32.reverse()
- PkgListX64.reverse()
- PkgListIpf.reverse()
- PkgListEbc.reverse()
- if (options.debug):
- print "Package List:", PkgList
-
-
-
- """ Setup the Global GuidCName arrays that will hold data from various MSA locations """
- global GuidCName
- global GuidCNameIa32
- global GuidCNameX64
- global GuidCNameIPF
- global GuidCNameEBC
- GuidCName = []
- GuidCNameIa32 = []
- GuidCNameX64 = []
- GuidCNameIPF = []
- GuidCNameEBC = []
-
- """ Check for the GUIDs Element """
- Guids = "/ModuleSurfaceArea/Guids/GuidCNames"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- except:
- pass
-
- try:
- CName = str(XmlElementData(Guid.getElementsByTagName("GuidCName")[0]))
- if CName in GuidDecls:
- if (options.debug and options.verbose > 1):
- print "Guids Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- else:
- raise AssertionError, "Guid %s defined in %s is not declared in any package (.dec) file!" % (CName, filename)
- except:
- pass
-
- if (options.debug and options.verbose > 2):
- print "Guid C Name List:", GuidCName
-
- """ Check for Events """
- Guids = "/ModuleSurfaceArea/Events/CreateEvents/EventTypes"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- Type = str(XmlElementData(Guid.getElementsByTagName("EventType")[0]))
- Usage += " Create Event: " + Type
- except:
- pass
-
- try:
- CName = str(Guid.getAttribute("EventGuidCName"))
- if CName in GuidDecls:
- if (options.debug and options.verbose > 1):
- print "CreateEvent Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- else:
- if (len(DefinesComments) == 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
- DefinesComments.append("# Create Event Guid C Name: " + CName + " Event Type: " + Type + "\n")
- Flag = True
- except:
- pass
-
- if (Flag):
- DefinesComments.append("#\n")
- Flag = False
-
- Guids = "/ModuleSurfaceArea/Events/SignalEvents/EventTypes"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- Type = str(XmlElementData(Guid.getElementsByTagName("EventType")[0]))
- Usage += " Signal Event: " + Type
- except:
- pass
-
- try:
- CName = str(Guid.getAttribute("EventGuidCName"))
- if CName in GuidDecls:
- if (options.debug and options.verbose > 1):
- print "SignalEvent Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- else:
- if (len(DefinesComments) == 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
- DefinesComments.append("# Signal Event Guid C Name: " + CName + " Event Type: " + Type + "\n")
- Flag = True
- except:
- pass
-
- if (Flag):
- DefinesComments.append("#\n")
- Flag = False
-
- """ Check the HOB guids """
- Guids = "/ModuleSurfaceArea/Hobs/HobTypes"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- Type = str(XmlElementData(Guid.getElementsByTagName("HobType")[0]))
- Usage += " Hob: " + Type
- except:
- pass
-
- try:
- CName = str(Guid.getAttribute("HobGuidCName"))
- if CName in GuidDecls:
- if (options.debug and options.verbose > 1):
- print "Hob Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- else:
- if (len(DefinesComments) == 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
- DefinesComments.append("# HOB Guid C Name: " + CName + " Hob Type: " + Type + "\n")
- Flag = True
- except:
- if (len(DefinesComments) == 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
- DefinesComments.append("# HOB: " + Type + "\n")
- Flag = True
- pass
-
- if (Flag):
- DefinesComments.append("#\n")
- Flag = False
-
- """ Check for the SystemTables Element """
- Guids = "/ModuleSurfaceArea/SystemTables/SystemTableCNames"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- Usage += " System Table"
- except:
- pass
-
- try:
- CName = str(XmlElementData(Guid.getElementsByTagName("SystemTableCName")[0]))
- if (options.debug and options.verbose > 1):
- print "System Table Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- except:
- pass
-
- """ Check for the DataHubs Element """
- Guids = "/ModuleSurfaceArea/DataHubs/DataHubRecord"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- Usage += " Data Hub"
- except:
- pass
-
- try:
- CName = str(XmlElementData(Guid.getElementsByTagName("DataHubCName")[0]))
- if (options.debug and options.verbose > 1):
- print "Data Hub Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- except:
- pass
-
- """ Check for the HiiPackages Element """
- Guids = "/ModuleSurfaceArea/HiiPackages/HiiPackage"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- Usage += " HII Formset"
- except:
- pass
-
- try:
- CName = str(XmlElementData(Guid.getElementsByTagName("HiiCName")[0]))
- if (options.debug and options.verbose > 1):
- print "Hii Formset Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- except:
- pass
-
- """ Check for the Variables Element """
- Guids = "/ModuleSurfaceArea/Variables/Variable"
- GuidList = []
- try:
- GuidList = XmlList(Msa, Guids)
- except:
- pass
-
- if (len(GuidList) > 0):
- for Guid in GuidList:
- Archs = ""
- Usage = ""
- CName = ""
- VariableName = ""
-
- try:
- Archs = Guid.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Guid.getAttribute("Usage")
- except:
- pass
-
- try:
- VariableName = str(XmlElementData(Guid.getElementsByTagName("VariableName")[0]))
- CName = str(XmlElementData(Guid.getElementsByTagName("GuidC_Name")[0]))
-
- HexData = VariableName.strip().split()
- UniString = " L\""
- for dig in HexData[:]:
- UniString += str(unichr(eval(dig)))
- UniString += "\""
-
- Usage += UniString
-
- if CName in set(GuidDecls):
- removeDups(CName, GuidCName)
- removeDups(CName, GuidCNameIa32)
- removeDups(CName, GuidCNameX64)
- removeDups(CName, GuidCNameIPF)
- removeDups(CName, GuidCNameEBC)
-
- if (options.debug):
- print "Variable Adding Guid CName: %-45s # %s Archs: %s" % (CName, Usage, Archs)
- AddGuid(Archs, CName, Usage)
- AutoGenGuid.append(CName)
- else:
- if (len(DefinesComments) == 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
- DefinesComments.append("# Variable Guid C Name: " + CName + " Variable Name:" + UniString + "\n")
- Flag = True
- except:
- pass
-
- if (Flag):
- DefinesComments.append("#\n")
- Flag = False
-
- """ Check for the Protocol Element """
- Protocols = "/ModuleSurfaceArea/Protocols/Protocol"
- ProtocolList = []
- ProtocolCName = []
- ProtocolCNameIa32 = []
- ProtocolCNameX64 = []
- ProtocolCNameIPF = []
- ProtocolCNameEBC = []
-
- try:
- ProtocolList = XmlList(Msa, Protocols)
- except:
- pass
-
- if (len(ProtocolList) > 0):
- for Protocol in ProtocolList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Protocol.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Protocol.getAttribute("Usage")
- except:
- pass
-
- try:
- CName = str(XmlElementData(Protocol.getElementsByTagName("ProtocolCName")[0]))
- AutoGenGuid.append(CName)
- removeDups(CName, GuidCName)
- removeDups(CName, GuidCNameIa32)
- removeDups(CName, GuidCNameX64)
- removeDups(CName, GuidCNameIPF)
- removeDups(CName, GuidCNameEBC)
-
- if (options.debug and options.verbose > 1):
- print "Found %s - %s - %s " % (CName, Usage, str(len(Archs)))
-
- if "IA32" in Archs:
- ProtocolCNameIa32.insert(0, str(" %-45s # PROTOCOL %s" % (CName, Usage)))
- if "X64" in Archs:
- ProtocolCNameX64.insert(0, str(" %-45s # PROTOCOL %s" % (CName, Usage)))
- if "IPF" in Archs:
- ProtocolCNameIPF.insert(0, str(" %-45s # PROTOCOL %s" % (CName, Usage)))
- if "EBC" in Archs:
- ProtocolCNameEBC.insert(0, str(" %-45s # PROTOCOL %s" % (CName, Usage)))
- if "ALL" in Archs:
- ProtocolCName.insert(0, str(" %-45s # PROTOCOL %s" % (CName, Usage)))
- except:
- pass
-
-
- Protocols = "/ModuleSurfaceArea/Protocols/ProtocolNotify"
- try:
- ProtocolList = XmlList(Msa, Protocols)
- except:
- pass
-
- if (len(ProtocolList) > 0):
- for Protocol in ProtocolList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Protocol.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Protocol.getAttribute("Usage")
- except:
- pass
-
- try:
- CName = str(XmlElementData(Protocol.getElementsByTagName("ProtocolNotifyCName")[0]))
- AutoGenGuid.append(CName)
- removeDups(CName, GuidCName)
- removeDups(CName, GuidCNameIa32)
- removeDups(CName, GuidCNameX64)
- removeDups(CName, GuidCNameIPF)
- removeDups(CName, GuidCNameEBC)
-
- if "IA32" in Archs:
- ProtocolCNameIa32.insert(0, " %-45s # PROTOCOL_NOTIFY %s" % (CName, Usage))
- if "X64" in Archs:
- ProtocolCNameX64.insert(0, " %-45s # PROTOCOL_NOTIFY %s" % (CName, Usage))
- if "IPF" in Archs:
- ProtocolCNameIPF.insert(0, " %-45s # PROTOCOL_NOTIFY %s" % (CName, Usage))
- if "EBC" in Archs:
- ProtocolCNameEBC.insert(0, " %-45s # PROTOCOL_NOTIFY %s" % (CName, Usage))
- if "ALL" in Archs:
- ProtocolCName.insert(0, " %-45s # PROTOCOL_NOTIFY %s" % (CName, Usage))
- except:
- pass
-
- """ Check for the PPIs Element """
- PPIs = "/ModuleSurfaceArea/PPIs/Ppi"
- PPIsList = []
- PpiCName = []
- PpiCNameIa32 = []
- PpiCNameX64 = []
- PpiCNameIPF = []
- PpiCNameEBC = []
-
- try:
- PPIsList = XmlList(Msa, PPIs)
- except:
- pass
-
- if (len(PPIsList) > 0):
- for Ppi in PPIsList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = str(Ppi.getAttribute("SupArchList"))
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = str(Ppi.getAttribute("Usage"))
- except:
- pass
-
- try:
- CName = str(XmlElementData(Ppi.getElementsByTagName("PpiCName")[0])).strip()
- AutoGenGuid.append(CName)
- removeDups(CName, GuidCName)
- removeDups(CName, GuidCNameIa32)
- removeDups(CName, GuidCNameX64)
- removeDups(CName, GuidCNameIPF)
- removeDups(CName, GuidCNameEBC)
-
- if "IA32" in Archs:
- PpiCNameIa32.insert(0, " %-45s # PPI %s" % (CName, Usage))
- if "X64" in Archs:
- PpiCNameX64.insert(0, " %-45s # PPI %s" % (CName, Usage))
- if "IPF" in Archs:
- PpiCNameIPF.insert(0, " %-45s # PPI %s" % (CName, Usage))
- if "EBC" in Archs:
- PpiCNameEBC.insert(0, " %-45s # PPI %s" % (CName, Usage))
- if "ALL" in Archs:
- PpiCName.insert(0, " %-45s # PPI %s" % (CName, Usage))
- except:
- pass
-
-
- PPIs = "/ModuleSurfaceArea/PPIs/PpiNotify"
- try:
- PPIsList = XmlList(Msa, PPIs)
- except:
- pass
-
- if (len(PPIsList) > 0):
- for Ppi in PPIsList:
- Archs = ""
- Usage = ""
- CName = ""
-
- try:
- Archs = Ppi.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- Usage = Ppi.getAttribute("Usage")
- except:
- pass
-
- try:
- CName = str(XmlElementData(Ppi.getElementsByTagName("PpiNotifyCName")[0]))
- AutoGenGuid.append(CName)
- removeDups(CName, GuidCName)
- removeDups(CName, GuidCNameIa32)
- removeDups(CName, GuidCNameX64)
- removeDups(CName, GuidCNameIPF)
- removeDups(CName, GuidCNameEBC)
-
- if "IA32" in Archs:
- PpiCNameIa32.insert(0, " %-45s # PPI_NOTIFY %s" % (CName, Usage))
- if "X64" in Archs:
- PpiCNameX64.insert(0, " %-45s # PPI_NOTIFY %s" % (CName, Usage))
- if "IPF" in Archs:
- PpiCNameIPF.insert(0, " %-45s # PPI_NOTIFY %s" % (CName, Usage))
- if "EBC" in Archs:
- PpiCNameEBC.insert(0, " %-45s # PPI_NOTIFY %s" % (CName, Usage))
- if "ALL" in Archs:
- PpiCName.insert(0, " %-45s # PPI_NOTIFY %s" % (CName, Usage))
- except:
- pass
-
-
- """ Get the PCD entries now """
- PcdCoded = "/ModuleSurfaceArea/PcdCoded/PcdEntry"
- PcdList = []
- try:
- PcdList = XmlList(Msa, PcdCoded)
- except:
- pass
-
- (PcdFF, PcdFFIa32, PcdFFX64, PcdFFIpf, PcdFFEbc) = ([],[],[],[],[])
- (PcdFAB, PcdFABIa32, PcdFABX64, PcdFABIpf, PcdFABEbc) = ([],[],[],[],[])
- (PcdPIM, PcdPIMIa32, PcdPIMX64, PcdPIMIpf, PcdPIMEbc) = ([],[],[],[],[])
- (PcdDY, PcdDYIa32, PcdDYX64, PcdDYIpf, PcdDYEbc) = ([],[],[],[],[])
- (PcdDYE, PcdDYEIa32, PcdDYEX64, PcdDYEIpf, PcdDYEEbc) = ([],[],[],[],[])
-
- if (len(PcdList) > 0):
- for Pcd in PcdList:
- Archs = ""
- Usage = ""
- CName = ""
- DefVal = ""
-
- try:
- Archs = Pcd.getAttribute("SupArchList")
- except:
- pass
-
- Archs = chkArch(Archs)
-
- try:
- ItemType = Pcd.getAttribute("PcdItemType")
- except:
- pass
-
- try:
- CName = str(XmlElementData(Pcd.getElementsByTagName("C_Name")[0]))
- except:
- raise SyntaxError, "ERROR: MSA has a PCD with no Pcd C_Name defined"
-
- try:
- TSGC = str(XmlElementData(Pcd.getElementsByTagName("TokenSpaceGuidCName")[0]))
- except:
- pass
-
- try:
- DefVal = str(XmlElementData(Pcd.getElementsByTagName("DefaultValue")))
- except:
- pass
-
- if (len(DefVal) > 0):
- line = TSGC + "." + CName + "|" + DefVal
- else:
- line = TSGC + "." + CName
-
- if (ItemType == "FEATURE_FLAG"):
- if ("IA32" in Archs):
- PcdFFIa32.insert(0, line)
- if ("IPF" in Archs):
- PcdFFIpf.insert(0, line)
- if ("X64" in Archs):
- PcdFFX64.insert(0, line)
- if ("EBC" in Archs):
- PcdFFEbc.insert(0, line)
- if ("ALL" in Archs):
- PcdFF.insert(0, line)
- elif (ItemType == "FIXED_AT_BUILD"):
- if ("IA32" in Archs):
- PcdFABIa32.insert(0, line)
- if ("IPF" in Archs):
- PcdFABIpf.insert(0, line)
- if ("X64" in Archs):
- PcdFABX64.insert(0, line)
- if ("EBC" in Archs):
- PcdFABEbc.insert(0, line)
- if ("ALL" in Archs):
- PcdFAB.insert(0, line)
- elif (ItemType == "PATCHABLE_IN_MODULE"):
- if ("IA32" in Archs):
- PcdPIMIa32.insert(0, line)
- if ("IPF" in Archs):
- PcdPIMIpf.insert(0, line)
- if ("X64" in Archs):
- PcdPIMX64.insert(0, line)
- if ("EBC" in Archs):
- PcdPIMEbc.insert(0, line)
- if ("ALL" in Archs):
- PcdFAB.insert(0, line)
- elif (ItemType == "DYNAMIC_EX"):
- if ("IA32" in Archs):
- PcdDYEIa32.insert(0, line)
- if ("IPF" in Archs):
- PcdDYEIpf.insert(0, line)
- if ("X64" in Archs):
- PcdDYEX64.insert(0, line)
- if ("EBC" in Archs):
- PcdDYEEbc.insert(0, line)
- if ("ALL" in Archs):
- PcdDYE.insert(0, line)
- else:
- if ("IA32" in Archs):
- PcdDYIa32.insert(0, line)
- if ("IPF" in Archs):
- PcdDYIpf.insert(0, line)
- if ("X64" in Archs):
- PcdDYX64.insert(0, line)
- if ("EBC" in Archs):
- PcdDYEbc.insert(0, line)
- if ("ALL" in Archs):
- PcdDY.insert(0, line)
-
- """ User Extensions Section """
- UEList = []
- UESectionList = []
- try:
- UESectionList = XmlList(Msa, "/ModuleSurfaceArea/UserExtensions")
- except:
- pass
-
- if (len(UESectionList) > 0):
- for UE in UESectionList[:]:
- UserId = ""
- Identifier = ""
- Value = ""
-
- try:
- UserId = str(UE.getAttribute("UserID"))
- except:
- raise SyntaxError, "ERROR: Malformed MSA, No UserID Specified in UserExtensions element"
-
- try:
- Identifier = str(UE.getAttribute("Identifier"))
- except:
- raise SyntaxError, "ERROR: Malformed MSA, No Identifier Specified in UserExtensions element"
-
- if (options.debug):
- print "FOUND A UE Element", UserId, Identifier
-
- try:
- Value = str(XmlElementData(UE))
- except:
- pass
-
- Entry = [UserId, Identifier, Value]
- UEList.insert(0, Entry)
-
-
-
- if (len(Externlist) > 0):
- AutoGenSource = ""
- AutoGenDefinitionSource = ""
- AutoGenEntryPointSource = ""
- AutoGenUnloadSource = ""
- if (len(AutoGenDriverModel) > 0):
- AutoGenCode = AddDriverBindingProtocolStatement(AutoGenDriverModel)
- AutoGenEntryPointSource += AutoGenCode[0]
- AutoGenUnloadSource += AutoGenCode[1]
- AutoGenDeclaration += AutoGenCode[3]
-
-
- if (len(AutoGenExitBootServices) > 0):
- print "[Warning] Please manually add Create Event statement for Exit Boot Service Event!"
- if options.event:
- AutoGenCode = AddBootServiceEventStatement(AutoGenExitBootServices)
- AutoGenEntryPointSource += AutoGenCode[0]
- AutoGenUnloadSource += AutoGenCode[1]
- AutoGenDefinitionSource += AutoGenCode[2]
- AutoGenDeclaration += AutoGenCode[3]
-
- if (len(AutoGenVirtualAddressChanged) > 0):
- print "[Warning] Please manually add Create Event statement for Virtual Address Change Event!"
- if options.event:
- AutoGenCode = AddVirtualAddressEventStatement(AutoGenVirtualAddressChanged)
- AutoGenEntryPointSource += AutoGenCode[0]
- AutoGenUnloadSource += AutoGenCode[1]
- AutoGenDefinitionSource += AutoGenCode[2]
- AutoGenDeclaration += AutoGenCode[3]
-
- if AutoGenEntryPointSource != "":
- OldEntryPoint = AutoGenEntryPoint
- AutoGenCode = AddNewEntryPointContentsStatement(BaseName, AutoGenEntryPoint, AutoGenEntryPointSource)
- AutoGenEntryPoint = AutoGenCode[0]
- AutoGenEntryPointSource = AutoGenCode[1]
- AutoGenDeclaration += AutoGenCode[2]
-
-
- if AutoGenEntryPoint != "":
- DriverModules.insert(0, " %-30s = %s\n" % ("ENTRY_POINT" , AutoGenEntryPoint))
-
- AutoGenSource = AutoGenDefinitionSource + AutoGenEntryPointSource + AutoGenUnloadSource
-
- if (lFlag):
- DefinesComments.append("#\n")
-
- if (Flag and len(DefinesComments) > 0):
- DefinesComments.insert(0, "\n#\n# The following information is for reference only and not required by the build tools.\n#\n")
-
- if (options.debug and options.verbose > 2):
- if (len(DriverModules) > 0):
- print DriverModules
- if (len(LibraryModules) > 0):
- print LibraryModules
- if (len(DefinesComments) > 0):
- print DefinesComments
-
- Depex = []
- DepexIa32 = []
- DepexX64 = []
- DepexIpf = []
- DepexEbc = []
-
- for DxsFile, Archs in AutoGenDxsFiles:
- fileContents = openSourceFile(AutoGenModuleFolder, DxsFile)
- Contents, Unresolved = TranslateDpxSection(fileContents)
- if Contents == "":
- print "[warning] Cannot read dxs expression"
- else:
- if (len(Unresolved) > 0):
- print "[warning] Guid Macro(s): %s cannot find corresponding cNames. Please resolve it in [depex] section in extened inf" % ",".join(Unresolved)
-
- if ("IA32" in Archs):
- DepexIa32.insert(0, Contents)
- if ("IPF" in Archs):
- DepexIpf.insert(0, Contents)
- if ("X64" in Archs):
- DepexX64.insert(0, Contents)
- if ("EBC" in Archs):
- DepexEbc.insert(0, Contents)
- if ("ALL" in Archs):
- Depex.insert(0, Contents)
-
- AutoGenSourceHeaderFormat = "/**@file\n %s\n\n %s\n %s\n %s\n**/\n\n%s"
- includeCommonHeaderFileStatement = "#include \"%s\"" % commonHeaderFilename
-
- AutoGenHeader += AddSystemIncludeStatement(ModType, AutoGenPackage)
- AutoGenHeader += AddGuidStatement(AutoGenGuid)
- AutoGenHeader += AddLibraryClassStatement(AutoGenLibClass)
-
- if options.manual:
- saveSourceFile(AutoGenModuleFolder, "CommonHeader.txt", AutoGenHeader)
- else:
-
- commonHeaderFilename2 = re.sub("(?=[^a-z])", "_", commonHeaderFilename)
- commonHeaderFilename2 = "_" + commonHeaderFilename2.replace(".", "").upper() + "_"
- briefDiscription = "Common header file shared by all source files."
- detailedDiscription = "This file includes package header files, library classes and protocol, PPI & GUID definitions.\n"
- AutoGenHeader += AutoGenDeclaration
- AutoGenHeader = "#ifndef %s\n#define %s\n\n\n%s\n#endif\n" % (commonHeaderFilename2, commonHeaderFilename2, AutoGenHeader)
- AutoGenHeader = AutoGenSourceHeaderFormat % (briefDiscription, detailedDiscription, CopyRight, License, AutoGenHeader)
- saveSourceFile(AutoGenModuleFolder, commonHeaderFilename, AutoGenHeader)
- SrcFilenames.append(commonHeaderFilename)
-
- for source in AutoGenSourceFiles:
- extension = os.path.splitext(source)[1]
- if extension == ".c":
- sourceContents = openSourceFile(AutoGenModuleFolder, source)
- sourceContents = AddCommonInclusionStatement(sourceContents, includeCommonHeaderFileStatement)
- saveSourceFile(AutoGenModuleFolder, source, sourceContents)
-
-
- if AutoGenSource != "":
- briefDiscription = "Entry Point Source file."
- detailedDiscription = "This file contains the user entry point \n"
- AutoGenSource = AutoGenSourceHeaderFormat % (briefDiscription, detailedDiscription, CopyRight, License, AutoGenSource)
- AutoGenSource = AddCommonInclusionStatement(AutoGenSource, includeCommonHeaderFileStatement)
-
- saveSourceFile(AutoGenModuleFolder, entryPointFilename, AutoGenSource)
- SrcFilenames.append(entryPointFilename)
-
-
-
-
- # DONE Getting data, now output it in INF format.
- Msa.unlink()
- Fdb.unlink()
- Output = []
-
- """ Print the converted data format """
- head = "#/** @file\n"
- head += "# " + str(Abstract) + "\n#\n"
- head += "# " + str(Description).strip().replace("\n", "\n# ") + "\n"
- head += "# " + str(CopyRight) + "\n#\n"
- head += "# " + str(License).replace("\n", "\n# ").replace(" ", " ").strip() + "\n#\n"
- head += "#\n#**/\n"
-
- Output.append(head)
- if (options.debug):
- print head
-
-## Defines = "\n" + "#"*80+ "\n#\n"
-## if (BinModule != "false"):
-## Defines += "# Defines Section - statements that will be processed to generate a binary image.\n"
-## else:
-## Defines += "# Defines Section - statements that will be processed to create a Makefile.\n"
-## Defines += "#\n" + "#"*80 + "\n"
-
- Defines = "\n"
- Defines += "[Defines]\n"
- Defines += " %-30s = %s\n" % ("INF_VERSION", "0x00010005")
- Defines += " %-30s = %s\n" % ("BASE_NAME", BaseName)
- Defines += " %-30s = %s\n" % ("FILE_GUID", GuidValue)
- Defines += " %-30s = %s\n" % ("MODULE_TYPE", ModType)
- Defines += " %-30s = %s\n" % ("VERSION_STRING", VerString)
-
- if (len(PcdIsDriver) > 0):
- Defines += " %-30s = %s\n" % ("PCD_DRIVER", PcdIsDriver)
-
- if (len(IamLibrary) > 0):
- lcstr = ""
- for lc in IamLibrary[:]:
- lcstr += lc + " "
- Defines += " %-30s = %s" % ("LIBRARY_CLASS", lcstr)
- Defines += "\n"
-
- if (len(SpecList) > 0):
- for spec in SpecList[:]:
- (specname, specval) = spec.split()
- Defines += " %-30s = %s\n" % (specname, specval)
- Defines += "\n"
-
- if (len(DriverModules) > 0):
- for line in DriverModules[:]:
- Defines += line
-
- if (len(LibraryModules) > 0):
- for line in LibraryModules[:]:
- Defines += line
-
- if (len(DefinesComments) > 0):
- for line in DefinesComments[:]:
- Defines += line
-
- Output.append(Defines)
-
- if (options.debug):
- print Defines
-
- if (BinModule != "false"):
- """ Binary Module, so sources are really binaries. """
-## Sources = "\n" + "#"*80 + "\n#\n"
-## Sources += "# Binaries Section - list of binary files that are required for the build\n# to succeed.\n"
-## Sources += "#\n" + "#"*80 + "\n\n"
- Sources = "\n"
- if ModType == "UEFI_APPLICATION":
- FileType = "UEFI_APP"
- if options.verbose > 0:
- print "WARNING: Binary Module: %s is assuming UEFI_APPLICATION file type." % (options.filename)
- else:
- FileType = "FV"
- if options.verbose > 0:
- print "WARNING: Binary Module: %s is assuming FV file type." % (options.filename)
-
- if (len(SrcFilenames) > 0):
- Sources += "[Binaries.common]\n"
- for file in SrcFilenames[:]:
- file = file.replace("\\", "/")
- Sources += " " + FileType + "|" + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesIa32) > 0):
- Sources += "[Binaries.Ia32]\n"
- for file in SrcFilenamesIa32[:]:
- file = file.replace("\\", "/")
- Sources += " " + FileType + "|" + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesX64) > 0):
- Sources += "[Binaries.X64]\n"
- for file in SrcFilenamesX64[:]:
- file = file.replace("\\", "/")
- Sources += " " + FileType + "|" + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesIpf) > 0):
- Sources += "[Binaries.IPF]\n"
- for file in SrcFilenamesIpf[:]:
- file = file.replace("\\", "/")
- Sources += " " + FileType + "|" + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesEbc) > 0):
- Sources += "[Binaries.EBC]\n"
- for file in SrcFilenamesEbc[:]:
- file = file.replace("\\", "/")
- Sources += " " + FileType + "|" + file + "\n"
- Sources += "\n"
-
- Output.append(Sources)
- if (options.debug):
- print Sources
- else:
-## Sources = "\n" + "#"*80 + "\n#\n"
-## Sources += "# Sources Section - list of files that are required for the build to succeed.\n"
-## Sources += "#\n" + "#"*80 + "\n\n"
- Sources = "\n"
- if (len(SrcFilenames) > 0):
- Sources += "[Sources.common]\n"
- for file in SrcFilenames[:]:
- Sources += " " + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesIa32) > 0):
- Sources += "[Sources.Ia32]\n"
- for file in SrcFilenamesIa32[:]:
- Sources += " " + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesX64) > 0):
- Sources += "[Sources.X64]\n"
- for file in SrcFilenamesX64[:]:
- Sources += " " + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesIpf) > 0):
- Sources += "[Sources.IPF]\n"
- for file in SrcFilenamesIpf[:]:
- Sources += " " + file + "\n"
- Sources += "\n"
-
- if (len(SrcFilenamesEbc) > 0):
- Sources += "[Sources.EBC]\n"
- for file in SrcFilenamesEbc[:]:
- Sources += " " + file + "\n"
- Sources += "\n"
-
- Output.append(Sources)
- if (options.debug):
- print Sources
-
-
- includeLine = ""
- if ((len(HeaderLocations) > 0) or (len(Dirs) > 0)):
- allLcs = set(LibClassList + LibClassListIa32 + LibClassListX64 + LibClassListIpf + LibClassListEbc + Dirs)
- Lines = []
- for line in HeaderLocations[:]:
- for Lc in allLcs:
- (keyword, header) = line.split("|")
- if Lc in keyword:
- if (options.debug):
- print "FOUND", Lc, "in", keyword, "header", header
- path = "$(WORKSPACE)/" + os.path.split(header)[0]
- Lines.insert(0, path.strip())
- Includes = ""
-## Includes = "\n" + "#"*80 + "\n#\n"
-## Includes += "# Includes Section - list of Include locations that are required for\n"
-## Includes += "# this module.\n"
-## Includes += "#\n" + "#"*80 + "\n\n"
-## Includes += "[Includes]\n"
-## includeLines = []
-## includeLines = set(Lines)
-## if (options.debug):
-## print "There are", len(includeLines), "entries"
-## for Line in includeLines:
-## Includes += " " + str(Line).strip().replace("\\", "/") + "\n"
-
- Output.append(Includes)
- if (options.debug):
- print Includes
-
-
-
- if ((len(PkgList) + len(PkgListIa32) + len(PkgListX64) + len(PkgListIpf) + len(PkgListEbc)) > 0):
- """ We do this if and only if we have Package Dependencies """
-## PackageDepends = "\n" + "#"*80 + "\n#\n"
-## PackageDepends += "# Package Dependency Section - list of Package files that are required for\n"
-## PackageDepends += "# this module.\n"
-## PackageDepends += "#\n" + "#"*80 + "\n\n"
- PackageDepends = "\n"
- if (len(PkgList) > 0):
- PackageDepends += "[Packages]\n"
- for lc in PkgList[:]:
- lc = lc.replace("\\", "/")
- PackageDepends += " " + lc + "\n"
- PackageDepends += "\n"
-
- if (len(PkgListIa32) > 0):
- PackageDepends += "[Packages.IA32]\n"
- for lc in PkgListIa32[:]:
- lc = lc.replace("\\", "/")
- PackageDepends += " " + lc + "\n"
- PackageDepends += "\n"
-
- if (len(PkgListX64) > 0):
- PackageDepends += "[Packages.X64]\n"
- for lc in PkgListX64[:]:
- lc = lc.replace("\\", "/")
- PackageDepends += " " + lc + "\n"
- PackageDepends += "\n"
-
- if (len(PkgListIpf) > 0):
- PackageDepends += "[Packages.IPF]\n"
- for lc in PkgListIpf[:]:
- lc = lc.replace("\\", "/")
- PackageDepends += " " + lc + "\n"
- PackageDepends += "\n"
-
- if (len(PkgListEbc) > 0):
- PackageDepends += "[Packages.EBC]\n"
- for lc in PkgListEbc[:]:
- lc = lc.replace("\\", "/")
- PackageDepends += " " + lc + "\n"
- PackageDepends += "\n"
-
- Output.append(PackageDepends)
- if (options.debug):
- print PackageDepends
-
- if ((len(LibClassList) + len(LibClassListIa32) + len(LibClassListX64) + len(LibClassListIpf) + len(LibClassListEbc)) > 0):
-## LibraryClasses = "\n" + "#"*80 + "\n#\n"
-## LibraryClasses += "# Library Class Section - list of Library Classes that are required for\n"
-## LibraryClasses += "# this module.\n"
-## LibraryClasses += "#\n" + "#"*80 + "\n\n"
-
- LibraryClasses = "\n"
- if (len(LibClassList) > 0):
- LibraryClasses += "[LibraryClasses]\n"
- for lc in LibClassList[:]:
- LibraryClasses += " " + lc + "\n"
- LibraryClasses += "\n"
-
- if (len(LibClassListIa32) > 0):
- LibraryClasses += "[LibraryClasses.IA32]\n"
- for lc in LibClassListIa32[:]:
- LibraryClasses += " " + lc + "\n"
- LibraryClasses += "\n"
-
- if (len(LibClassListX64) > 0):
- LibraryClasses += "[LibraryClasses.X64]\n"
- for lc in LibClassListX64[:]:
- LibraryClasses += " " + lc + "\n"
- LibraryClasses += "\n"
-
- if (len(LibClassListIpf) > 0):
- LibraryClasses += "[LibraryClasses.IPF]\n"
- for lc in LibClassListIpf[:]:
- LibraryClasses += " " + lc + "\n"
- LibraryClasses += "\n"
-
- if (len(LibClassListEbc) > 0):
- LibraryClasses += "[LibraryClasses.EBC]\n"
- for lc in LibClassListEbc[:]:
- LibraryClasses += " " + lc + "\n"
- LibraryClasses += "\n"
-
- Output.append(LibraryClasses)
- if (options.debug):
- print LibraryClasses
-
- # Print the Guids sections
- if (len(GuidCName) + len(GuidCNameIa32) + len(GuidCNameIPF) + len(GuidCNameX64) + len(GuidCNameEBC)) > 0:
-## GuidSection = "\n" + "#"*80 + "\n#\n"
-## GuidSection += "# Guid C Name Section - list of Guids that this module uses or produces.\n"
-## GuidSection += "#\n" + "#"*80 + "\n\n"
- GuidSection = "\n"
- if (len(GuidCName) > 0):
- GuidSection += "[Guids]\n"
- for Guid in GuidCName[:]:
- GuidSection += Guid + "\n"
- GuidSection += "\n"
-
- if (len(GuidCNameIa32) > 0):
- GuidSection += "[Guids.IA32]\n"
- for Guid in GuidCNameIa32[:]:
- GuidSection += Guid + "\n"
- GuidSection += "\n"
-
- if (len(GuidCNameX64) > 0):
- GuidSection += "[Guids.X64]\n"
- for Guid in GuidCNameX64[:]:
- GuidSection += Guid + "\n"
- GuidSection += "\n"
-
- if (len(GuidCNameIPF) > 0):
- GuidSection += "[Guids.IPF]\n"
- for Guid in GuidCNameIPF[:]:
- GuidSection += Guid + "\n"
- GuidSection += "\n"
-
- if (len(GuidCNameEBC) > 0):
- GuidSection += "[Guids.EBC]\n"
- for Guid in GuidCNameEBC[:]:
- GuidSection += Guid + "\n"
- GuidSection += "\n"
-
- Output.append(GuidSection)
- if (options.debug and options.verbose > 1):
- print GuidSection
-
- # Print the Protocol sections
- if (len(ProtocolCName) + len(ProtocolCNameIa32) + len(ProtocolCNameIPF) + len(ProtocolCNameX64) + len(ProtocolCNameEBC)) > 0:
-## ProtocolsSection = "\n" + "#"*80 + "\n#\n"
-## ProtocolsSection += "# Protocol C Name Section - list of Protocol and Protocol Notify C Names\n"
-## ProtocolsSection += "# that this module uses or produces.\n"
-## ProtocolsSection += "#\n" + "#"*80 + "\n\n"
-
- ProtocolsSection = "\n"
- if (len(ProtocolCName) > 0):
- ProtocolsSection += "[Protocols]\n"
- for Guid in ProtocolCName[:]:
- ProtocolsSection += Guid + "\n"
- ProtocolsSection += "\n"
-
- if (len(ProtocolCNameIa32) > 0):
- ProtocolsSection += "[Protocols.IA32]\n"
- for Guid in ProtocolCNameIa32[:]:
- ProtocolsSection += Guid + "\n"
- ProtocolsSection += "\n"
-
- if (len(ProtocolCNameX64) > 0):
- ProtocolsSection += "[Protocols.X64]\n"
- for Guid in ProtocolCNameX64[:]:
- ProtocolsSection += Guid + "\n"
- ProtocolsSection += "\n"
-
- if (len(ProtocolCNameIPF) > 0):
- ProtocolsSection += "[Protocols.IPF]\n"
- for Guid in ProtocolCNameIPF[:]:
- ProtocolsSection += Guid + "\n"
- ProtocolsSection += "\n"
-
- if (len(ProtocolCNameEBC) > 0):
- ProtocolsSection += "[Protocols.EBC]\n"
- for Guid in ProtocolCNameEBC[:]:
- ProtocolsSection += Guid + "\n"
- ProtocolsSection += "\n"
-
- Output.append(ProtocolsSection)
- if (options.debug):
- print ProtocolsSection
-
- # Print the PPI sections
- if (len(PpiCName) + len(PpiCNameIa32) + len(PpiCNameIPF) + len(PpiCNameX64) + len(PpiCNameEBC)) > 0:
-## PpiSection = "\n" + "#"*80 + "\n#\n"
-## PpiSection += "# PPI C Name Section - list of PPI and PPI Notify C Names that this module\n"
-## PpiSection += "# uses or produces.\n"
-## PpiSection += "#\n" + "#"*80 + "\n\n"
-
- PpiSection = "\n"
- if (len(PpiCName) > 0):
- PpiSection += "[Ppis]\n"
- for Guid in PpiCName[:]:
- PpiSection += Guid + "\n"
- PpiSection += "\n"
-
- if (len(PpiCNameIa32) > 0):
- PpiSection += "[Ppis.IA32]\n"
- for Guid in PpiCNameIa32[:]:
- PpiSection += Guid + "\n"
- PpiSection += "\n"
-
- if (len(PpiCNameX64) > 0):
- PpiSection += "[Ppis.X64]\n"
- for Guid in PpiCNameX64[:]:
- PpiSection += Guid + "\n"
- PpiSection += "\n"
-
- if (len(PpiCNameIPF) > 0):
- PpiSection += "[Ppis.IPF]\n"
- for Guid in PpiCNameIPF[:]:
- PpiSection += Guid + "\n"
- PpiSection += "\n"
-
- if (len(PpiCNameEBC) > 0):
- PpiSection += "[Ppis.EBC]\n"
- for Guid in PpiCNameEBC[:]:
- PpiSection += Guid + "\n"
- PpiSection += "\n"
-
- Output.append(PpiSection)
- if (options.debug):
- print PpiSection
-
- # Print the PCD sections
- if ((len(PcdFF)+len(PcdFFIa32)+len(PcdFFX64)+len(PcdFFIpf)+len(PcdFFEbc)) > 0):
-## FeatureFlagSection = "\n" + "#"*80 + "\n#\n"
-## FeatureFlagSection += "# Pcd FEATURE_FLAG - list of PCDs that this module is coded for.\n"
-## FeatureFlagSection += "#\n" + "#"*80 + "\n\n"
-
- FeatureFlagSection = "\n"
- if (len(PcdFF) > 0):
- FeatureFlagSection += "[FeaturePcd.common]\n"
- for Entry in PcdFF[:]:
- FeatureFlagSection += " " + Entry + "\n"
- FeatureFlagSection += "\n"
- if (len(PcdFFIa32) > 0):
- FeatureFlagSection += "[FeaturePcd.IA32]\n"
- for Entry in PcdFFIa32[:]:
- FeatureFlagSection += " " + Entry + "\n"
- FeatureFlagSection += "\n"
- if (len(PcdFFX64) > 0):
- FeatureFlagSection += "[FeaturePcd.X64]\n"
- for Entry in PcdFFX64[:]:
- FeatureFlagSection += " " + Entry + "\n"
- FeatureFlagSection += "\n"
- if (len(PcdFFIpf) > 0):
- FeatureFlagSection += "[PcdsFeatureFlag.IPF]\n"
- for Entry in PcdFFIpf[:]:
- FeatureFlagSection += " " + Entry + "\n"
- FeatureFlagSection += "\n"
- if (len(PcdFFEbc) > 0):
- FeatureFlagSection += "[FeaturePcd.EBC]\n"
- for Entry in PcdFFEbc[:]:
- FeatureFlagSection += " " + Entry + "\n"
- FeatureFlagSection += "\n"
-
- Output.append(FeatureFlagSection)
- if (options.debug):
- print FeatureFlagSection
-
- if ((len(PcdFAB)+len(PcdFABIa32)+len(PcdFABX64)+len(PcdFABIpf)+len(PcdFABEbc)) > 0):
-## FixedAtBuildSection = "\n" + "#"*80 + "\n#\n"
-## FixedAtBuildSection += "# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.\n"
-## FixedAtBuildSection += "#\n" + "#"*80 + "\n\n"
-
- FixedAtBuildSection = "\n"
- if (len(PcdFAB) > 0):
- FixedAtBuildSection += "[FixedPcd.common]\n"
- for Entry in PcdFAB[:]:
- FixedAtBuildSection += " " + Entry + "\n"
- FixedAtBuildSection += "\n"
- if (len(PcdFABIa32) > 0):
- FixedAtBuildSection += "[FixedPcd.IA32]\n"
- for Entry in PcdFABIa32[:]:
- FixedAtBuildSection += " " + Entry + "\n"
- FixedAtBuildSection += "\n"
- if (len(PcdFABX64) > 0):
- FixedAtBuildSection += "[FixedPcd.X64]\n"
- for Entry in PcdFABX64[:]:
- FixedAtBuildSection += " " + Entry + "\n"
- FixedAtBuildSection += "\n"
- if (len(PcdFABIpf) > 0):
- FixedAtBuildSection += "[FixedPcd.IPF]\n"
- for Entry in PcdFABIpf[:]:
- FixedAtBuildSection += " " + Entry + "\n"
- FixedAtBuildSection += "\n"
- if (len(PcdFABEbc) > 0):
- FixedAtBuildSection += "[FixedPcd.EBC]\n"
- for Entry in PcdFABEbc[:]:
- FixedAtBuildSection += " " + Entry + "\n"
- FixedAtBuildSection += "\n"
-
- Output.append(FixedAtBuildSection)
- if (options.debug):
- print FixedAtBuildSection
-
- if ((len(PcdPIM)+len(PcdPIMIa32)+len(PcdPIMX64)+len(PcdPIMIpf)+len(PcdPIMEbc)) > 0):
-## PatchableInModuleSection = "\n" + "#"*80 + "\n#\n"
-## PatchableInModuleSection += "# Pcd PATCHABLE_IN_MODULE - list of PCDs that this module is coded for.\n"
-## PatchableInModuleSection += "#\n" + "#"*80 + "\n\n"
-
- PatchableInModuleSection = "\n"
- if (len(PcdPIM) > 0):
- PatchableInModuleSection += "[PatchPcd.common]\n"
- for Entry in PcdPIM[:]:
- PatchableInModuleSection += " " + Entry + "\n"
- PatchableInModuleSection += "\n"
- if (len(PcdPIMIa32) > 0):
- PatchableInModuleSection += "[PatchPcd.IA32]\n"
- for Entry in PcdPIMIa32[:]:
- PatchableInModuleSection += " " + Entry + "\n"
- PatchableInModuleSection += "\n"
- if (len(PcdPIMX64) > 0):
- PatchableInModuleSection += "[PatchPcd.X64]\n"
- for Entry in PcdPIMX64[:]:
- PatchableInModuleSection += " " + Entry + "\n"
- PatchableInModuleSection += "\n"
- if (len(PcdPIMIpf) > 0):
- PatchableInModuleSection += "[PatchPcd.IPF]\n"
- for Entry in PcdPIMIpf[:]:
- PatchableInModuleSection += " " + Entry + "\n"
- PatchableInModuleSection += "\n"
- if (len(PcdPIMEbc) > 0):
- PatchableInModuleSection += "[PatchPcd.EBC]\n"
- for Entry in PcdPIMEbc[:]:
- PatchableInModuleSection += " " + Entry + "\n"
- PatchableInModuleSection += "\n"
-
- Output.append(PatchableInModuleSection)
- if (options.debug):
- print PatchableInModuleSection
-
- if ((len(PcdDYE)+len(PcdDYEIa32)+len(PcdDYEX64)+len(PcdDYEIpf)+len(PcdDYEEbc)) > 0):
-## DynamicExSection = "\n" + "#"*80 + "\n#\n"
-## DynamicExSection += "# Pcd DYNAMIC_EX - list of PCDs that this module is coded for.\n"
-## DynamicExSection += "#\n" + "#"*80 + "\n\n"
-
- DynamicExSection = "\n"
- if (len(PcdDYE) > 0):
- DynamicExSection += "[PcdEx.common]\n"
- for Entry in PcdDYE[:]:
- DynamicExSection += " " + Entry + "\n"
- DynamicExSection += "\n"
- if (len(PcdDYEIa32) > 0):
- DynamicExSection += "[PcdEx.IA32]\n"
- for Entry in PcdDYEIa32[:]:
- DynamicExSection += " " + Entry + "\n"
- DynamicExSection += "\n"
- if (len(PcdDYEX64) > 0):
- DynamicExSection += "[PcdEx.X64]\n"
- for Entry in PcdDYEX64[:]:
- DynamicExSection += " " + Entry + "\n"
- DynamicExSection += "\n"
- if (len(PcdDYEIpf) > 0):
- DynamicExSection += "[PcdEx.IPF]\n"
- for Entry in PcdDYEIpf[:]:
- DynamicExSection += " " + Entry + "\n"
- DynamicExSection += "\n"
- if (len(PcdDYEEbc) > 0):
- DynamicExSection += "[PcdEx.EBC]\n"
- for Entry in PcdDYEEbc[:]:
- DynamicExSection += " " + Entry + "\n"
- DynamicExSection += "\n"
-
- Output.append(DynamicExSection)
- if (options.debug):
- print DynamicExSection
-
- if ((len(PcdDY)+len(PcdDYIa32)+len(PcdDYX64)+len(PcdDYIpf)+len(PcdDYEbc)) > 0):
-## DynamicSection = "\n" + "#"*80 + "\n#\n"
-## DynamicSection += "# Pcd DYNAMIC - list of PCDs that this module is coded for.\n"
-## DynamicSection += "#\n" + "#"*80 + "\n\n"
-
- DynamicSection = "\n"
- if (len(PcdDY) > 0):
- DynamicSection += "[Pcd.common]\n"
- for Entry in PcdDY[:]:
- DynamicSection += " " + Entry + "\n"
- DynamicSection += "\n"
- if (len(PcdDYIa32) > 0):
- DynamicSection += "[Pcd.IA32]\n"
- for Entry in PcdDYIa32[:]:
- DynamicSection += " " + Entry + "\n"
- DynamicSection += "\n"
- if (len(PcdDYX64) > 0):
- DynamicSection += "[Pcd.X64]\n"
- for Entry in PcdDYX64[:]:
- DynamicSection += " " + Entry + "\n"
- DynamicSection += "\n"
- if (len(PcdDYIpf) > 0):
- DynamicSection += "[Pcd.IPF]\n"
- for Entry in PcdDYIpf[:]:
- DynamicSection += " " + Entry + "\n"
- DynamicSection += "\n"
- if (len(PcdDYEbc) > 0):
- DynamicSection += "[Pcd.EBC]\n"
- for Entry in PcdDYEbc[:]:
- DynamicSection += " " + Entry + "\n"
- DynamicSection += "\n"
-
- Output.append(DynamicSection)
- if (options.debug):
- print DynamicSection
-
- if ((len(Depex) + len(DepexIa32) + len(DepexX64) + len(DepexIpf) + len(DepexEbc)) > 0):
- """ We do this if and only if we have Package Dependencies """
-## Dpx = "\n" + "#"*80 + "\n#\n"
-## Dpx += "# Dependency Expression Section - list of Dependency expressions that are required for\n"
-## Dpx += "# this module.\n"
-## Dpx += "#\n" + "#"*80 + "\n\n"
- Dpx = "\n"
- if (len(Depex) > 0):
- Dpx += "[Depex]\n"
- for lc in Depex[:]:
- Dpx += " " + lc + "\n"
- Dpx += "\n"
-
- if (len(DepexIa32) > 0):
- Dpx += "[Depex.IA32]\n"
- for lc in DepexIa32[:]:
- Dpx += " " + lc + "\n"
- Dpx += "\n"
-
- if (len(DepexX64) > 0):
- Dpx += "[Depex.X64]\n"
- for lc in DepexX64[:]:
- Dpx += " " + lc + "\n"
- Dpx += "\n"
-
- if (len(DepexIpf) > 0):
- Dpx += "[Depex.IPF]\n"
- for lc in DepexIpf[:]:
- Dpx += " " + lc + "\n"
- Dpx += "\n"
-
- if (len(DepexEbc) > 0):
- Dpx += "[Depex.EBC]\n"
- for lc in DepexEbc[:]:
- Dpx += " " + lc + "\n"
- Dpx += "\n"
-
- Output.append(Dpx)
- if (options.debug):
- print Dpx
-
- if (len(MBOlines) > 0):
- BuildSection = ""
-## BuildSection = "\n" + "#"*80 + "\n#\n"
-## BuildSection += "# Build Options - list of custom build options for this module.\n"
-## BuildSection += "#\n" + "#"*80 + "\n\n"
- BuildSection += "\n[BuildOptions]\n"
- for mbo in MBOlines:
- tool, targs = mbo.split("=",2)
- BuildSection += " %-40s = %s\n" % (tool.strip(), targs.strip())
-
- Output.append(BuildSection)
- if (options.debug):
- print BuildSection
-
-
- if (len(UEList) > 0):
- UserExtensionSection = ""
- for UE in UEList[:]:
- UserExtensionSection += "[UserExtensions." + UE[0] + '."' + UE[1] + '"]\n'
- if (len(UE[2]) > 0):
- UserExtensionSection += '"' + UE[2] + '"\n'
- else:
- UserExtensionSection += "\n"
-
- Output.append(UserExtensionSection)
- if (options.debug):
- print UserExtensionSection
-
- print "write file", outputFile
- if (options.autowrite):
- fo = open(outputFile, "w")
- for Section in Output[:]:
- fo.writelines(Section)
- if (options.verbose > 1):
- print Section
- fo.close()
- elif (options.outfile):
- fo = open(outputFile, "w")
- for Section in Output[:]:
- fo.writelines(Section)
- fo.close()
- else:
- for Section in Output[:]:
- print Section
-
-
-if __name__ == '__main__':
-
- global options
- global args
- options,args = myOptionParser()
-
- main()
- sys.exit(0)
-
diff --git a/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py b/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
deleted file mode 100644
index 4c44c24731..0000000000
--- a/BaseTools/Source/Python/MigrationMsa2Inf/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'MigrationMsa2Inf' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Source/Python/MkBOM/__init__.py b/BaseTools/Source/Python/MkBOM/__init__.py
deleted file mode 100644
index 86ef629584..0000000000
--- a/BaseTools/Source/Python/MkBOM/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'MkBOM' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Source/Python/UPT/BuildVersion.py b/BaseTools/Source/Python/UPT/BuildVersion.py
index bd5876dd5c..1510430fe5 100644
--- a/BaseTools/Source/Python/UPT/BuildVersion.py
+++ b/BaseTools/Source/Python/UPT/BuildVersion.py
@@ -17,4 +17,4 @@
Build version information
'''
-gBUILD_VERSION = "Build 2474"
+gBUILD_VERSION = "Build 2518"
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index e26b558de0..a6668774b5 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -340,6 +340,7 @@ class MetaFileParser(object):
## [BuildOptions] section parser
@ParseMacro
def _BuildOptionParser(self):
+ self._CurrentLine = CleanString(self._CurrentLine, BuildOption=True)
TokenList = GetSplitValueList(self._CurrentLine, TAB_EQUAL_SPLIT, 1)
TokenList2 = GetSplitValueList(TokenList[0], ':', 1)
if len(TokenList2) == 2:
@@ -913,6 +914,9 @@ class DscParser(MetaFileParser):
ExtraData=self._CurrentLine)
ItemType = self.DataType[DirectiveName]
+ Scope = [['COMMON', 'COMMON']]
+ if ItemType == MODEL_META_DATA_INCLUDE:
+ Scope = self._Scope
if ItemType == MODEL_META_DATA_CONDITIONAL_STATEMENT_ENDIF:
# Remove all directives between !if and !endif, including themselves
while self._DirectiveStack:
@@ -945,21 +949,22 @@ class DscParser(MetaFileParser):
# Model, Value1, Value2, Value3, Arch, ModuleType, BelongsToItem=-1, BelongsToFile=-1,
# LineBegin=-1, ColumnBegin=-1, LineEnd=-1, ColumnEnd=-1, Enabled=-1
#
- self._LastItem = self._Store(
- ItemType,
- self._ValueList[0],
- self._ValueList[1],
- self._ValueList[2],
- 'COMMON',
- 'COMMON',
- self._Owner[-1],
- self._From,
- self._LineIndex+1,
- -1,
- self._LineIndex+1,
- -1,
- 0
- )
+ for Arch, ModuleType in Scope:
+ self._LastItem = self._Store(
+ ItemType,
+ self._ValueList[0],
+ self._ValueList[1],
+ self._ValueList[2],
+ Arch,
+ ModuleType,
+ self._Owner[-1],
+ self._From,
+ self._LineIndex+1,
+ -1,
+ self._LineIndex+1,
+ -1,
+ 0
+ )
## [defines] section parser
@ParseMacro
@@ -1065,6 +1070,7 @@ class DscParser(MetaFileParser):
## [BuildOptions] section parser
@ParseMacro
def _BuildOptionParser(self):
+ self._CurrentLine = CleanString(self._CurrentLine, BuildOption=True)
TokenList = GetSplitValueList(self._CurrentLine, TAB_EQUAL_SPLIT, 1)
TokenList2 = GetSplitValueList(TokenList[0], ':', 1)
if len(TokenList2) == 2:
@@ -1154,6 +1160,21 @@ class DscParser(MetaFileParser):
self._ContentIndex += 1
self._Scope = [[S1, S2]]
+ #
+ # For !include directive, handle it specially,
+ # merge arch and module type in case of duplicate items
+ #
+ while self._ItemType == MODEL_META_DATA_INCLUDE:
+ if self._ContentIndex >= len(self._Content):
+ break
+ Record = self._Content[self._ContentIndex]
+ if LineStart == Record[9] and LineEnd == Record[11]:
+ if [Record[5], Record[6]] not in self._Scope:
+ self._Scope.append([Record[5], Record[6]])
+ self._ContentIndex += 1
+ else:
+ break
+
self._LineIndex = LineStart - 1
self._ValueList = [V1, V2, V3]
@@ -1164,9 +1185,23 @@ class DscParser(MetaFileParser):
# Only catch expression evaluation error here. We need to report
# the precise number of line on which the error occurred
#
- EdkLogger.error('Parser', FORMAT_INVALID, "Invalid expression: %s" % str(Excpt),
- File=self._FileWithError, ExtraData=' '.join(self._ValueList),
- Line=self._LineIndex+1)
+ if hasattr(Excpt, 'Pcd'):
+ if Excpt.Pcd in GlobalData.gPlatformOtherPcds:
+ Info = GlobalData.gPlatformOtherPcds[Excpt.Pcd]
+ EdkLogger.error('Parser', FORMAT_INVALID, "Cannot use this PCD (%s) in an expression as"
+ " it must be defined in a [PcdsFixedAtBuild] or [PcdsFeatureFlag] section"
+ " of the DSC file, and it is currently defined in this section:"
+ " %s, line #: %d." % (Excpt.Pcd, Info[0], Info[1]),
+ File=self._FileWithError, ExtraData=' '.join(self._ValueList),
+ Line=self._LineIndex+1)
+ else:
+ EdkLogger.error('Parser', FORMAT_INVALID, "PCD (%s) is not defined in DSC file" % Excpt.Pcd,
+ File=self._FileWithError, ExtraData=' '.join(self._ValueList),
+ Line=self._LineIndex+1)
+ else:
+ EdkLogger.error('Parser', FORMAT_INVALID, "Invalid expression: %s" % str(Excpt),
+ File=self._FileWithError, ExtraData=' '.join(self._ValueList),
+ Line=self._LineIndex+1)
except MacroException, Excpt:
EdkLogger.error('Parser', FORMAT_INVALID, str(Excpt),
File=self._FileWithError, ExtraData=' '.join(self._ValueList),
@@ -1225,6 +1260,20 @@ class DscParser(MetaFileParser):
Name = TokenSpaceGuid + '.' + PcdName
self._Symbols[Name] = Value
+ Content = open(str(self.MetaFile), 'r').readlines()
+ GlobalData.gPlatformOtherPcds['DSCFILE'] = str(self.MetaFile)
+ for PcdType in (MODEL_PCD_PATCHABLE_IN_MODULE, MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_HII,
+ MODEL_PCD_DYNAMIC_VPD, MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_DYNAMIC_EX_HII,
+ MODEL_PCD_DYNAMIC_EX_VPD):
+ Records = self._RawTable.Query(PcdType, BelongsToItem=-1.0)
+ for TokenSpaceGuid,PcdName,Value,Dummy2,Dummy3,ID,Line in Records:
+ Name = TokenSpaceGuid + '.' + PcdName
+ if Name not in GlobalData.gPlatformOtherPcds:
+ PcdLine = Line
+ while not Content[Line - 1].lstrip().startswith(TAB_SECTION_START):
+ Line -= 1
+ GlobalData.gPlatformOtherPcds[Name] = (CleanString(Content[Line - 1]), PcdLine, PcdType)
+
def __ProcessDefine(self):
if not self._Enabled:
return
@@ -1386,7 +1435,8 @@ class DscParser(MetaFileParser):
try:
ValueList[0] = ValueExpression(PcdValue, self._Macros)(True)
except WrnExpression, Value:
- ValueList[0] = Value.result
+ ValueList[0] = Value.result
+ PcdValue = ValueList[0]
else:
#
# Int*/Boolean VPD PCD
@@ -1412,8 +1462,10 @@ class DscParser(MetaFileParser):
if ValueList[-1] == 'True':
ValueList[-1] = '1'
if ValueList[-1] == 'False':
- ValueList[-1] = '0'
-
+ ValueList[-1] = '0'
+ PcdValue = ValueList[-1]
+ if PcdValue and self._ItemType in [MODEL_PCD_FEATURE_FLAG, MODEL_PCD_FIXED_AT_BUILD]:
+ GlobalData.gPlatformPcds[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue
self._ValueList[2] = '|'.join(ValueList)
def __ProcessComponent(self):
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py
index f20eab9688..088a118de1 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileTable.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py
@@ -50,11 +50,13 @@ class MetaFileTable(Table):
def IsIntegrity(self):
try:
+ TimeStamp = self.MetaFile.TimeStamp
Result = self.Cur.execute("select ID from %s where ID<0" % (self.Table)).fetchall()
if not Result:
+ # update the timestamp in database
+ self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)
return False
- TimeStamp = self.MetaFile.TimeStamp
if TimeStamp != self._FileIndexTable.GetFileTimeStamp(self.IdBase):
# update the timestamp in database
self._FileIndexTable.SetFileTimeStamp(self.IdBase, TimeStamp)
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
index 6ff33db329..16766d32dc 100644
--- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
+++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
@@ -262,7 +262,7 @@ class DscBuildData(PlatformBuildClassObject):
if self._Header == None:
self._GetHeaderInfo()
if self._Guid == None:
- EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No FILE_GUID", File=self.MetaFile)
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No PLATFORM_GUID", File=self.MetaFile)
return self._Guid
## Retrieve platform version
@@ -271,7 +271,7 @@ class DscBuildData(PlatformBuildClassObject):
if self._Header == None:
self._GetHeaderInfo()
if self._Version == None:
- self._Version = ''
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No PLATFORM_VERSION", File=self.MetaFile)
return self._Version
## Retrieve platform description file version
@@ -280,7 +280,7 @@ class DscBuildData(PlatformBuildClassObject):
if self._Header == None:
self._GetHeaderInfo()
if self._DscSpecification == None:
- self._DscSpecification = ''
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No DSC_SPECIFICATION", File=self.MetaFile)
return self._DscSpecification
## Retrieve OUTPUT_DIRECTORY
@@ -298,7 +298,7 @@ class DscBuildData(PlatformBuildClassObject):
if self._Header == None:
self._GetHeaderInfo()
if self._SupArchList == None:
- self._SupArchList = ARCH_LIST
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No SUPPORTED_ARCHITECTURES", File=self.MetaFile)
return self._SupArchList
## Retrieve BUILD_TARGETS
@@ -307,7 +307,7 @@ class DscBuildData(PlatformBuildClassObject):
if self._Header == None:
self._GetHeaderInfo()
if self._BuildTargets == None:
- self._BuildTargets = ['DEBUG', 'RELEASE', 'NOOPT']
+ EdkLogger.error('build', ATTRIBUTE_NOT_AVAILABLE, "No BUILD_TARGETS", File=self.MetaFile)
return self._BuildTargets
## Retrieve SKUID_IDENTIFIER
@@ -463,7 +463,8 @@ class DscBuildData(PlatformBuildClassObject):
EdkLogger.error('build', ErrorCode, File=self.MetaFile, Line=LineNo,
ExtraData=ErrorInfo)
# Check duplication
- if ModuleFile in self._Modules:
+ # If arch is COMMON, no duplicate module is checked since all modules in all component sections are selected
+ if self._Arch != 'COMMON' and ModuleFile in self._Modules:
EdkLogger.error('build', FILE_DUPLICATED, File=self.MetaFile, ExtraData=str(ModuleFile), Line=LineNo)
Module = ModuleBuildClassObject()
@@ -841,6 +842,17 @@ class DscBuildData(PlatformBuildClassObject):
self.Pcds[Name, Guid] = PcdClassObject(Name, Guid, '', '', '', '', '', {}, False, None)
self.Pcds[Name, Guid].DefaultValue = Value
+ def IsPlatformPcdDeclared(self, DecPcds):
+ for PcdType in (MODEL_PCD_FIXED_AT_BUILD, MODEL_PCD_PATCHABLE_IN_MODULE, MODEL_PCD_FEATURE_FLAG,
+ MODEL_PCD_DYNAMIC_DEFAULT, MODEL_PCD_DYNAMIC_HII, MODEL_PCD_DYNAMIC_VPD,
+ MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_DYNAMIC_EX_HII, MODEL_PCD_DYNAMIC_EX_VPD):
+ RecordList = self._RawData[PcdType, self._Arch]
+ for TokenSpaceGuid, PcdCName, Setting, Arch, SkuName, Dummy3, Dummy4 in RecordList:
+ if (PcdCName, TokenSpaceGuid) not in DecPcds:
+ EdkLogger.error('build', PARSER_ERROR,
+ "Pcd (%s.%s) defined in DSC is not declared in DEC files." % (TokenSpaceGuid, PcdCName),
+ File=self.MetaFile, Line=Dummy4)
+
_Macros = property(_GetMacros)
Arch = property(_GetArch, _SetArch)
Platform = property(_GetPlatformName)
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index f3555d705d..e20131a312 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -33,7 +33,12 @@ from Common.Misc import GuidStructureStringToGuidString
from Common.InfClassObject import gComponentType2ModuleType
from Common.BuildToolError import FILE_WRITE_FAILURE
from Common.BuildToolError import CODE_ERROR
-
+from Common.DataType import TAB_LINE_BREAK
+from Common.DataType import TAB_DEPEX
+from Common.DataType import TAB_SLASH
+from Common.DataType import TAB_SPACE_SPLIT
+from Common.DataType import TAB_BRG_PCD
+from Common.DataType import TAB_BRG_LIBRARY
## Pattern to extract contents in EDK DXS files
gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)
@@ -63,15 +68,19 @@ gIncludePattern2 = re.compile(r"#include\s+EFI_([A-Z_]+)\s*[(]\s*(\w+)\s*[)]")
## Pattern to find the entry point for EDK module using EDKII Glue library
gGlueLibEntryPoint = re.compile(r"__EDKII_GLUE_MODULE_ENTRY_POINT__\s*=\s*(\w+)")
+## Tags for MaxLength of line in report
+gLineMaxLength = 120
+
## Tags for section start, end and separator
-gSectionStart = ">" + "=" * 118 + "<"
-gSectionEnd = "<" + "=" * 118 + ">" + "\n"
-gSectionSep = "=" * 120
+gSectionStart = ">" + "=" * (gLineMaxLength-2) + "<"
+gSectionEnd = "<" + "=" * (gLineMaxLength-2) + ">" + "\n"
+gSectionSep = "=" * gLineMaxLength
## Tags for subsection start, end and separator
-gSubSectionStart = ">" + "-" * 118 + "<"
-gSubSectionEnd = "<" + "-" * 118 + ">"
-gSubSectionSep = "-" * 120
+gSubSectionStart = ">" + "-" * (gLineMaxLength-2) + "<"
+gSubSectionEnd = "<" + "-" * (gLineMaxLength-2) + ">"
+gSubSectionSep = "-" * gLineMaxLength
+
## The look up table to map PCD type to pair of report display type and DEC type
gPcdTypeMap = {
@@ -166,6 +175,37 @@ def FindIncludeFiles(Source, IncludePathList, IncludeFiles):
IncludeFiles[FullFileName.lower().replace("\\", "/")] = FullFileName
break
+## Split each lines in file
+#
+# This method is used to split the lines in file to make the length of each line
+# less than MaxLength.
+#
+# @param Content The content of file
+# @param MaxLength The Max Length of the line
+#
+def FileLinesSplit(Content=None, MaxLength=None):
+ ContentList = Content.split(TAB_LINE_BREAK)
+ NewContent = ''
+ NewContentList = []
+ for Line in ContentList:
+ while len(Line.rstrip()) > MaxLength:
+ LineSpaceIndex = Line.rfind(TAB_SPACE_SPLIT, 0, MaxLength)
+ LineSlashIndex = Line.rfind(TAB_SLASH, 0, MaxLength)
+ LineBreakIndex = MaxLength
+ if LineSpaceIndex > LineSlashIndex:
+ LineBreakIndex = LineSpaceIndex
+ elif LineSlashIndex > LineSpaceIndex:
+ LineBreakIndex = LineSlashIndex
+ NewContentList.append(Line[:LineBreakIndex])
+ Line = Line[LineBreakIndex:]
+ if Line:
+ NewContentList.append(Line)
+ for NewLine in NewContentList:
+ NewContent += NewLine + TAB_LINE_BREAK
+ return NewContent
+
+
+
##
# Parse binary dependency expression section
#
@@ -263,7 +303,7 @@ class LibraryReport(object):
#
def GenerateReport(self, File):
FileWrite(File, gSubSectionStart)
- FileWrite(File, "Library")
+ FileWrite(File, TAB_BRG_LIBRARY)
if len(self.LibraryList) > 0:
FileWrite(File, gSubSectionSep)
for LibraryItem in self.LibraryList:
@@ -355,8 +395,10 @@ class DepexReport(object):
#
def GenerateReport(self, File, GlobalDepexParser):
if not self.Depex:
+ FileWrite(File, gSubSectionStart)
+ FileWrite(File, TAB_DEPEX)
+ FileWrite(File, gSubSectionEnd)
return
-
FileWrite(File, gSubSectionStart)
if os.path.isfile(self._DepexFileName):
try:
@@ -685,7 +727,7 @@ class PcdReport(object):
# For module PCD sub-section
#
FileWrite(File, gSubSectionStart)
- FileWrite(File, "PCD")
+ FileWrite(File, TAB_BRG_PCD)
FileWrite(File, gSubSectionSep)
for Key in self.AllPcds:
@@ -1511,7 +1553,8 @@ class BuildReport(object):
File = StringIO('')
for (Wa, MaList) in self.ReportList:
PlatformReport(Wa, MaList, self.ReportType).GenerateReport(File, BuildDuration, self.ReportType)
- SaveFileOnChange(self.ReportFile, File.getvalue(), False)
+ Content = FileLinesSplit(File.getvalue(), gLineMaxLength)
+ SaveFileOnChange(self.ReportFile, Content, True)
EdkLogger.quiet("Build report can be found at %s" % os.path.abspath(self.ReportFile))
except IOError:
EdkLogger.error(None, FILE_WRITE_FAILURE, ExtraData=self.ReportFile)
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index ef52162ea1..a463c527be 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -59,6 +59,9 @@ gBuildConfiguration = "Conf/target.txt"
gBuildCacheDir = "Conf/.cache"
gToolsDefinition = "Conf/tools_def.txt"
+TemporaryTablePattern = re.compile(r'^_\d+_\d+_[a-fA-F0-9]+$')
+TmpTableDict = {}
+
## Check environment PATH variable to make sure the specified tool is found
#
# If the tool is found in the PATH, then True is returned
@@ -1449,6 +1452,14 @@ class Build():
EdkLogger.error("build", BUILD_ERROR, "Failed to build module", ExtraData=GlobalData.gBuildingModule)
#
+ # Save temp tables to a TmpTableDict.
+ #
+ for Key in Wa.BuildDatabase._CACHE_:
+ if Wa.BuildDatabase._CACHE_[Key]._RawData and Wa.BuildDatabase._CACHE_[Key]._RawData._Table and Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Table:
+ if TemporaryTablePattern.match(Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Table):
+ TmpTableDict[Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Table] = Wa.BuildDatabase._CACHE_[Key]._RawData._Table.Cur
+ #
+ #
# All modules have been put in build tasks queue. Tell task scheduler
# to exit if all tasks are completed
#
@@ -1651,8 +1662,8 @@ def MyOptionParser():
help="Build the platform specified by the DSC file name argument, overriding target.txt's ACTIVE_PLATFORM definition.")
Parser.add_option("-m", "--module", action="callback", type="string", dest="ModuleFile", callback=SingleCheckCallback,
help="Build the module specified by the INF file name argument.")
- Parser.add_option("-b", "--buildtarget", action="append", type="choice", choices=['DEBUG','RELEASE','NOOPT'], dest="BuildTarget",
- help="BuildTarget is one of list: DEBUG, RELEASE, NOOPT, which overrides target.txt's TARGET definition. To specify more TARGET, please repeat this option.")
+ Parser.add_option("-b", "--buildtarget", type="string", dest="BuildTarget", help="Using the TARGET to build the platform, overriding target.txt's TARGET definition.",
+ action="append")
Parser.add_option("-t", "--tagname", action="append", type="string", dest="ToolChain",
help="Using the Tool Chain Tagname to build the platform, overriding target.txt's TOOL_CHAIN_TAG definition.")
Parser.add_option("-x", "--sku-id", action="callback", type="string", dest="SkuId", callback=SingleCheckCallback,
@@ -1809,7 +1820,12 @@ def Main():
EdkLogger.error("build", OPTION_VALUE_INVALID, "UNI flag must be one of -c or -s")
MyBuild = Build(Target, Workspace, Option)
+ GlobalData.gCommandLineDefines['ARCH'] = ' '.join(MyBuild.ArchList)
MyBuild.Launch()
+ # Drop temp tables to avoid database locked.
+ for TmpTableName in TmpTableDict:
+ SqlCommand = """drop table IF EXISTS %s""" % TmpTableName
+ TmpTableDict[TmpTableName].execute(SqlCommand)
#MyBuild.DumpBuildData()
except FatalError, X:
if MyBuild != None:
diff --git a/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py b/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py
deleted file mode 100644
index 68fa79e7a4..0000000000
--- a/BaseTools/Source/Python/fpd2dsc/EdkIIWorkspaceGuidsInfo.py
+++ /dev/null
@@ -1,327 +0,0 @@
-## @file
-# Collects the Guid Information in current workspace.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-import fnmatch
-from Common.EdkIIWorkspace import EdkIIWorkspace
-from Common.MigrationUtilities import *
-
-## A class for EdkII work space to resolve Guids
-#
-# This class inherits from EdkIIWorkspace and collects the Guids information
-# in current workspace. The Guids information is important to translate the
-# package Guids and recommended library instances Guids to relative file path
-# (to workspace directory) in MSA files.
-#
-class EdkIIWorkspaceGuidsInfo(EdkIIWorkspace):
-
- ## The classconstructor
- #
- # The constructor initialize workspace directory. It does not collect
- # pakage and module Guids info at initialization; instead, it collects them
- # on the fly.
- #
- # @param self The object pointer
- #
- def __init__(self):
- # Initialize parent class.
- EdkIIWorkspace.__init__(self)
- # The internal map from Guid to FilePath.
- self.__GuidToFilePath = {}
- # The internal package directory list.
- self.__PackageDirList = []
- # The internal flag to indicate whether package Guids info has been initialized
- # to avoid re-collection collected.
- self.__PackageGuidInitialized = False
- # The internal flag to indicate whether module Guids info has been initialized
- # to avoid re-collection collected.
- self.__ModuleGuidInitialized = False
-
- ## Add Guid, Version and FilePath to Guids database
- #
- # Add Guid, Version and FilePath to Guids database. It constructs a map
- # table from Guid, Version to FilePath internally. If also detects possible
- # Guid collision. For now, the version information is simply ignored and
- # Guid value itself acts as master key.
- #
- # @param self The object pointer
- # @param Guid The Guid Value
- # @param Version The version information
- # @param FilePath The Guid related file path
- #
- # @retval True The Guid value is successfully added to map table
- # @retval False The Guid is an empty string or the map table
- # already contains a same Guid
- #
- def __AddGuidToFilePath(self, Guid, Version, FilePath):
- if Guid == "":
- EdkLogger.info("Cannot find Guid in file %s" % FilePath)
- return False
- #Add the Guid value to map table to ensure case insensitive comparison.
- OldFilePath = self.__GuidToFilePath.setdefault(Guid.lower(), FilePath)
- if OldFilePath == FilePath:
- EdkLogger.verbose("File %s has new Guid '%s'" % (FilePath, Guid))
- return True
- else:
- EdkLogger.info("File %s has duplicate Guid with & %s" % (FilePath, OldFilePath))
- return False
-
-
- ## Gets file information from a module description file
- #
- # Extracts Module Name, File Guid and Version number from INF, MSA and NMSA
- # file. It supports to exact such information from text based INF file or
- # XML based (N)MSA file.
- #
- # @param self The object pointer
- # @param FileName The input module file name
- #
- # @retval True This module file represents a new module discovered
- # in current workspace
- # @retval False This module file is not regarded as a valid module
- # The File Guid cannot be extracted or the another
- # file with the same Guid already exists
- #
- def __GetModuleFileInfo(self, FileName):
- if fnmatch.fnmatch(FileName, "*.inf"):
- TagTuple = ("BASE_NAME", "FILE_GUID", "VERSION_STRING")
- (Name, Guid, Version) = GetTextFileInfo(FileName, TagTuple)
- else :
- XmlTag1 = "ModuleSurfaceArea/MsaHeader/ModuleName"
- XmlTag2 = "ModuleSurfaceArea/MsaHeader/GuidValue"
- XmlTag3 = "ModuleSurfaceArea/MsaHeader/Version"
- TagTuple = (XmlTag1, XmlTag2, XmlTag3)
- (Name, Guid, Version) = GetXmlFileInfo(FileName, TagTuple)
-
- return self.__AddGuidToFilePath(Guid, Version, FileName)
-
-
- ## Gets file information from a package description file
- #
- # Extracts Package Name, File Guid and Version number from INF, SPD and NSPD
- # file. It supports to exact such information from text based DEC file or
- # XML based (N)SPD file. EDK Compatibility Package is hardcoded to be
- # ignored since no EDKII INF file depends on that package.
- #
- # @param self The object pointer
- # @param FileName The input package file name
- #
- # @retval True This package file represents a new package
- # discovered in current workspace
- # @retval False This package is not regarded as a valid package
- # The File Guid cannot be extracted or the another
- # file with the same Guid already exists
- #
- def __GetPackageFileInfo(self, FileName):
- if fnmatch.fnmatch(FileName, "*.dec"):
- TagTuple = ("PACKAGE_NAME", "PACKAGE_GUID", "PACKAGE_VERSION")
- (Name, Guid, Version) = GetTextFileInfo(FileName, TagTuple)
- else:
- XmlTag1 = "PackageSurfaceArea/SpdHeader/PackageName"
- XmlTag2 = "PackageSurfaceArea/SpdHeader/GuidValue"
- XmlTag3 = "PackageSurfaceArea/SpdHeader/Version"
- TagTuple = (XmlTag1, XmlTag2, XmlTag3)
- (Name, Guid, Version) = GetXmlFileInfo(FileName, TagTuple)
-
- if Name == "EdkCompatibilityPkg":
- # Do not scan EDK compatibitilty package to avoid Guid collision
- # with those in EDK Glue Library.
- EdkLogger.verbose("Bypass EDK Compatibility Pkg")
- return False
-
- return self.__AddGuidToFilePath(Guid, Version, FileName)
-
- ## Iterate on all package files listed in framework database file
- #
- # Yields all package description files listed in framework database files.
- # The framework database file describes the packages current workspace
- # includes.
- #
- # @param self The object pointer
- #
- def __FrameworkDatabasePackageFiles(self):
- XmlFrameworkDb = XmlParseFile(self.WorkspaceFile)
- XmlTag = "FrameworkDatabase/PackageList/Filename"
- for PackageFile in XmlElementList(XmlFrameworkDb, XmlTag):
- yield os.path.join(self.WorkspaceDir, PackageFile)
-
-
- ## Iterate on all package files in current workspace directory
- #
- # Yields all package description files listed in current workspace
- # directory. This happens when no framework database file exists.
- #
- # @param self The object pointer
- #
- def __TraverseAllPackageFiles(self):
- for Path, Dirs, Files in os.walk(self.WorkspaceDir):
- # Ignore svn version control directory.
- if ".svn" in Dirs:
- Dirs.remove(".svn")
- if "Build" in Dirs:
- Dirs.remove("Build")
- # Assume priority from high to low: DEC, NSPD, SPD.
- PackageFiles = fnmatch.filter(Files, "*.dec")
- if len(PackageFiles) == 0:
- PackageFiles = fnmatch.filter(Files, "*.nspd")
- if len(PackageFiles) == 0:
- PackageFiles = fnmatch.filter(Files, "*.spd")
-
- for File in PackageFiles:
- # Assume no more package decription file in sub-directory.
- del Dirs[:]
- yield os.path.join(Path, File)
-
- ## Iterate on all module files in current package directory
- #
- # Yields all module description files listed in current package
- # directory.
- #
- # @param self The object pointer
- #
- def __TraverseAllModuleFiles(self):
- for PackageDir in self.__PackageDirList:
- for Path, Dirs, Files in os.walk(PackageDir):
- # Ignore svn version control directory.
- if ".svn" in Dirs:
- Dirs.remove(".svn")
- # Assume priority from high to low: INF, NMSA, MSA.
- ModuleFiles = fnmatch.filter(Files, "*.inf")
- if len(ModuleFiles) == 0:
- ModuleFiles = fnmatch.filter(Files, "*.nmsa")
- if len(ModuleFiles) == 0:
- ModuleFiles = fnmatch.filter(Files, "*.msa")
-
- for File in ModuleFiles:
- yield os.path.join(Path, File)
-
- ## Initialize package Guids info mapping table
- #
- # Collects all package guids map to package decription file path. This
- # function is invokes on demand to avoid unnecessary directory scan.
- #
- # @param self The object pointer
- #
- def __InitializePackageGuidInfo(self):
- if self.__PackageGuidInitialized:
- return
-
- EdkLogger.verbose("Start to collect Package Guids Info.")
-
- WorkspaceFile = os.path.join("Conf", "FrameworkDatabase.db")
- self.WorkspaceFile = os.path.join(self.WorkspaceDir, WorkspaceFile)
-
- # Try to find the frameworkdatabase file to discover package lists
- if os.path.exists(self.WorkspaceFile):
- TraversePackage = self.__FrameworkDatabasePackageFiles
- EdkLogger.verbose("Package list bases on: %s" % self.WorkspaceFile)
- else:
- TraversePackage = self.__TraverseAllPackageFiles
- EdkLogger.verbose("Package list in: %s" % self.WorkspaceDir)
-
- for FileName in TraversePackage():
- if self.__GetPackageFileInfo(FileName):
- PackageDir = os.path.dirname(FileName)
- EdkLogger.verbose("Find new package directory %s" % PackageDir)
- self.__PackageDirList.append(PackageDir)
-
- self.__PackageGuidInitialized = True
-
- ## Initialize module Guids info mapping table
- #
- # Collects all module guids map to module decription file path. This
- # function is invokes on demand to avoid unnecessary directory scan.
- #
- # @param self The object pointer
- #
- def __InitializeModuleGuidInfo(self):
- if self.__ModuleGuidInitialized:
- return
- EdkLogger.verbose("Start to collect Module Guids Info")
-
- self.__InitializePackageGuidInfo()
- for FileName in self.__TraverseAllModuleFiles():
- if self.__GetModuleFileInfo(FileName):
- EdkLogger.verbose("Find new module %s" % FileName)
-
- self.__ModuleGuidInitialized = True
-
- ## Get Package file path by Package Guid and Version
- #
- # Translates the Package Guid and Version to a file path relative
- # to workspace directory. If no package in current workspace match the
- # input Guid, an empty file path is returned. For now, the version
- # value is simply ignored.
- #
- # @param self The object pointer
- # @param Guid The Package Guid value to look for
- # @param Version The Package Version value to look for
- #
- def ResolvePackageFilePath(self, Guid, Version = ""):
- self.__InitializePackageGuidInfo()
-
- EdkLogger.verbose("Resolve Package Guid '%s'" % Guid)
- FileName = self.__GuidToFilePath.get(Guid.lower(), "")
- if FileName == "":
- EdkLogger.info("Cannot resolve Package Guid '%s'" % Guid)
- else:
- FileName = self.WorkspaceRelativePath(FileName)
- FileName = os.path.splitext(FileName)[0] + ".dec"
- FileName = FileName.replace("\\", "/")
- return FileName
-
- ## Get Module file path by Module Guid and Version
- #
- # Translates the Module Guid and Version to a file path relative
- # to workspace directory. If no module in current workspace match the
- # input Guid, an empty file path is returned. For now, the version
- # value is simply ignored.
- #
- # @param self The object pointer
- # @param Guid The Module Guid value to look for
- # @param Version The Module Version value to look for
- #
- def ResolveModuleFilePath(self, Guid, Version = ""):
- self.__InitializeModuleGuidInfo()
-
- EdkLogger.verbose("Resolve Module Guid '%s'" % Guid)
- FileName = self.__GuidToFilePath.get(Guid.lower(), "")
- if FileName == "":
- EdkLogger.info("Cannot resolve Module Guid '%s'" % Guid)
- else:
- FileName = self.WorkspaceRelativePath(FileName)
- FileName = os.path.splitext(FileName)[0] + ".inf"
- FileName = FileName.replace("\\", "/")
- return FileName
-
-# A global class object of EdkIIWorkspaceGuidsInfo for external reference.
-gEdkIIWorkspaceGuidsInfo = EdkIIWorkspaceGuidsInfo()
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- # Test the translation of package Guid.
-# MdePkgGuid = "1E73767F-8F52-4603-AEB4-F29B510B6766"
-# OldMdePkgGuid = "5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"
-# print gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(MdePkgGuid)
-# print gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(OldMdePkgGuid)
-
- # Test the translation of module Guid.
-# UefiLibGuid = "3a004ba5-efe0-4a61-9f1a-267a46ae5ba9"
-# UefiDriverModelLibGuid = "52af22ae-9901-4484-8cdc-622dd5838b09"
-# print gEdkIIWorkspaceGuidsInfo.ResolvePlatformFilePath(UefiLibGuid)
-# print gEdkIIWorkspaceGuidsInfo.ResolvePlatformFilePath(UefiDriverModelLibGuid)
- pass \ No newline at end of file
diff --git a/BaseTools/Source/Python/fpd2dsc/LoadFpd.py b/BaseTools/Source/Python/fpd2dsc/LoadFpd.py
deleted file mode 100644
index fe271ac85b..0000000000
--- a/BaseTools/Source/Python/fpd2dsc/LoadFpd.py
+++ /dev/null
@@ -1,1039 +0,0 @@
-## @file
-# Open an FPD file and load all its contents to a PlatformClass object.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-from CommonDataClass.PlatformClass import *
-from CommonDataClass.FdfClass import *
-from Common.XmlRoutines import *
-from Common.MigrationUtilities import *
-from EdkIIWorkspaceGuidsInfo import gEdkIIWorkspaceGuidsInfo
-
-## Load Platform Header
-#
-# Read an input Platform XML DOM object and return Platform Header class object
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-# @param FpdFileName The file path of FPD File
-#
-# @retvel PlatformHeader A new Platform Header object loaded from XmlFpd
-#
-def LoadPlatformHeader(XmlFpd, FpdFileName):
- PlatformHeader = PlatformHeaderClass()
-
- XmlTag = "PlatformSurfaceArea/PlatformHeader"
- FpdHeader = XmlNode(XmlFpd, XmlTag)
-
- SetIdentification(PlatformHeader, FpdHeader, "PlatformName", FpdFileName)
- SetCommonHeader(PlatformHeader, FpdHeader)
-
- XmlTag = "PlatformSurfaceArea/PlatformHeader/Specification"
- List = XmlElement(XmlFpd, XmlTag).split()
- SpecificationName = List[0]
- SpecificationValue = List[1]
- PlatformHeader.Specification = {SpecificationName:SpecificationValue}
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/SupportedArchitectures"
- PlatformHeader.SupArchList = XmlElement(XmlFpd, XmlTag).split()
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/BuildTargets"
- PlatformHeader.BuildTargets = XmlElement(XmlFpd, XmlTag).split()
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/IntermediateDirectories"
- PlatformHeader.IntermediateDirectories = XmlElement(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/OutputDirectory"
- PlatformHeader.OutputDirectory = XmlElement(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/SkuInfo"
- List = map(LoadSkuId, XmlList(XmlFpd, XmlTag))
- if List != []:
- PlatformHeader.SkuIdName = List[0]
-
- return PlatformHeader
-
-## Load a Platform SkuId
-#
-# Read an input Platform XML DOM object and return a list of Platform SkuId
-# contained in the DOM object.
-#
-# @param XmlPlatformSkuInfo An XML DOM object read from FPD file
-#
-# @retvel PlatformSkuInfo A SkuInfo loaded from XmlFpd
-#
-def LoadPlatformSkuInfo(XmlPlatformSkuInfo):
- XmlTag = "SkuInfo/SkuId"
- SkuInfo = []
- SkuId = XmlElement(XmlPlatformSkuInfo, XmlTag)
- SkuInfo.append(SkuId)
-
- XmlTag = "SkuInfo/Value"
- Value = XmlElement(XmlPlatformSkuInfo, XmlTag)
- SkuInfo.append(Value)
- return SkuInfo
-
-## Load a Platform SkuId
-#
-# Read an input Platform XML DOM object and return a list of Platform SkuId
-# contained in the DOM object.
-#
-# @param XmlSkuInfo An XML DOM object read from FPD file
-#
-# @retvel List A list of SkuId and SkuValue loaded from XmlFpd
-#
-def LoadSkuId(XmlSkuInfo):
- XmlTag = "SkuInfo/UiSkuName"
- SkuValue = XmlElement(XmlSkuInfo, XmlTag)
-
- XmlTag = "SkuInfo/UiSkuName"
- List = map(LoadSkuID, XmlList(XmlSkuInfo, XmlTag))
- if List != []:
- SkuID = List[0]
- #SkuID = XmlAttribute(XmlSkuInfo, XmlTag)
- List = []
- List.append(SkuID)
- List.append(SkuValue)
- return List
-
-def LoadSkuID(XmlUiSkuName):
- XmlTag = "SkuID"
- SkuID = XmlAttribute(XmlUiSkuName, XmlTag)
- return SkuID
-
-## Load a list of Platform SkuIds
-#
-# Read an input Platform XML DOM object and return a list of Platform SkuId
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel PlatformSkuIds A platform SkuIds object loaded from XmlFpd
-#
-def LoadPlatformSkuInfos(XmlFpd):
- PlatformSkuIds = SkuInfoListClass()
-
- SkuInfoList = []
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/SkuInfo"
- List = map(LoadSkuId, XmlList(XmlFpd, XmlTag))
- SkuInfoList = List
-
- XmlTag = "PlatformSurfaceArea/PlatformDefinitions/SkuInfo/UiSkuName"
- Value = XmlElement(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/DynamicPcdBuildDefinitions/PcdBuildData/SkuInfo"
- # here return a List
- List = map(LoadPlatformSkuInfo, XmlList(XmlFpd, XmlTag))
-
- for SkuInfo in List:
- SkuId = SkuInfo[0]
- Value = SkuInfo[1]
-
- SkuInfoList.append(SkuInfo)
-
- PlatformSkuIds.SkuInfoList = SkuInfoList
-
- return PlatformSkuIds
-
-## Load Platform Module Build Option
-#
-# Read an input Platform XML DOM object and return Platform Module Build Option class object
-# contained in the DOM object.
-#
-# @param XmlModuleBuildOption An XML DOM object read from FPD file
-#
-# @retvel PlatformBuildOption A Platform Build Option object loaded from XmlFpd
-#
-def LoadModuleBuildOption(XmlModuleBuildOption):
- PlatformBuildOption = PlatformBuildOptionClass()
- PlatformBuildOption.UserDefinedAntTasks = {}
-
- XmlTag = "BuildOptions/Options/Option"
- PlatformBuildOption.Options = map(LoadBuildOption, XmlList(XmlModuleBuildOption, XmlTag))
-
- PlatformBuildOption.UserExtensions = {}
- PlatformBuildOption.FfsKeyList = {}
- return PlatformBuildOption
-
-## Load Platform Module Extern
-#
-# Read an input Platform XML DOM object and return Platform Module Extern class object
-# contained in the DOM object.
-#
-# @param XmlModuleExtern An XML DOM object read from FPD file
-#
-# @retvel PlatformModuleExtern A Platform Module Extern object loaded from XmlFpd
-#
-def LoadModuleExtern(XmlModuleExtern):
- PlatformModuleExtern = []
-
- XmlTag = "Externs/PcdIsDriver"
- PcdIsDriver = XmlElement(XmlModuleExtern, XmlTag)
- PlatformModuleExtern.append(PcdIsDriver)
-
- XmlTag = "Externs/Specification"
- Specification = XmlElement(XmlModuleExtern, XmlTag)
- PlatformModuleExtern.append(Specification)
-
- XmlTag = "Externs/Extern"
-
- return PlatformModuleExtern
-
-## Load Platform ModuleSaBuildOptions
-#
-# Read an input Platform XML DOM object and return Platform ModuleSaBuildOptions class object
-# contained in the DOM object.
-#
-# @param XmlModuleSaBuildOptions An XML DOM object read from FPD file
-#
-# @retvel PlatformBuildOptions A list of Platform ModuleSaBuildOption object loaded from XmlFpd
-#
-def LoadPlatformModuleSaBuildOption(XmlModuleSA):
- PlatformModuleSaBuildOption = PlatformBuildOptionClasses()
-
- XmlTag = "ModuleSA/ModuleSaBuildOptions/FvBinding"
- PlatformModuleSaBuildOption.FvBinding = XmlElement(XmlModuleSA, XmlTag)
-
- XmlTag = "ModuleSA/ModuleSaBuildOptions/FfsFormatKey"
- PlatformModuleSaBuildOption.FfsFormatKey = XmlElement(XmlModuleSA, XmlTag)
-
- XmlTag = "ModuleSA/ModuleSaBuildOptions/FfsFileNameGuid"
- PlatformModuleSaBuildOption.FfsFileNameGuid = XmlElement(XmlModuleSA, XmlTag)
-
- XmlTag = "ModuleSA/ModuleSaBuildOptions/Options/Option"
- PlatformModuleSaBuildOption.BuildOptionList = map(LoadBuildOption, XmlList(XmlModuleSA, XmlTag))
-
- return PlatformModuleSaBuildOption
-
-## Load a list of Platform Library Classes
-#
-# Read an input Platform XML DOM object and return a list of Library Classes
-# contained in the DOM object.
-#
-# @param XmlLibraryInstance An XML DOM object read from FPD file
-#
-# @retvel LibraryInstance A Library Instance loaded from XmlFpd
-#
-def LoadPlatformModuleLibraryInstance(XmlLibraryInstance):
- LibraryInstance = []
-
- XmlTag = "ModuleGuid"
- ModuleGuid = XmlAttribute(XmlLibraryInstance, XmlTag)
-
- ModulePath = gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(ModuleGuid)
- ModuleMSAFile = ModulePath.replace('.inf', '.msa')
- WorkSpace = os.getenv('WORKSPACE')
- ModuleMSAFileName = os.path.join(WorkSpace, ModuleMSAFile)
- XmlMsa = XmlParseFile(ModuleMSAFileName)
-
- XmlTag = "ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass/Keyword"
- Name = XmlElement(XmlMsa, XmlTag)
- LibraryInstance.append(Name)
- LibraryInstance.append(ModulePath)
-
- #XmlTag = "PackageGuid"
- #PackageGuid = XmlAttribute(XmlLibraryInstance, XmlTag)
- #LibraryInstance.append(PackageGuid)
- return LibraryInstance
-
-## Load a Library Class
-#
-# Read an input Platform XML DOM object and return a library class object
-# contained in the DOM object.
-#
-# @param XmlLibraryClass An XML DOM object read from FPD file
-#
-# @retvel SupModuleList A Library Class Supported Module List object loaded from XmlFpd
-#
-def LoadLibraryClassSupModuleList(XmlLibraryClass):
- XmlTag = "Usage"
- Usage = XmlAttribute(XmlLibraryClass, XmlTag)
- if Usage == "ALWAYS_PRODUCED":
- XmlTag = "SupModuleList"
- SupModuleList = XmlAttribute(XmlLibraryClass, XmlTag).split()
- return SupModuleList
-
-## Load Platform Library Class
-#
-# Read an input Platform XML DOM object and return Platform module class object
-# contained in the DOM object.
-#
-# @param XmlLibraries An XML DOM object read from FPD file
-#
-# @retvel PlatformLibraryClass A Platform Library Class object loaded from XmlFpd
-#
-def LoadPlatformLibraryClass(XmlPlatformLibraryClass):
- PlatformLibraryInstance = PlatformLibraryClass()
-
- XmlTag = "ModuleGuid"
- LibraryInstanceModuleGuid = XmlAttribute(XmlPlatformLibraryClass, XmlTag)
-
- XmlTag = "PackageGuid"
- LibraryInstancePackageGuid = XmlAttribute(XmlPlatformLibraryClass, XmlTag)
-
- LibraryInstancePath = gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(LibraryInstanceModuleGuid)
-
- if LibraryInstancePath != "": # if LibraryInstancePath == "" that's because the module guid cannot be resolved
- PlatformLibraryInstance.FilePath = LibraryInstancePath
- # replace *.inf to *.msa
- LibraryInstanceMSAName = LibraryInstancePath.replace('.inf', '.msa')
- WorkSpace = os.getenv('WORKSPACE')
- LibraryInstanceMSAPath = os.path.join(WorkSpace, LibraryInstanceMSAName)
-
- PlatformLibraryInstance.FilePath = LibraryInstancePath
-
- XmlMsa = XmlParseFile(LibraryInstanceMSAPath)
-
- XmlTag = "ModuleSurfaceArea/MsaHeader/ModuleName"
- PlatformLibraryInstance.Name = XmlElement(XmlMsa, XmlTag)
-
- XmlTag = "ModuleSurfaceArea/MsaHeader/ModuleType"
- PlatformLibraryInstance.ModuleType = XmlElement(XmlMsa, XmlTag)
-
- if PlatformLibraryInstance.ModuleType != "BASE":
- XmlTag = "ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass"
- List = map(LoadLibraryClassSupModuleList, XmlList(XmlMsa, XmlTag))
- if List != []:
- PlatformLibraryInstance.SupModuleList = List[0]
- XmlTag = "ModuleSurfaceArea/ModuleDefinitions/SupportedArchitectures"
- PlatformLibraryInstance.SupArchList = XmlElement(XmlMsa, XmlTag).split()
-
- PlatformLibraryInstance.ModuleGuid = LibraryInstanceModuleGuid
-
- XmlTag = "ModuleSurfaceArea/MsaHeader/Version"
- PlatformLibraryInstance.ModuleVersion = XmlElement(XmlMsa, XmlTag)
-
- PlatformLibraryInstance.PackageGuid = LibraryInstancePackageGuid
- PlatformLibraryInstance.PackageVersion = ''
-
- return PlatformLibraryInstance
-
-## Load Platform Library Classes
-#
-# Read an input Platform XML DOM object and return Platform module class object
-# contained in the DOM object.
-#
-# @param XmlLibraries An XML DOM object read from FPD file
-#
-# @retvel PlatformLibraryClasses A list of Platform Library Class object loaded from XmlFpd
-#
-def LoadPlatformLibraryClasses(XmlFpd):
- PlatformLibraryInstances = PlatformLibraryClasses()
- PlatformLibraryInstances.LibraryList = []
-
- List = []
- XmlTag = "PlatformSurfaceArea/FrameworkModules/ModuleSA/Libraries/Instance"
- List = map(LoadPlatformLibraryClass, XmlList(XmlFpd, XmlTag))
- #List.sort()
- if List == []:
- print "Error"
- else:
- PlatformLibraryInstances.LibraryList = List
-
- return PlatformLibraryInstances
-
-## Load Platform module
-#
-# Read an input Platform XML DOM object and return Platform module class object
-# contained in the DOM object.
-#
-# @param XmlModuleSA An XML DOM object read from FPD file
-#
-# @retvel PlatformModule A Platform module object loaded from XmlFpd
-#
-def LoadModuleSA(XmlModuleSA):
- PlatformModule = PlatformModuleClass()
-
- # three parts: Libraries instances, PcdBuildDefinition, ModuleSaBuildOptions
- XmlTag = "ModuleSA/Libraries/Instance"
-
- PlatformModule.LibraryClasses = map(LoadPlatformModuleLibraryInstance, XmlList(XmlModuleSA, XmlTag))
-
- XmlTag = "ModuleSA/PcdBuildDefinition/PcdData"
- PlatformModule.PcdBuildDefinitions = map(LoadPlatformPcdData, XmlList(XmlModuleSA, XmlTag))
-
- XmlTag = "ModuleSA/ModuleSaBuildOptions"
- PlatformModule.ModuleSaBuildOption = LoadPlatformModuleSaBuildOption(XmlModuleSA)
-
- XmlTag = "ModuleSA/BuildOptions"
- PlatformModule.BuildOptions = map(LoadModuleBuildOption, XmlList(XmlModuleSA, XmlTag)) #bugbug fix me
-
- XmlTag = "ModuleSA/Externs"
- PlatformModule.Externs = map(LoadModuleExtern, XmlList(XmlModuleSA, XmlTag)) #bugbug fix me
-
- XmlTag = "SupArchList"
- PlatformModule.SupArchList = XmlAttribute(XmlModuleSA, XmlTag).split()
-
- # the package guid which the module depends on, do not care for now
- XmlTag = "PackageGuid"
- PlatformModule.PackageGuid = XmlAttribute(XmlModuleSA, XmlTag)
-
- # the module guid, use this guid to get the module *.msa file and convert it to *.inf file with path
- XmlTag = "ModuleGuid"
- PlatformModule.ModuleGuid = XmlAttribute(XmlModuleSA, XmlTag)
- # use this guid to find the *.msa file path or FilePath $(WORKSPACE)/EdkModulePkg/Core/Dxe/DxeMain.msa
- # then convert $(WORKSPACE)/EdkModulePkg/Core/Dxe/DxeMain.msa to $(WORKSPACE)/EdkModulePkg/Core/Dxe/DxeMain.inf, it's FilePath
- PlatformModulePath = gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(PlatformModule.ModuleGuid)
-
- PlatformModule.FilePath = PlatformModulePath # *.inf file path
- # *.inf back to *.msa
- ModuleMSAFileName = PlatformModulePath.replace('.inf', '.msa')
- WorkSpace = os.getenv('WORKSPACE')
- ModuleMSAFileName = os.path.join(WorkSpace, ModuleMSAFileName)
- # Open this module
- #ModuleMSA = open(ModuleMSAFileName, "r")
- XmlMsa = XmlParseFile(ModuleMSAFileName)
-
- XmlTag = "ModuleSurfaceArea/MsaHeader/ModuleName"
- PlatformModule.Name = XmlElement(XmlMsa, XmlTag) # ModuleName
-
- XmlTag = "ModuleSurfaceArea/MsaHeader/ModuleType"
- PlatformModule.ModuleType = XmlElement(XmlMsa, XmlTag)
-
- # IA32, X64, IPF and EBC which the module support arch
- #XmlTag = "ModuleSurfaceArea/ModuleDefinitions/SupportedArchitectures"
- #PlatformModule.SupArchList = XmlElement(XmlMsa, XmlTag).split()
-
- #XmlTag = "ModuleSurfaceArea/MsaHeader/"
- PlatformModule.Type = '' #LIBRARY | LIBRARY_CLASS | MODULE, used by dsc. New in DSC spec
-
- PlatformModule.ExecFilePath = '' # New in DSC spec
-
- XmlTag = "ModuleSurfaceArea/MsaHeader/Specification"
- PlatformModule.Specifications = XmlElement(XmlMsa, XmlTag).split()
-
- return PlatformModule
-
-## Load Platform modules
-#
-# Read an input Platform XML DOM object and return a list of Platform modules class object
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel PlatformModules A list of Platform modules object loaded from XmlFpd
-#
-def LoadPlatformModules(XmlFpd):
- PlatformModules = PlatformModuleClasses()
-
- XmlTag = "PlatformSurfaceArea/FrameworkModules/ModuleSA"
- PlatformModules.ModuleList = map(LoadModuleSA, XmlList(XmlFpd, XmlTag))
-
- return PlatformModules
-
-## Load Platform Flash Definition File
-#
-# Read an input Platform XML DOM object and return Platform Flash Definition File class object
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-# @param FpdFileName The file path of FPD File
-#
-# @retvel PlatformFlashDefinitionFile A new Platform Flash Definition File object loaded from XmlFpd
-#
-def LoadPlatformFlashDefinitionFile(XmlFpd, FpdFileName):
- PlatformFlashDefinitionFile = PlatformFlashDefinitionFileClass()
-
- XmlTag = "PlatformSurfaceArea/Flash/FlashDefinitionFile"
- PlatformFlashDefinitionFile.FilePath = XmlElement(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/Flash/FlashDefinitionFile/Id"
- PlatformFlashDefinitionFile.Id = XmlAttribute(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/Flash/FlashDefinitionFile/UiName"
- PlatformFlashDefinitionFile.UiName = XmlAttribute(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/Flash/FlashDefinitionFile/Preferred"
- PlatformFlashDefinitionFile.Preferred = XmlAttribute(XmlFpd, XmlTag)
-
- return PlatformFlashDefinitionFile
-
-## Load Platform User Defined Ant Tasks
-#
-# Read an input Platform XML DOM object and return platform
-# User Defined Ant Tasks contained in the DOM object.
-#
-# @param XmlUserDefinedAntTasks An XML DOM object read from FPD file
-#
-# @retvel AntTask An Ant Task loaded from XmlFpd
-#
-def LoadUserDefinedAntTasks(XmlFpd):
- Dict = {}
- AntTask = PlatformAntTaskClass()
-
- XmlTag = "PlatformSurfaceArea/BuildOptions/UserDefinedAntTasks/AntTask/Id"
- AntTask.Id = XmlAttribute(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/BuildOptions/UserDefinedAntTasks/AntTask/AntCmdOptions"
- AntTask.AntCmdOptions = XmlElement(XmlFpd, XmlTag)
-
- XmlTag = "PlatformSurfaceArea/BuildOptions/UserDefinedAntTasks/AntTask/Filename"
- AntTask.FilePath = XmlElement(XmlFpd, XmlTag)
-
- Dict[AntTask.Id] = AntTask
- return Dict
-
-## Load Platform Build Options
-#
-# Read an input Platform XML DOM object and return a list of platform
-# Build Option contained in the DOM object.
-#
-# @param XmlBuildOptions An XML DOM object read from FPD file
-#
-# @retvel PlatformBuildOptions A list of platform Build Options loaded from XmlFpd
-#
-def LoadBuildOptions(XmlBuildOptions):
- XmlTag = "Option"
- return map(LoadBuildOption, XmlList(XmlBuildOptions, XmlTag)) # LoadBuildOption is a method in MigrationUtilities.py
-
-## Load Platform Build Option
-#
-# Read an input Platform XML DOM object and return a Build Option
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel PlatformBuildOption A Build Options loaded from XmlFpd
-#
-def LoadPlatformBuildOption(XmlBuildOptions):
- PlatformBuildOption = PlatformBuildOptionClass()
-
- # handle UserDefinedAntTasks
- XmlTag = "BuildOptions/UserDefinedAntTasks/AntTask"
- PlatformBuildOption.UserDefinedAntTasks = LoadUserDefinedAntTasks(XmlTag)
-
- # handle Options
- XmlTag = "BuildOptions/Options/Option"
- PlatformBuildOption.Options = map(LoadBuildOption, XmlList(XmlBuildOptions, XmlTag))
-
- # handle UserExtensions
- XmlTag = "BuildOptions/UserExtensions"
- PlatformBuildOption.UserExtensions = LoadUserExtensions(XmlTag) # from MigrationUtilities.py LoadUserExtensions
-
- # handle Ffs
- XmlTag = "BuildOptions/Ffs/FfsKey"
- PlatformBuildOption.FfsKeyList = map(LoadPlatformFfs, XmlList(XmlBuildOptions, XmlTag))
-
- return PlatformBuildOption
-
-## Load Platform Ffs Dictionary
-#
-# Read an input Platform XML DOM object and return a platform Ffs Dictionary
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel Dict A platform Ffs Dict loaded from XmlFpd
-#
-def LoadPlatformFfsDict(XmlFpd):
- Dict = {}
- XmlTag = "PlatformSurfaceArea/BuildOptions/Ffs"
- List = map(LoadPlatformFfs, XmlList(XmlFpd, XmlTag))
- if List != []:
- for Ffs in List:
- Dict[Ffs.Key] = Ffs
- return Dict
-
-## Load Platform Ffs Section
-#
-# Read an input Platform XML DOM object and return a platform Ffs Section
-# contained in the DOM object.
-#
-# @param XmlFfs An XML DOM object read from FPD file
-#
-# @retvel PlatformFfsSection A platform Ffs Section loaded from XmlFpd
-#
-def LoadPlatformFfsSection(XmlFfsSection):
- PlatformFfsSection = PlatformFfsSectionClass()
-
- XmlTag = ""
- PlatformFfsSection.BindingOrder = ''
-
- XmlTag = ""
- PlatformFfsSection.Compressible = ''
-
- XmlTag = "SectionType"
- PlatformFfsSection.SectionType = XmlAttribute(XmlFfsSection, XmlTag)
-
- XmlTag = ""
- PlatformFfsSection.EncapsulationType = ''
-
- XmlTag = ""
- PlatformFfsSection.ToolName = ''
-
- XmlTag = ""
- PlatformFfsSection.Filenames = []
-
- XmlTag = ""
- PlatformFfsSection.Args = ''
-
- XmlTag = ""
- PlatformFfsSection.OutFile = ''
-
- XmlTag = ""
- PlatformFfsSection.OutputFileExtension = ''
-
- XmlTag = ""
- PlatformFfsSection.ToolNameElement = ''
-
- return PlatformFfsSection
-
-## Load Platform Ffs Sections
-#
-# Read an input Platform XML DOM object and return a platform Ffs Sections
-# contained in the DOM object.
-#
-# @param XmlFfs An XML DOM object read from FPD file
-#
-# @retvel PlatformFfsSections A platform Ffs Sections loaded from XmlFpd
-#
-def LoadFfsSections():
- PlatformFfsSections = PlatformFfsSectionsClass()
- PlatformFfsSections.BindingOrder = ''
- PlatformFfsSections.Compressible = ''
- PlatformFfsSections.SectionType = ''
- PlatformFfsSections.EncapsulationType = ''
- PlatformFfsSections.ToolName = ''
- PlatformFfsSections.Section = []
- PlatformFfsSections.Sections = []
-
- return PlatformFfsSections
-
-## Load Platform Ffs Sections
-#
-# Read an input Platform XML DOM object and return a platform Ffs Sections
-# contained in the DOM object.
-#
-# @param XmlFfs An XML DOM object read from FPD file
-#
-# @retvel PlatformFfsSections A platform Ffs Sections loaded from XmlFpd
-#
-def LoadPlatformFfsSections(XmlFfsSections):
- PlatformFfsSections = PlatformFfsSectionsClass()
-
- XmlTag = ""
- PlatformFfsSections.BindingOrder = ''
-
- XmlTag = ""
- Compressible = ''
-
- XmlTag = ""
- SectionType = ''
-
- XmlTag = "EncapsulationType"
- EncapsulationType = XmlAttribute(XmlFfsSections, XmlTag)
-
- XmlTag = ""
- ToolName = ''
-
- XmlTag = "Sections/Section"
- Section = [] #[ PlatformFfsSectionClass, ... ]
- Section = map(LoadPlatformFfsSection, XmlList(XmlFfsSections, XmlTag))
-
-
- XmlTag = "Sections/Sections"
- Sections = map(LoadFfsSections, XmlList(XmlFfsSections, XmlTag)) #[ PlatformFfsSectionsClass, ...]
-
- return PlatformFfsSections
-
-## Load Platform Ffs Attribute
-#
-# Read an input Platform XML DOM object and return a platform Ffs Attribute
-# contained in the DOM object.
-#
-# @param XmlFfs An XML DOM object read from FPD file
-#
-# @retvel List A platform Ffs Attribute loaded from XmlFpd
-#
-def LoadFfsAttribute(XmlFfs):
- List = []
- XmlTag = "Ffs/Attribute"
- for XmlAttr in XmlList(XmlFfs, XmlTag):
- XmlTag = "Name"
- Name = XmlAttribute(XmlAttr, XmlTag)
- XmlTag = "Value"
- Value = XmlAttribute(XmlAttr, XmlTag)
- List.append([Name,Value])
- return List
-
-## Load a list of Platform Build Options
-#
-# Read an input Platform XML DOM object and return a list of Build Options
-# contained in the DOM object.
-#
-# @param XmlFfs An XML DOM object read from FPD file
-#
-# @retvel PlatformFfsKey A platform Ffs key loaded from XmlFpd
-#
-def LoadPlatformFfs(XmlFfs):
- PlatformFfs = PlatformFfsClass()
-
- PlatformFfs.Attribute = {}
- Dict = {}
-
- List = LoadFfsAttribute(XmlFfs)
-
- XmlTag = "Ffs/Sections/Sections"
- PlatformFfs.Sections = map(LoadPlatformFfsSections, XmlList(XmlFfs, XmlTag)) #[PlatformFfsSectionsClass, ...]
-
- for Item in List:
- Name = Item[0]
- Value = Item[1]
- for Item in PlatformFfs.Sections:
- Dict[(Name, Item)] = Value
- PlatformFfs.Attribute = Dict
-
- XmlTag = "Ffs/FfsKey"
- PlatformFfs.Key = XmlAttribute(XmlFfs, XmlTag)
-
- return PlatformFfs
-
-## Load a list of Platform Build Options
-#
-# Read an input Platform XML DOM object and return a list of Build Options
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel PlatformBuildOptions A list of Build Options loaded from XmlFpd
-#
-def LoadPlatformBuildOptions(XmlFpd):
- PlatformBuildOptions = PlatformBuildOptionClass()
-
- PlatformBuildOptions.UserDefinedAntTasks = LoadUserDefinedAntTasks(XmlFpd)
-
- XmlTag = "PlatformSurfaceArea/BuildOptions/Options/Option"
- PlatformBuildOptions.Options = map(LoadBuildOption, XmlList(XmlFpd, XmlTag))
-
- PlatformBuildOptions.UserExtensions = LoadPlatformUserExtension(XmlFpd)
-
- PlatformBuildOptions.FfsKeyList = LoadPlatformFfsDict(XmlFpd)
-
- return PlatformBuildOptions
-
-## Load Platform Pcd Data
-#
-# Read an input Platform XML DOM object and return Platform module class object
-# contained in the DOM object.
-#
-# @param XmlPcd An XML DOM object read from FPD file
-#
-# @retvel PlatformPcdData A Platform Pcd object loaded from XmlFpd
-#
-def LoadPlatformPcdData(XmlPcdData):
- PcdData = PcdClass() # defined in CommonDataClass.CommonClass.py
-
- XmlTag = "ItemType"
- PcdData.ItemType = XmlAttribute(XmlPcdData, XmlTag) #DYNAMIC
-
- XmlTag = "PcdData/C_Name"
- PcdData.C_NAME = XmlElement(XmlPcdData, XmlTag)
-
- XmlTag = "PcdData/Token"
- PcdData.Token = XmlElement(XmlPcdData, XmlTag)
-
- XmlTag = "PcdData/TokenSpaceGuidCName"
- PcdData.TokenSpaceGuidCName = XmlElement(XmlPcdData, XmlTag)
-
- XmlTag = "PcdData/DatumType"
- PcdData.DatumType = XmlElement(XmlPcdData, XmlTag)
-
- XmlTag = "PcdData/MaxDatumSize"
- PcdData.MaxDatumSize = XmlElement(XmlPcdData, XmlTag)
-
- XmlTag = "PcdData/Value"
- PcdData.Value = XmlElement(XmlPcdData, XmlTag)
-
- return PcdData
-
-## Load a Platform Pcd Build Data
-#
-# Read an input Platform XML DOM object and return a list of Pcd Dynamic
-# contained in the DOM object.
-#
-# @param XmlPcdBuildData An XML DOM object read from FPD file
-#
-# @retvel PcdBuildData A Platform Pcd Build Data loaded from XmlFpd
-#
-def LoadPlatformPcdBuildData(XmlPcdBuildData):
- PcdBuildData = PcdClass() # defined in CommonDataClass.CommonClass.py
-
- XmlTag = "ItemType"
- PcdBuildData.ItemType = XmlAttribute(XmlPcdBuildData, XmlTag) #DYNAMIC
-
- XmlTag = "PcdBuildData/C_Name"
- PcdBuildData.C_NAME = XmlElement(XmlPcdBuildData, XmlTag)
-
- XmlTag = "PcdBuildData/Token"
- PcdBuildData.Token = XmlElement(XmlPcdBuildData, XmlTag)
-
- XmlTag = "PcdBuildData/TokenSpaceGuidCName"
- PcdBuildData.TokenSpaceGuidCName = XmlElement(XmlPcdBuildData, XmlTag)
-
- XmlTag = "PcdBuildData/DatumType"
- PcdBuildData.DatumType = XmlElement(XmlPcdBuildData, XmlTag)
-
- XmlTag = "PcdBuildData/MaxDatumSize"
- PcdBuildData.MaxDatumSize = XmlElement(XmlPcdBuildData, XmlTag)
-
- #XmlTag = "PcdBuildData/Value"
- #PcdBuildData.Value = XmlElement(XmlPcdBuildData, XmlTag)
-
- return PcdBuildData
-
-## Load a list of Platform Pcd Dynamic
-#
-# Read an input Platform XML DOM object and return a list of Pcd Dynamic
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel PcdDynamic A list of Pcd Dynamic loaded from XmlFpd
-#
-def LoadDynamicPcdBuildDefinitions(XmlFpd):
- DynamicPcdBuildDefinitions = []
- XmlTag = "PlatformSurfaceArea/DynamicPcdBuildDefinitions/PcdBuildData"
- return map(LoadPlatformPcdBuildData, XmlList(XmlFpd, XmlTag))
-
-## Load a Platform NameValue object
-#
-# Read an input Platform XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlNameValue An XML DOM object read from FPD file
-#
-# @retvel NameValue A Platform NameValue object
-#
-def LoadNameValue(XmlNameValue):
- NameValue = []
-
- XmlTag = "Name"
- Name = XmlAttribute(XmlNameValue, XmlTag)
- NameValue.append(Name)
-
- XmlTag = "Value"
- Value = XmlAttribute(XmlNameValue, XmlTag)
- NameValue.append(Value)
-
- return NameValue
-
-## Load a Platform Fv Image Name object
-#
-# Read an input Platform XML DOM object and return a platform Fv Image
-# Name contained in the DOM object.
-#
-# @param XmlFvImageNames An XML DOM object read from FPD file
-#
-# @retvel FvImageNames A Platform Fv Image Name object
-#
-def LoadFvImageNames(XmlFvImageNames):
- XmlTag = "FvImageNames"
- FvImageNames = XmlElement(XmlFvImageNames, XmlTag)
- return FvImageNames
-
-## Load a Platform Fv Image option object
-#
-# Read an input Platform XML DOM object and return a platform Fv Image
-# Option contained in the DOM object.
-#
-# @param XmlFvImageOptions An XML DOM object read from FPD file
-#
-# @retvel PlatformFvImageOption A Platform Fv Image Option object
-#
-def LoadFvImageOptions(XmlFvImageOptions):
- PlatformFvImageOption = PlatformFvImageOptionClass()
-
- XmlTag = ""
- PlatformFvImageOption.FvImageOptionName = ''
-
- XmlTag = ""
- PlatformFvImageOption.FvImageOptionValues = []
-
- XmlTag = "FvImageOptions/NameValue"
- List = map(LoadNameValue, XmlList(XmlFvImageOptions, XmlTag))
-
- return PlatformFvImageOption
-
-## Load a Platform Fv Image object
-#
-# Read an input Platform XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlFvImage An XML DOM object read from Fpd file
-#
-# @retvel PlatformFvImage A Platform Fv Image object
-#
-def LoadPlatformFvImage(XmlFvImage):
- PlatformFvImage = PlatformFvImageClass()
-
- XmlTag = "Name"
- PlatformFvImage.Name = XmlAttribute(XmlFvImage, XmlTag)
-
- XmlTag = "Value"
- PlatformFvImage.Value = XmlAttribute(XmlFvImage, XmlTag)
-
- XmlTag = "Type"
- PlatformFvImage.Type = XmlAttribute(XmlFvImage, XmlTag)
-
- XmlTag = "FvImage/FvImageNames"
- PlatformFvImage.FvImageNames = map(LoadFvImageNames, XmlList(XmlFvImage, XmlTag))
-
- XmlTag = "FvImage/FvImageOptions"
- PlatformFvImage.FvImageOptions = map(LoadFvImageOptions, XmlList(XmlFvImage, XmlTag))
-
- return PlatformFvImage
-
-## Load a Platform fdf object
-#
-# Read an input Platform XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlFvImages An XML DOM object read from FPD file
-#
-# @retvel PlatformFdf A Platform fdf object
-#
-def LoadPlatformFvImages(XmlFvImages):
- List = []
-
- XmlTag = "FvImages/NameValue"
- NameValues = map(LoadNameValue, XmlList(XmlFvImages, XmlTag))
- List.append(NameValues)
-
- XmlTag = "FvImages/FvImage"
- FvImages = map(LoadPlatformFvImage, XmlList(XmlFvImages, XmlTag))
- List.append(FvImages)
-
- XmlTag = "FvImages/FvImageName"
- FvImageNames = map(LoadPlatformFvImageName, XmlList(XmlFvImages, XmlTag))
- List.append(FvImageNames)
-
- return List
-
-## Load a Platform Fv Image Name object
-#
-# Read an input Platform XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlFvImageName An XML DOM object read from FPD file
-#
-# @retvel PlatformFvImageName A Platform Fv Image Name object
-#
-def LoadPlatformFvImageName(XmlFvImageName):
- PlatformFvImageName = PlatformFvImageNameClass()
-
- XmlTag = "Name"
- PlatformFvImageName.Name = XmlAttribute(XmlFvImageName, XmlTag)
-
- XmlTag = "Type"
- PlatformFvImageName.Type = XmlAttribute(XmlFvImageName, XmlTag)
-
- XmlTag = "FvImageOptions"
- PlatformFvImageName.FvImageOptions = map(LoadFvImageOptions, XmlList(XmlFvImageName, XmlTag))
-
- return PlatformFvImageName
-
-## Load a list of Platform fdf objects
-#
-# Read an input Platform XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel PlatformFdfs A list of Platform fdf object
-#
-def LoadPlatformFdfs(XmlFpd):
- PlatformFvImages = PlatformFvImagesClass()
-
- XmlTag = "PlatformSurfaceArea/Flash/FvImages"
- PlatformFvImages.FvImages = map(LoadPlatformFvImages, XmlList(XmlFpd, XmlTag))
-
- return PlatformFvImages
-
-## Load a Platform User Extensions
-#
-# Read an input Platform XML DOM object and return an User Extension
-# contained in the DOM object.
-#
-# @param XmlUserExtension An XML DOM object read from FPD file
-#
-# @retvel PlatformUserExtensions A platform User Extension loaded from XmlFpd
-#
-def LoadPlatformUserExtension(XmlFpd):
- Dict = {}
-
- PlatformUserExtensions = UserExtensionsClass()
-
- XmlTag = "PlatformSurfaceArea/BuildOptions/UserExtensions"
- List = map(LoadUserExtensions, XmlList(XmlFpd, XmlTag))
- if List != []:
- for Item in List:
- UserID = Item.UserID
- Identifier = Item.Identifier
- Dict[(UserID, Identifier)] = Item
- #XmlTag = "PlatformSurfaceArea/BuildOptions/UserExtensions/UserID"
- #PlatformUserExtensions.UserID = XmlAttribute(XmlFpd, XmlTag)
-
- #XmlTag = "PlatformSurfaceArea/BuildOptions/UserExtensions/Identifier"
- #PlatformUserExtensions.Identifier = XmlAttribute(XmlFpd, XmlTag)
-
- #PlatformUserExtensions.Content = XmlElementData(XmlFpd)
- #Dict[(PlatformUserExtensions.UserID,PlatformUserExtensions.Identifier)] = PlatformUserExtensions
- #return PlatformUserExtensions
- return Dict
-
-## Load a list of Platform User Extensions
-#
-# Read an input Platform XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlFpd An XML DOM object read from FPD file
-#
-# @retvel UserExtensions A list of platform User Extensions loaded from XmlFpd
-#
-def LoadPlatformUserExtensions(XmlFpd):
- XmlTag = "PlatformSurfaceArea/UserExtensions"
- return map(LoadUserExtensions, XmlList(XmlFpd, XmlTag)) # from MigrationUtilities.py LoadUserExtensions
-
-## Load a new Platform class object
-#
-# Read an input FPD File and return a new Platform class Object.
-#
-# @param FpdFileName An XML DOM object read from FPD file
-#
-# @retvel Platform A new Platform class object loaded from FPD File
-#
-def LoadFpd(FpdFileName):
- XmlFpd = XmlParseFile(FpdFileName)
- EdkLogger.verbose("Load FPD File: %s" % FpdFileName)
-
- Platform = PlatformClass()
- Platform.Header = LoadPlatformHeader(XmlFpd, FpdFileName)
- Platform.SkuInfos = LoadPlatformSkuInfos(XmlFpd)
- Platform.Libraries = [] #New in dsc spec, do not handle for now
- Platform.LibraryClasses = LoadPlatformLibraryClasses(XmlFpd)
- Platform.Modules = LoadPlatformModules(XmlFpd)
- Platform.FlashDefinitionFile = LoadPlatformFlashDefinitionFile(XmlFpd, FpdFileName)
- Platform.BuildOptions = LoadPlatformBuildOptions(XmlFpd)
- Platform.DynamicPcdBuildDefinitions = LoadDynamicPcdBuildDefinitions(XmlFpd)
- Platform.Fdf = LoadPlatformFdfs(XmlFpd)
- Platform.UserExtensions = LoadPlatformUserExtensions(XmlFpd)
-
- return Platform
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- pass \ No newline at end of file
diff --git a/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py b/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py
deleted file mode 100644
index 8e360b9b5b..0000000000
--- a/BaseTools/Source/Python/fpd2dsc/MigrationUtilities.py
+++ /dev/null
@@ -1,563 +0,0 @@
-## @file
-# Contains several utilitities shared by migration tools.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-import re
-import EdkLogger
-from optparse import OptionParser
-from Common.BuildToolError import *
-from XmlRoutines import *
-from CommonDataClass.CommonClass import *
-
-## Set all fields of CommonClass object.
-#
-# Set all attributes of CommonClass object from XML Dom object of XmlCommon.
-#
-# @param Common The destine CommonClass object.
-# @param XmlCommon The source XML Dom object.
-#
-def SetCommon(Common, XmlCommon):
- XmlTag = "Usage"
- Common.Usage = XmlAttribute(XmlCommon, XmlTag).split()
-
- XmlTag = "FeatureFlag"
- Common.FeatureFlag = XmlAttribute(XmlCommon, XmlTag)
-
- XmlTag = "SupArchList"
- Common.SupArchList = XmlAttribute(XmlCommon, XmlTag).split()
-
- XmlTag = XmlNodeName(XmlCommon) + "/" + "HelpText"
- Common.HelpText = XmlElement(XmlCommon, XmlTag)
-
-
-## Set some fields of CommonHeaderClass object.
-#
-# Set Name, Guid, FileName and FullPath fields of CommonHeaderClass object from
-# XML Dom object of XmlCommonHeader, NameTag and FileName.
-#
-# @param CommonHeader The destine CommonClass object.
-# @param XmlCommonHeader The source XML Dom object.
-# @param NameTag The name tag in XML Dom object.
-# @param FileName The file name of the XML file.
-#
-def SetIdentification(CommonHeader, XmlCommonHeader, NameTag, FileName):
- XmlParentTag = XmlNodeName(XmlCommonHeader)
-
- XmlTag = XmlParentTag + "/" + NameTag
- CommonHeader.Name = XmlElement(XmlCommonHeader, XmlTag)
-
- XmlTag = XmlParentTag + "/" + "GuidValue"
- CommonHeader.Guid = XmlElement(XmlCommonHeader, XmlTag)
-
- XmlTag = XmlParentTag + "/" + "Version"
- CommonHeader.Version = XmlElement(XmlCommonHeader, XmlTag)
-
- CommonHeader.FileName = os.path.basename(FileName)
- CommonHeader.FullPath = os.path.abspath(FileName)
-
-
-## Regular expression to match specification and value.
-mReSpecification = re.compile(r"(?P<Specification>\w+)\s+(?P<Value>\w*)")
-
-## Add specification to specification dictionary.
-#
-# Abstract specification name, value pair from Specification String and add them
-# to specification dictionary.
-#
-# @param SpecificationDict The destine Specification dictionary.
-# @param SpecificationString The source Specification String from which the
-# specification name and value pair is abstracted.
-#
-def AddToSpecificationDict(SpecificationDict, SpecificationString):
- """Abstract specification name, value pair from Specification String"""
- for SpecificationMatch in mReSpecification.finditer(SpecificationString):
- Specification = SpecificationMatch.group("Specification")
- Value = SpecificationMatch.group("Value")
- SpecificationDict[Specification] = Value
-
-## Set all fields of CommonHeaderClass object.
-#
-# Set all attributes of CommonHeaderClass object from XML Dom object of
-# XmlCommonHeader, NameTag and FileName.
-#
-# @param CommonHeader The destine CommonClass object.
-# @param XmlCommonHeader The source XML Dom object.
-# @param NameTag The name tag in XML Dom object.
-# @param FileName The file name of the XML file.
-#
-def SetCommonHeader(CommonHeader, XmlCommonHeader):
- """Set all attributes of CommonHeaderClass object from XmlCommonHeader"""
- XmlParent = XmlNodeName(XmlCommonHeader)
-
- XmlTag = XmlParent + "/" + "Abstract"
- CommonHeader.Abstract = XmlElement(XmlCommonHeader, XmlTag)
-
- XmlTag = XmlParent + "/" + "Description"
- CommonHeader.Description = XmlElement(XmlCommonHeader, XmlTag)
-
- XmlTag = XmlParent + "/" + "Copyright"
- CommonHeader.Copyright = XmlElement(XmlCommonHeader, XmlTag)
-
- XmlTag = XmlParent + "/" + "License"
- CommonHeader.License = XmlElement(XmlCommonHeader, XmlTag)
-
- XmlTag = XmlParent + "/" + "Specification"
- Specification = XmlElement(XmlCommonHeader, XmlTag)
-
- AddToSpecificationDict(CommonHeader.Specification, Specification)
-
- XmlTag = XmlParent + "/" + "ModuleType"
- CommonHeader.ModuleType = XmlElement(XmlCommonHeader, XmlTag)
-
-
-## Load a new Cloned Record class object.
-#
-# Read an input XML ClonedRecord DOM object and return an object of Cloned Record
-# contained in the DOM object.
-#
-# @param XmlCloned A child XML DOM object in a Common XML DOM.
-#
-# @retvel ClonedRecord A new Cloned Record object created by XmlCloned.
-#
-def LoadClonedRecord(XmlCloned):
- ClonedRecord = ClonedRecordClass()
-
- XmlTag = "Id"
- ClonedRecord.Id = int(XmlAttribute(XmlCloned, XmlTag))
-
- XmlTag = "FarGuid"
- ClonedRecord.FarGuid = XmlAttribute(XmlCloned, XmlTag)
-
- XmlTag = "Cloned/PackageGuid"
- ClonedRecord.PackageGuid = XmlElement(XmlCloned, XmlTag)
-
- XmlTag = "Cloned/PackageVersion"
- ClonedRecord.PackageVersion = XmlElement(XmlCloned, XmlTag)
-
- XmlTag = "Cloned/ModuleGuid"
- ClonedRecord.ModuleGuid = XmlElement(XmlCloned, XmlTag)
-
- XmlTag = "Cloned/ModuleVersion"
- ClonedRecord.ModuleVersion = XmlElement(XmlCloned, XmlTag)
-
- return ClonedRecord
-
-
-## Load a new Guid/Protocol/Ppi common class object.
-#
-# Read an input XML Guid/Protocol/Ppi DOM object and return an object of
-# Guid/Protocol/Ppi contained in the DOM object.
-#
-# @param XmlGuidProtocolPpiCommon A child XML DOM object in a Common XML DOM.
-#
-# @retvel GuidProtocolPpiCommon A new GuidProtocolPpiCommon class object
-# created by XmlGuidProtocolPpiCommon.
-#
-def LoadGuidProtocolPpiCommon(XmlGuidProtocolPpiCommon):
- GuidProtocolPpiCommon = GuidProtocolPpiCommonClass()
-
- XmlTag = "Name"
- GuidProtocolPpiCommon.Name = XmlAttribute(XmlGuidProtocolPpiCommon, XmlTag)
-
- XmlParent = XmlNodeName(XmlGuidProtocolPpiCommon)
- if XmlParent == "Entry":
- XmlTag = "%s/C_Name" % XmlParent
- elif XmlParent == "GuidCNames":
- XmlTag = "%s/GuidCName" % XmlParent
- else:
- XmlTag = "%s/%sCName" % (XmlParent, XmlParent)
-
- GuidProtocolPpiCommon.CName = XmlElement(XmlGuidProtocolPpiCommon, XmlTag)
-
- XmlTag = XmlParent + "/" + "GuidValue"
- GuidProtocolPpiCommon.Guid = XmlElement(XmlGuidProtocolPpiCommon, XmlTag)
-
- if XmlParent.endswith("Notify"):
- GuidProtocolPpiCommon.Notify = True
-
- XmlTag = "GuidTypeList"
- GuidTypes = XmlAttribute(XmlGuidProtocolPpiCommon, XmlTag)
- GuidProtocolPpiCommon.GuidTypeList = GuidTypes.split()
-
- XmlTag = "SupModuleList"
- SupModules = XmlAttribute(XmlGuidProtocolPpiCommon, XmlTag)
- GuidProtocolPpiCommon.SupModuleList = SupModules.split()
-
- SetCommon(GuidProtocolPpiCommon, XmlGuidProtocolPpiCommon)
-
- return GuidProtocolPpiCommon
-
-
-## Load a new Pcd class object.
-#
-# Read an input XML Pcd DOM object and return an object of Pcd
-# contained in the DOM object.
-#
-# @param XmlPcd A child XML DOM object in a Common XML DOM.
-#
-# @retvel Pcd A new Pcd object created by XmlPcd.
-#
-def LoadPcd(XmlPcd):
- """Return a new PcdClass object equivalent to XmlPcd"""
- Pcd = PcdClass()
-
- XmlTag = "PcdEntry/C_Name"
- Pcd.CName = XmlElement(XmlPcd, XmlTag)
-
- XmlTag = "PcdEntry/Token"
- Pcd.Token = XmlElement(XmlPcd, XmlTag)
-
- XmlTag = "PcdEntry/TokenSpaceGuidCName"
- Pcd.TokenSpaceGuidCName = XmlElement(XmlPcd, XmlTag)
-
- XmlTag = "PcdEntry/DatumType"
- Pcd.DatumType = XmlElement(XmlPcd, XmlTag)
-
- XmlTag = "PcdEntry/MaxDatumSize"
- Pcd.MaxDatumSize = XmlElement(XmlPcd, XmlTag)
-
- XmlTag = "PcdEntry/DefaultValue"
- Pcd.DefaultValue = XmlElement(XmlPcd, XmlTag)
-
- XmlTag = "PcdItemType"
- Pcd.ItemType = XmlAttribute(XmlPcd, XmlTag)
-
- XmlTag = "PcdEntry/ValidUsage"
- Pcd.ValidUsage = XmlElement(XmlPcd, XmlTag).split()
-
- XmlTag = "SupModuleList"
- Pcd.SupModuleList = XmlAttribute(XmlPcd, XmlTag).split()
-
- SetCommon(Pcd, XmlPcd)
-
- return Pcd
-
-
-## Load a new LibraryClass class object.
-#
-# Read an input XML LibraryClass DOM object and return an object of LibraryClass
-# contained in the DOM object.
-#
-# @param XmlLibraryClass A child XML DOM object in a Common XML DOM.
-#
-# @retvel LibraryClass A new LibraryClass object created by XmlLibraryClass.
-#
-def LoadLibraryClass(XmlLibraryClass):
- LibraryClass = LibraryClassClass()
-
- XmlTag = "LibraryClass/Keyword"
- LibraryClass.LibraryClass = XmlElement(XmlLibraryClass, XmlTag)
- if LibraryClass.LibraryClass == "":
- XmlTag = "Name"
- LibraryClass.LibraryClass = XmlAttribute(XmlLibraryClass, XmlTag)
-
- XmlTag = "LibraryClass/IncludeHeader"
- LibraryClass.IncludeHeader = XmlElement(XmlLibraryClass, XmlTag)
-
- XmlTag = "RecommendedInstanceVersion"
- RecommendedInstanceVersion = XmlAttribute(XmlLibraryClass, XmlTag)
- LibraryClass.RecommendedInstanceVersion = RecommendedInstanceVersion
-
- XmlTag = "RecommendedInstanceGuid"
- RecommendedInstanceGuid = XmlAttribute(XmlLibraryClass, XmlTag)
- LibraryClass.RecommendedInstanceGuid = RecommendedInstanceGuid
-
- XmlTag = "SupModuleList"
- SupModules = XmlAttribute(XmlLibraryClass, XmlTag)
- LibraryClass.SupModuleList = SupModules.split()
-
- SetCommon(LibraryClass, XmlLibraryClass)
-
- return LibraryClass
-
-
-## Load a new Build Option class object.
-#
-# Read an input XML BuildOption DOM object and return an object of Build Option
-# contained in the DOM object.
-#
-# @param XmlBuildOption A child XML DOM object in a Common XML DOM.
-#
-# @retvel BuildOption A new Build Option object created by XmlBuildOption.
-#
-def LoadBuildOption(XmlBuildOption):
- """Return a new BuildOptionClass object equivalent to XmlBuildOption"""
- BuildOption = BuildOptionClass()
-
- BuildOption.Option = XmlElementData(XmlBuildOption)
-
- XmlTag = "BuildTargets"
- BuildOption.BuildTargetList = XmlAttribute(XmlBuildOption, XmlTag).split()
-
- XmlTag = "ToolChainFamily"
- BuildOption.ToolChainFamily = XmlAttribute(XmlBuildOption, XmlTag)
-
- XmlTag = "TagName"
- BuildOption.TagName = XmlAttribute(XmlBuildOption, XmlTag)
-
- XmlTag = "ToolCode"
- BuildOption.ToolCode = XmlAttribute(XmlBuildOption, XmlTag)
-
- XmlTag = "SupArchList"
- BuildOption.SupArchList = XmlAttribute(XmlBuildOption, XmlTag).split()
-
- return BuildOption
-
-
-## Load a new User Extensions class object.
-#
-# Read an input XML UserExtensions DOM object and return an object of User
-# Extensions contained in the DOM object.
-#
-# @param XmlUserExtensions A child XML DOM object in a Common XML DOM.
-#
-# @retvel UserExtensions A new User Extensions object created by
-# XmlUserExtensions.
-#
-def LoadUserExtensions(XmlUserExtensions):
- UserExtensions = UserExtensionsClass()
-
- XmlTag = "UserId"
- UserExtensions.UserID = XmlAttribute(XmlUserExtensions, XmlTag)
-
- XmlTag = "Identifier"
- UserExtensions.Identifier = XmlAttribute(XmlUserExtensions, XmlTag)
-
- UserExtensions.Content = XmlElementData(XmlUserExtensions)
-
- return UserExtensions
-
-
-## Store content to a text file object.
-#
-# Write some text file content to a text file object. The contents may echo
-# in screen in a verbose way.
-#
-# @param TextFile The text file object.
-# @param Content The string object to be written to a text file.
-#
-def StoreTextFile(TextFile, Content):
- EdkLogger.verbose(Content)
- TextFile.write(Content)
-
-
-## Add item to a section.
-#
-# Add an Item with specific CPU architecture to section dictionary.
-# The possible duplication is ensured to be removed.
-#
-# @param Section Section dictionary indexed by CPU architecture.
-# @param Arch CPU architecture: Ia32, X64, Ipf, Ebc or Common.
-# @param Item The Item to be added to section dictionary.
-#
-def AddToSection(Section, Arch, Item):
- SectionArch = Section.get(Arch, [])
- if Item not in SectionArch:
- SectionArch.append(Item)
- Section[Arch] = SectionArch
-
-
-## Get section contents.
-#
-# Return the content of section named SectionName.
-# the contents is based on Methods and ObjectLists.
-#
-# @param SectionName The name of the section.
-# @param Method A function returning a string item of an object.
-# @param ObjectList The list of object.
-#
-# @retval Section The string content of a section.
-#
-def GetSection(SectionName, Method, ObjectList):
- SupportedArches = ["common", "Ia32", "X64", "Ipf", "Ebc"]
- SectionDict = {}
- for Object in ObjectList:
- Item = Method(Object)
- if Item == "":
- continue
- Item = " %s" % Item
- Arches = Object.SupArchList
- if len(Arches) == 0:
- AddToSection(SectionDict, "common", Item)
- else:
- for Arch in SupportedArches:
- if Arch.upper() in Arches:
- AddToSection(SectionDict, Arch, Item)
-
- Section = ""
- for Arch in SupportedArches:
- SectionArch = "\n".join(SectionDict.get(Arch, []))
- if SectionArch != "":
- Section += "[%s.%s]\n%s\n" % (SectionName, Arch, SectionArch)
- Section += "\n"
- if Section != "":
- Section += "\n"
- return Section
-
-
-## Store file header to a text file.
-#
-# Write standard file header to a text file. The content includes copyright,
-# abstract, description and license extracted from CommonHeader class object.
-#
-# @param TextFile The text file object.
-# @param CommonHeader The source CommonHeader class object.
-#
-def StoreHeader(TextFile, CommonHeader):
- CopyRight = CommonHeader.Copyright
- Abstract = CommonHeader.Abstract
- Description = CommonHeader.Description
- License = CommonHeader.License
-
- Header = "#/** @file\n#\n"
- Header += "# " + Abstract + "\n#\n"
- Header += "# " + Description.strip().replace("\n", "\n# ") + "\n"
- Header += "# " + CopyRight + "\n#\n"
- Header += "# " + License.replace("\n", "\n# ").replace(" ", " ")
- Header += "\n#\n#**/\n\n"
-
- StoreTextFile(TextFile, Header)
-
-## Store file header to a text file.
-#
-# Write Defines section to a text file. DefinesTupleList determines the content.
-#
-# @param TextFile The text file object.
-# @param DefinesTupleList The list of (Tag, Value) to be added as one item.
-#
-def StoreDefinesSection(TextFile, DefinesTupleList):
- Section = "[Defines]\n"
- for DefineItem in DefinesTupleList:
- Section += " %-30s = %s\n" % DefineItem
-
- Section += "\n\n"
- StoreTextFile(TextFile, Section)
-
-
-## Add item to PCD dictionary.
-#
-# Add an PcdClass object to PCD dictionary. The key is generated from
-# PcdItemType.
-#
-# @param PcdDict PCD dictionary indexed by Pcd Item Type.
-# @param Arch CPU architecture: Ia32, X64, Ipf, Ebc or Common.
-# @param Item The Item to be added to section dictionary.
-#
-def AddToPcdsDict(PcdDict, PcdItemType, PcdCode):
- PcdSectionName = PcdItemType
- PcdSectionName = PcdSectionName.title()
- PcdSectionName = PcdSectionName.replace("_", "")
- PcdSectionName = "Pcds" + PcdSectionName
- PcdDict.setdefault(PcdSectionName, []).append(PcdCode)
-
-## Regular expression to match an equation.
-mReEquation = re.compile(r"\s*(\S+)\s*=\s*(\S*)\s*")
-
-## Return a value tuple matching information in a text fle.
-#
-# Parse the text file and return a value tuple corresponding to an input tag
-# tuple. In case of any error, an tuple of empty strings is returned.
-#
-# @param FileName The file name of the text file.
-# @param TagTuple A tuple of tags as the key to the value.
-#
-# @param ValueTupe The returned tuple corresponding to the tag tuple.
-#
-def GetTextFileInfo(FileName, TagTuple):
- ValueTuple = [""] * len(TagTuple)
- try:
- for Line in open(FileName):
- Line = Line.split("#", 1)[0]
- MatchEquation = mReEquation.match(Line)
- if MatchEquation:
- Tag = MatchEquation.group(1).upper()
- Value = MatchEquation.group(2)
- for Index in range(len(TagTuple)):
- if TagTuple[Index] == Tag:
- ValueTuple[Index] = Value
- except:
- EdkLogger.info("IO Error in reading file %s" % FileName)
-
- return ValueTuple
-
-## Return a value tuple matching information in an XML fle.
-#
-# Parse the XML file and return a value tuple corresponding to an input tag
-# tuple. In case of any error, an tuple of empty strings is returned.
-#
-# @param FileName The file name of the XML file.
-# @param TagTuple A tuple of tags as the key to the value.
-#
-# @param ValueTupe The returned tuple corresponding to the tag tuple.
-#
-def GetXmlFileInfo(FileName, TagTuple):
- XmlDom = XmlParseFile(FileName)
- return tuple([XmlElement(XmlDom, XmlTag) for XmlTag in TagTuple])
-
-# Version and Copyright
-__version_number__ = "1.0"
-__version__ = "%prog Version " + __version_number__
-__copyright__ = "Copyright (c) 2007, Intel Corporation. All rights reserved."
-
-## Parse migration command line options
-#
-# Use standard Python module optparse to parse command line option of this tool.
-#
-# @param Source The source file type.
-# @param Destinate The destinate file type.
-#
-# @retval Options A optparse object containing the parsed options.
-# @retval InputFile Path of an source file to be migrated.
-#
-def MigrationOptionParser(Source, Destinate):
- # use clearer usage to override default usage message
- UsageString = "%prog [-a] [-o <output_file>] <input_file>"
-
- Parser = OptionParser(description=__copyright__, version=__version__, usage=UsageString)
-
- HelpText = "The name of the %s file to be created." % Destinate
- Parser.add_option("-o", "--output", dest="OutputFile", help=HelpText)
-
- HelpText = "Automatically create the %s file using the name of the %s file and replacing file extension" % (Source, Destinate)
- Parser.add_option("-a", "--auto", dest="AutoWrite", action="store_true", default=False, help=HelpText)
-
- Options, Args = Parser.parse_args()
-
- # error check
- if len(Args) == 0:
- raise MigrationError(OPTION_MISSING, name="Input file", usage=Parser.get_usage())
- if len(Args) > 1:
- raise MigrationError(OPTION_NOT_SUPPORTED, name="Too many input files", usage=Parser.get_usage())
-
- InputFile = Args[0]
- if not os.path.exists(InputFile):
- raise MigrationError(FILE_NOT_FOUND, name=InputFile)
-
- if Options.OutputFile:
- if Options.AutoWrite:
- raise MigrationError(OPTION_CONFLICT, arg1="-o", arg2="-a", usage=Parser.get_usage())
- else:
- if Options.AutoWrite:
- Options.OutputFile = os.path.splitext(InputFile)[0] + "." + Destinate.lower()
- else:
- raise MigrationError(OPTION_MISSING, name="-o", usage=Parser.get_usage())
-
- return Options, InputFile
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- pass
diff --git a/BaseTools/Source/Python/fpd2dsc/StoreDsc.py b/BaseTools/Source/Python/fpd2dsc/StoreDsc.py
deleted file mode 100644
index f8123a2f97..0000000000
--- a/BaseTools/Source/Python/fpd2dsc/StoreDsc.py
+++ /dev/null
@@ -1,765 +0,0 @@
-## @file
-# Store a Platform class object to an INF file.
-#
-# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-from LoadFpd import LoadFpd
-from CommonDataClass.PlatformClass import *
-from CommonDataClass.FdfClass import *
-from Common.MigrationUtilities import *
-from Common.ToolDefClassObject import *
-from Common.TargetTxtClassObject import *
-
-## Store Defines section
-#
-# Write [Defines] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Defines section
-# @param Platform An input Platform class object
-#
-def StorePlatformDefinesSection(DscFile, Platform):
- PlatformHeader = Platform.Header
-
- DefinesTupleList = []
-
- if PlatformHeader.Name != "":
- DefinesTupleList.append(("PLATFORM_NAME", PlatformHeader.Name))
-
- if PlatformHeader.Guid != "":
- DefinesTupleList.append(("PLATFORM_GUID", PlatformHeader.Guid))
-
- if PlatformHeader.Version != "":
- DefinesTupleList.append(("PLATFORM_VERSION", PlatformHeader.Version))
- for key in PlatformHeader.Specification.keys():
- SpecificationValue = PlatformHeader.Specification.get(key)
- DefinesTupleList.append(("DSC_ SPECIFICATION", SpecificationValue))
-
- if PlatformHeader.OutputDirectory != "":
- DefinesTupleList.append(("OUTPUT_DIRECTORY", PlatformHeader.OutputDirectory))
-
- if PlatformHeader.SupArchList != "":
- String = "|".join(PlatformHeader.SupArchList)
- DefinesTupleList.append(("SUPPORTED_ARCHITECTURES", String))
-
- if PlatformHeader.BuildTargets != "":
- String = "|".join(PlatformHeader.BuildTargets)
- DefinesTupleList.append(("BUILD_TARGETS", String))
-
- if PlatformHeader.SkuIdName != "":
- #DefinesTupleList.append(("SKUID_IDENTIFIER", PlatformHeader.SkuIdName))
- String = "|".join(PlatformHeader.SkuIdName)
- if String != "":
- DefinesTupleList.append(("SKUID_IDENTIFIER", String))
-
- String = Platform.FlashDefinitionFile.FilePath
- if String != "":
- DefinesTupleList.append(("FLASH_DEFINITION", String))
-
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Defines Section - statements that will be processed to create a Makefile.")
- List.append("#")
- List.append("################################################################################")
- Section = "\n".join(List)
- Section += "\n"
- StoreTextFile(DscFile, Section)
-
- StoreDefinesSection(DscFile, DefinesTupleList)
-
-## Store SkuIds section
-#
-# Write [SkuIds] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Library Classes section
-# @param Platform An input Platform class object
-#
-def StorePlatformSkuIdsSection(DscFile, Platform):
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# SKU Identification section - list of all SKU IDs supported by this Platform.")
- List.append("#")
- List.append("################################################################################")
- Section = "\n".join(List)
- Section += "\n"
-
- Section += "[SkuIds]" + '\n'
-
- List = Platform.SkuInfos.SkuInfoList
- for Item in List:
- Section = Section + "%s" % Item[0] + '|' + "%s" % Item[1] + '\n'
- Section = Section + '\n'
-
- StoreTextFile(DscFile, Section)
-
-## Store Build Options section
-#
-# Write [BuildOptions] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Build Options section
-# @param Platform An input Platform class object
-#
-def StorePlatformBuildOptionsSection(DscFile, Platform):
- # which is from tools_def.txt
- StandardBuildTargets = ["DEBUG", "RELEASE"]
- SupportedArches = ["COMMON", "IA32", "X64", "IPF", "EBC", "ARM"]
- Target = TargetTxtClassObject()
- WorkSpace = os.getenv('WORKSPACE')
- Target.LoadTargetTxtFile(WorkSpace + '\\Conf\\target.txt')
- ToolDef = ToolDefClassObject()
- ToolDef.LoadToolDefFile(WorkSpace + '\\' + Target.TargetTxtDictionary[DataType.TAB_TAT_DEFINES_TOOL_CHAIN_CONF])
- # Now we have got ToolDef object
- #ToolDef.ToolsDefTxtDictionary
- Dict = ToolDef.ToolsDefTxtDatabase
-
- Dict1 = ToolDef.ToolsDefTxtDictionary # we care the info in this Dict
- #
- # We only support *(DEBUG/RELEASE) and *(All Arch: IA32, X64, IPF and EBC) for now
- #
- SectionWINDDK = ''
- SectionVS2003 = ''
- SectionVS2005EXP = ''
- SectionVS2005STD = ''
- SectionVS2005PRO = ''
- SectionVS2005TEAMSUITE = ''
- SectionUNIXGCC = ''
- SectionCYGWINGCC = ''
- SectionELFGCC = ''
- SectionICC = ''
- SectionMYTOOLS = ''
- for key in Dict1.keys():
- if key.find("_CC_FLAGS") != -1:
- if key.find('WINDDK3790x1830') != -1:
- SectionWINDDK = " = " + Dict1.get(key) + "\n"
- elif key.find('VS2003') != -1:
- SectionVS2003 = " = " + Dict1.get(key)+ "\n"
- elif key.find('VS2005EXP') != -1:
- SectionVS2005EXP = " = " + Dict1.get(key) + "\n"
- elif key.find('VS2005STD') != -1:
- SectionVS2005STD = " = " + Dict1.get(key) + "\n"
- elif key.find('VS2005PRO') != -1:
- SectionVS2005PRO = " = " + Dict1.get(key) + "\n"
- elif key.find('VS2005TEAMSUITE') != -1:
- SectionVS2005TEAMSUITE = " = " + Dict1.get(key) + "\n"
- elif key.find('UNIXGCC') != -1:
- SectionUNIXGCC = " = " + Dict1.get(key) + "\n"
- elif key.find('CYGWINGCC') != -1:
- SectionCYGWINGCC = " = " + Dict1.get(key) + "\n"
- elif key.find('ELFGCC') != -1:
- SectionELFGCC = " = " + Dict1.get(key) + "\n"
- elif key.find('ICC') != -1:
- SectionICC = " = " + Dict1.get(key) + "\n"
- elif key.find('MYTOOLS') != -1:
- SectionMYTOOLS = " = " + Dict1.get(key) + "\n"
- else:
- print "Error!"
-
- #
- # First need to check which arch
- #
- Archs = Platform.Header.SupArchList
- BuildTargets = Platform.Header.BuildTargets
- #if BuildTargets == StandardBuildTargets:
- #print "Debug and Release both support" # skip debug/release string search
- #else:
- #print "need to search debug/release string"
-
- if len(Archs) == 4:
- Arch = "*"
- SectionName = "[BuildOptions.Common]\n"
- else:
- for Arch in Archs:
- if Arch == 'IA32':
- SectionName = "[BuildOptions.IA32]\n"
- elif Arch == 'X64':
- SectionName = "[BuildOptions.X64]\n"
- elif Arch == 'IPF':
- SectionName = "[BuildOptions.IPF]\n"
- elif Arch == 'EBC':
- SectionName = "[BuildOptions.EBC]\n"
- else:
- print 'Error!'
- Section = ""
- if SectionWINDDK != "":
- SectionWINDDK = "*_WINDDK3790x1830_" + Arch + "_CC_FLAGS" + SectionWINDDK
- Section += SectionWINDDK
- if SectionVS2003 != "":
- SectionVS2003 = "*_VS2003_" + Arch + "_CC_FLAGS" + SectionVS2003
- Section += SectionVS2003
- if SectionVS2005EXP != "":
- SectionVS2005EXP = "*_VS2005EXP_" + Arch + "_CC_FLAGS" + SectionVS2005EXP
- Section += SectionVS2005EXP
- if SectionVS2005STD != "":
- SectionVS2005STD = "*_VS2005STD_" + Arch + "_CC_FLAGS" + SectionVS2005STD
- Section += SectionVS2005STD
- if SectionVS2005PRO != "":
- SectionVS2005PRO = "*_VS2005PRO_" + Arch + "_CC_FLAGS" + SectionVS2005PRO
- Section += SectionVS2005PRO
- if SectionVS2005TEAMSUITE != "":
- SectionVS2005TEAMSUITE = "*_VS2005TEAMSUITE_" + Arch + "_CC_FLAGS" + SectionVS2005TEAMSUITE
- Section += SectionVS2005TEAMSUITE
- if SectionUNIXGCC != "":
- SectionUNIXGCC = "*_UNIXGCC_" + Arch + "_CC_FLAGS" + SectionUNIXGCC
- Section += SectionUNIXGCC
- if SectionCYGWINGCC != "":
- SectionCYGWINGCC = "*_CYGWINGCC_" + Arch + "_CC_FLAGS" + SectionCYGWINGCC
- Section += SectionCYGWINGCC
- if SectionELFGCC != "":
- SectionELFGCC = "*_ELFGCC_" + Arch + "_CC_FLAGS" + SectionELFGCC
- Section += SectionELFGCC
- if SectionICC != "":
- SectionICC = "*_ICC_" + Arch + "_CC_FLAGS" + SectionICC
- Section += SectionICC
- if SectionMYTOOLS != "":
- SectionMYTOOLS = "*_MYTOOLS_" + Arch + "_CC_FLAGS" + SectionMYTOOLS
- Section += SectionMYTOOLS
-
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Build Options section - list of all Build Options supported by this Platform.")
- List.append("#")
- List.append("################################################################################")
- SectionHeader = "\n".join(List)
- SectionHeader += "\n"
-
- Section = SectionHeader + SectionName + Section
- Section += "\n"
- StoreTextFile(DscFile, Section)
-
-## Store Libraries section
-#
-# Write [Libraries] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Library Classes section
-# @param Platform An input Platform class object
-#
-def StorePlatformLibrariesSection(DscFile,Platform):
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Libraries section - list of all Libraries needed by this Platform.")
- List.append("#")
- List.append("################################################################################")
- SectionHeader = "\n".join(List)
- SectionHeader += "\n"
-
- Section = SectionHeader + '[Libraries]\n\n'
- StoreTextFile(DscFile, Section)
-
-## Return a Platform Library Class Item
-#
-# Read the input LibraryClass class object and return one line of Library Class Item.
-#
-# @param LibraryClass An input LibraryClass class object
-#
-# @retval LibraryClassItem A Module Library Class Item
-#
-def GetPlatformLibraryClassItem(LibraryClass):
- LibraryClassList = []
- LibraryClassList.append(LibraryClass.Name)
- LibraryClassList.append(LibraryClass.FilePath)
-
- return "|$(WORKSPACE)/".join(LibraryClassList).rstrip("|")
-
-## Add item to a LibraryClass section
-#
-# Add an Item with specific Module Type to section dictionary.
-# The possible duplication is ensured to be removed.
-#
-# @param Section Section dictionary indexed by CPU architecture
-# @param SupModuleList LibraryClass SupModuleList: BASE, SEC, PEI_CORE, PEIM, etc
-# @param Item The Item to be added to section dictionary
-#
-def AddToLibraryClassSection(Section, SupModuleList, Item):
- for ModuleType in SupModuleList:
- SectionModule = Section.get(ModuleType, [])
- if Item not in SectionModule:
- SectionModule.append(Item)
- Section[ModuleType] = SectionModule
-
-## Get Library Classes section contents
-#
-# Return the content of section named SectionName.
-# the contents is based on Methods and ObjectLists.
-#
-# @param SectionName The name of the section
-# @param Method A function returning a string item of an object
-# @param ObjectList The list of object
-#
-# @retval Section The string content of a section
-#
-def GetLibraryClassesSection(SectionName, Method, ObjectList):
- SupportedArches = ["COMMON", "IA32", "X64", "IPF", "EBC"]
- ModuleTypes = ["BASE","SEC","PEI_CORE","PEIM","DXE_CORE","DXE_DRIVER","DXE_SMM_DRIVER","DXE_SAL_DRIVER","DXE_RUNTIME_DRIVER","UEFI_DRIVER","UEFI_APPLICATION"]
- SectionCommonDict = {}
- SectionIA32Dict = {}
- SectionX64Dict = {}
- SectionIPFDict = {}
- SectionEBCDict = {}
- #ObjectList = list(set(ObjectList)) # delete the same element in the list
- for Object in ObjectList:
- if Object == None:
- continue
- Item = Method(Object)
- if Item == "":
- continue
- Item = " %s" % Item
- Arches = Object.SupArchList
- if len(Arches) == 4:
- ModuleType = Object.ModuleType
- # [LibraryClasses.Common.ModuleType]
- if ModuleType == "BASE":
- SupModuleList = ["BASE"]
- AddToLibraryClassSection(SectionCommonDict, SupModuleList, Item)
- else:
- #
- SupModuleList = Object.SupModuleList
- #AddToSection(SectionDict, "|".join(SupModuleList), Item)
- AddToLibraryClassSection(SectionCommonDict, SupModuleList, Item)
- else:
- # Arch
- for Arch in SupportedArches:
- if Arch.upper() in Arches:
- if Arch == "IA32":
- # [LibraryClasses.IA32.ModuleType]
- ModuleType = Object.ModuleType
- if ModuleType == "BASE":
- SupModuleList = ["BASE"]
- AddToLibraryClassSection(SectionIA32Dict, SupModuleList, Item)
- else:
- SupModuleList = Object.SupModuleList
- AddToLibraryClassSection(SectionIA32Dict, SupModuleList, Item)
- elif Arch == "X64":
- # [LibraryClasses.X64.ModuleType]
- ModuleType = Object.ModuleType
- if ModuleType == "BASE":
- SupModuleList = ["BASE"]
- AddToLibraryClassSection(SectionX64Dict, SupModuleList, Item)
- else:
- SupModuleList = Object.SupModuleList
- AddToLibraryClassSection(SectionX64Dict, SupModuleList, Item)
- elif Arch == "IPF":
- # [LibraryClasses.IPF.ModuleType]
- ModuleType = Object.ModuleType
- if ModuleType == "BASE":
- SupModuleList = ["BASE"]
- AddToLibraryClassSection(SectionIPFDict, SupModuleList, Item)
- else:
- SupModuleList = Object.SupModuleList
- AddToLibraryClassSection(SectionIPFDict, SupModuleList, Item)
- elif Arch == "EBC":
- # [LibraryClasses.EBC.ModuleType]
- ModuleType = Object.ModuleType
- if ModuleType == "BASE":
- SupModuleList = ["BASE"]
- AddToLibraryClassSection(SectionEBCDict, SupModuleList, Item)
- else:
- SupModuleList = Object.SupModuleList
- AddToLibraryClassSection(SectionEBCDict, SupModuleList, Item)
-
- Section = ""
- for ModuleType in ModuleTypes:
- SectionCommonModule = "\n".join(SectionCommonDict.get(ModuleType, []))
- if SectionCommonModule != "":
- Section += "[%s.Common.%s]\n%s\n" % (SectionName, ModuleType, SectionCommonModule)
- Section += "\n"
- for ModuleType in ModuleTypes:
- ListIA32 = SectionIA32Dict.get(ModuleType, [])
- if ListIA32 != []:
- SectionIA32Module = "\n".join(SectionIA32Dict.get(ModuleType, []))
- if SectionIA32Module != "":
- Section += "[%s.IA32.%s]\n%s\n" % (SectionName, ModuleType, SectionIA32Module)
- Section += "\n"
- ListX64 = SectionX64Dict.get(ModuleType, [])
- if ListX64 != []:
- SectionX64Module = "\n".join(SectionX64Dict.get(ModuleType, []))
- if SectionX64Module != "":
- Section += "[%s.X64.%s]\n%s\n" % (SectionName, ModuleType, SectionX64Module)
- Section += "\n"
- ListIPF = SectionIPFDict.get(ModuleType, [])
- if ListIPF != []:
- SectionIPFModule = "\n".join(SectionIPFDict.get(ModuleType, []))
- if SectionIPFModule != "":
- Section += "[%s.IPF.%s]\n%s\n" % (SectionName, ModuleType, SectionIPFModule)
- Section += "\n"
- ListEBC = SectionEBCDict.get(ModuleType, [])
- if ListEBC != []:
- SectionEBCModule = "\n".join(SectionEBCDict.get(ModuleType, []))
- if SectionEBCModule != "":
- Section += "[%s.EBC.%s]\n%s\n" % (SectionName, ModuleType, SectionEBCModule)
- Section += "\n"
-
- if Section != "":
- Section += "\n"
- return Section
-
-## Store Library Classes section
-#
-# Write [LibraryClasses] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Library Classes section
-# @param Platform An input Platform class object
-#
-def StorePlatformLibraryClassesSection(DscFile, Platform):
- Section = GetLibraryClassesSection("LibraryClasses", GetPlatformLibraryClassItem, Platform.LibraryClasses.LibraryList)
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Library Class section - list of all Library Classes needed by this Platform.")
- List.append("#")
- List.append("################################################################################")
- SectionHeader = "\n".join(List)
- SectionHeader += "\n"
- Section = SectionHeader + Section
- StoreTextFile(DscFile, Section)
-
-## Store Pcd section
-#
-# Write [Pcd] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Build Options section
-# @param Platform An input Platform class object
-#
-def StorePlatformPcdSection(DscFile, Platform):
- # {PcdsFixedAtBuild:String1, PcdsFixedAtBuild:String2, PcdsPatchableInModule:String3}
- SectionDict = {}
- #
- # [PcdsFixedAtBuild], [PcdsPatchableInModule] and [PcdsFeatureFlag] are from platform.modules
- # [PcdsDynamic] is from platform.DynamicPcdBuildDefinitions
- #
- Modules = Platform.Modules.ModuleList # it's a list of modules
- for Module in Modules:
- PcdBuildDefinitions = Module.PcdBuildDefinitions # it's a list of PcdData
- for PcdData in PcdBuildDefinitions:
- if PcdData.ItemType == "FEATURE_FLAG":
- List = []
- List.append(PcdData.TokenSpaceGuidCName + "." + PcdData.C_NAME)
- List.append(PcdData.Value)
- String = "|".join(List)
- ItemType = PcdData.ItemType
- SectionPcdsFeatureFlag = SectionDict.get(ItemType, [])
- if String not in SectionPcdsFeatureFlag:
- SectionPcdsFeatureFlag.append(String)
- SectionDict[ItemType] = SectionPcdsFeatureFlag
- else:
- List = []
- List.append(PcdData.TokenSpaceGuidCName + "." + PcdData.C_NAME)
- List.append(PcdData.Value)
- List.append(PcdData.Token)
- List.append(PcdData.DatumType)
- List.append(PcdData.MaxDatumSize)
- String = "|".join(List)
- ItemType = PcdData.ItemType
- if PcdData.ItemType == "FIXED_AT_BUILD":
- SectionPcdsFixedAtBuild = SectionDict.get(ItemType, [])
- if String not in SectionPcdsFixedAtBuild:
- SectionPcdsFixedAtBuild.append(String)
- SectionDict[ItemType] = SectionPcdsFixedAtBuild
- #elif PcdData.ItemType == "FEATURE_FLAG":
- #SectionPcdsFeatureFlag = SectionDict.get(ItemType, [])
- #if String not in SectionPcdsFeatureFlag:
- #SectionPcdsFeatureFlag.append(String)
- #SectionDict[ItemType] = SectionPcdsFeatureFlag
- elif PcdData.ItemType == "PATCHABLE_IN_MODULE":
- SectionPcdsPatchableInModule = SectionDict.get(ItemType, [])
- if String not in SectionPcdsPatchableInModule:
- SectionPcdsPatchableInModule.append(String)
- SectionDict[ItemType] = SectionPcdsPatchableInModule
- elif PcdData.ItemType == "DYNAMIC":
- SectionPcdsDynamic = SectionDict.get(ItemType, [])
- if String not in SectionPcdsDynamic:
- SectionPcdsDynamic.append(String)
- SectionDict[ItemType] = SectionPcdsDynamic
-
- DynamicPcdBuildDefinitions = Platform.DynamicPcdBuildDefinitions # It's a list
- for PcdBuildData in DynamicPcdBuildDefinitions:
- List = []
- List.append(PcdData.TokenSpaceGuidCName + "." + PcdData.C_NAME)
- List.append(PcdData.Token)
- List.append(PcdData.DatumType)
- List.append(PcdData.MaxDatumSize)
- String = "|".join(List)
- if PcdBuildData.ItemType == "DYNAMIC":
- ItemType = PcdBuildData.ItemType
- SectionPcdsDynamic = SectionDict.get(ItemType, [])
- if String not in SectionPcdsDynamic:
- SectionPcdsDynamic.append(String)
- SectionDict[ItemType] = SectionPcdsDynamic
- ItemType = "FIXED_AT_BUILD"
- Section = "[PcdsFixedAtBuild]\n " + "\n ".join(SectionDict.get(ItemType, []))
- ItemType = "FEATURE_FLAG"
- Section += "\n\n[PcdsFeatureFlag]\n " + "\n ".join(SectionDict.get(ItemType, []))
- ItemType = "PATCHABLE_IN_MODULE"
- Section += "\n\n[PcdsPatchableInModule]\n " + "\n ".join(SectionDict.get(ItemType, []))
- Section += "\n\n"
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Pcd Dynamic Section - list of all EDK II PCD Entries defined by this Platform.")
- List.append("#")
- List.append("################################################################################")
- String = "\n".join(List)
- Section += String
- ItemType = "DYNAMIC"
- Section += "\n\n[PcdsDynamic]\n " + "\n ".join(SectionDict.get(ItemType, []))
- Section += "\n\n"
-
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Pcd Section - list of all EDK II PCD Entries defined by this Platform.")
- List.append("#")
- List.append("################################################################################")
- SectionHeader = "\n".join(List)
- SectionHeader += "\n"
- Section = SectionHeader + Section
- StoreTextFile(DscFile, Section)
-
-## Add item to a section
-#
-# Add an Item with specific CPU architecture to section dictionary.
-# The possible duplication is ensured to be removed.
-#
-# @param Section Section dictionary indexed by CPU architecture
-# @param Arch CPU architecture: Ia32, X64, Ipf, Ebc or Common
-# @param Item The Item to be added to section dictionary
-#
-def AddToSection(Section, Arch, Item):
- SectionArch = Section.get(Arch, [])
- if Item not in SectionArch:
- SectionArch.append(Item)
- Section[Arch] = SectionArch
-
-## Get section contents
-#
-# Return the content of section named SectionName.
-# the contents is based on Methods and ObjectLists.
-#
-# @param SectionName The name of the section
-# @param Method A function returning a string item of an object
-# @param ObjectList The list of object
-#
-# @retval Section The string content of a section
-#
-def GetSection(SectionName, Method, ObjectList):
- SupportedArches = ["COMMON", "IA32", "X64", "IPF", "EBC"]
- SectionDict = {}
- for Object in ObjectList:
- if Object.FilePath == "":
- continue
- Item = Method(Object)
- if Item == "":
- continue
- Item = " %s" % Item
- Arches = Object.SupArchList
- if len(Arches) == 4:
- AddToSection(SectionDict, "common", Item)
- else:
- for Arch in SupportedArches:
- if Arch.upper() in Arches:
- AddToSection(SectionDict, Arch, Item)
-
- Section = ""
- for Arch in SupportedArches:
- SectionArch = "\n".join(SectionDict.get(Arch, []))
- if SectionArch != "":
- Section += "[%s.%s]\n%s\n" % (SectionName, Arch, SectionArch)
- Section += "\n"
- if Section != "":
- Section += "\n"
- return Section
-
-## Return a Platform Component Item
-#
-# Read the input Platform Component object and return one line of Platform Component Item.
-#
-# @param Component An input Platform Component class object
-#
-# @retval ComponentItem A Platform Component Item
-#
-def GetPlatformComponentItem(Component):
- List = []
- Section = {}
-
- List.append("$(WORKSPACE)/" + Component.FilePath)
-
- LibraryClasses = Component.LibraryClasses
- if LibraryClasses != []:
- List = []
- List.append("$(WORKSPACE)/" + Component.FilePath + " {")
- List.append("<LibraryClasses>")
- for LibraryClass in LibraryClasses:
- if LibraryClass == ["", ""]:
- continue
- List.append(" " + LibraryClass[0] + "|$(WORKSPACE)/" + LibraryClass[1])
-
- PcdBuildDefinitions = Component.PcdBuildDefinitions
- for PcdData in PcdBuildDefinitions:
- if PcdData.ItemType == "FEATURE_FLAG":
- List1 = []
- List1.append(PcdData.TokenSpaceGuidCName + "." + PcdData.C_NAME)
- List1.append(PcdData.Value)
- String = "|".join(List1)
- ItemType = PcdData.ItemType
- SectionPcd = Section.get(ItemType, [])
- if String not in SectionPcd:
- SectionPcd.append(String)
- Section[ItemType] = SectionPcd
- else:
- List1 = []
- List1.append(PcdData.TokenSpaceGuidCName + "." + PcdData.C_NAME)
- List1.append(PcdData.Value)
- List1.append(PcdData.Token)
- List1.append(PcdData.DatumType)
- List1.append(PcdData.MaxDatumSize)
- String = "|".join(List1)
- ItemType = PcdData.ItemType
- if ItemType == "FIXED_AT_BUILD":
- SectionPcd = Section.get(ItemType, [])
- if String not in SectionPcd:
- SectionPcd.append(String)
- Section[ItemType] = SectionPcd
- #elif ItemType == "FEATURE_FLAG":
- #SectionPcd = Section.get(ItemType, [])
- #if String not in SectionPcd:
- #SectionPcd.append(String)
- #Section[ItemType] = SectionPcd
- elif ItemType == "PATCHABLE_IN_MODULE":
- SectionPcd = Section.get(ItemType, [])
- if String not in SectionPcd:
- SectionPcd.append(String)
- Section[ItemType] = SectionPcd
- elif ItemType == "DYNAMIC":
- SectionPcd = Section.get(ItemType, [])
- if String not in SectionPcd:
- SectionPcd.append(String)
- Section[ItemType] = SectionPcd
-
- ItemType = "FIXED_AT_BUILD"
- if Section.get(ItemType, []) != []:
- List.append("<PcdsFixedAtBuild>")
- List.append(" " + "\n ".join(Section.get(ItemType,[])))
- ItemType = "FEATURE_FLAG"
- if Section.get(ItemType, []) != []:
- List.append("<PcdsFeatureFlag>")
- List.append(" " + "\n ".join(Section.get(ItemType,[])))
- ItemType = "PATCHABLE_IN_MODULE"
- if Section.get(ItemType, []) != []:
- List.append("<PcdsPatchableInModule>")
- List.append(" " + "\n ".join(Section.get(ItemType,[])))
- ItemType = "DYNAMIC"
- if Section.get(ItemType, []) != []:
- List.append("<PcdsDynamic>")
- List.append(" " + "\n ".join(Section.get(ItemType,[])))
-
- ListOption = []
- SectionOption = ""
- ListBuildOptions = Component.BuildOptions # a list
- if ListBuildOptions != []:
- SectionOption += "\n <BuildOptions>\n"
- for BuildOptions in ListBuildOptions:
- Options = BuildOptions.Options
- for Option in Options:
- for Item in Option.BuildTargetList:
- ListOption.append(Item)
- List.append(Option.ToolChainFamily)
- for Item in Option.SupArchList:
- ListOption.append(Item)
- ListOption.append(Option.ToolCode)
- ListOption.append("FLAGS")
- #print ListOption
- SectionOption += " " + "_".join(List) + " = " + Option.Option + "\n"
- ListOption = []
- if SectionOption != "":
- List.append(SectionOption)
- if List != ["$(WORKSPACE)/" + Component.FilePath]:
- List.append("}\n")
-
- return "\n ".join(List)
-
-## Store Components section.
-#
-# Write [Components] section to the DscFile based on Platform class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the Components section
-# @param Platform An input Platform class object
-#
-def StorePlatformComponentsSection(DscFile, Platform):
- Section = GetSection("Components", GetPlatformComponentItem, Platform.Modules.ModuleList)
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# Components Section - list of all EDK II Modules needed by this Platform.")
- List.append("#")
- List.append("################################################################################")
- SectionHeader = "\n".join(List)
- SectionHeader += "\n"
- Section = SectionHeader + Section
- StoreTextFile(DscFile, Section)
-
-## Store User Extensions section.
-#
-# Write [UserExtensions] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DscFile The output DSC file to store the User Extensions section
-# @param Platform An input Platform class object
-#
-def StorePlatformUserExtensionsSection(DscFile, Platform):
- Section = "".join(map(GetUserExtensions, Platform.UserExtensions))
- List = []
- List.append("################################################################################")
- List.append("#")
- List.append("# User Extensions Section - list of all User Extensions specified by user.")
- List.append("#")
- List.append("################################################################################")
- SectionHeader = "\n".join(List)
- SectionHeader += "\n"
- Section = SectionHeader + Section
- StoreTextFile(DscFile, Section)
-
-## Store a Platform class object to a new DSC file.
-#
-# Read an input Platform class object and save the contents to a new DSC file.
-#
-# @param DSCFileName The output DSC file
-# @param Platform An input Platform class object
-#
-def StoreDsc(DscFileName, Platform):
- DscFile = open(DscFileName, "w+")
- EdkLogger.info("Save file to %s" % DscFileName)
-
- StoreHeader(DscFile, Platform.Header)
- StorePlatformDefinesSection(DscFile, Platform)
- StorePlatformBuildOptionsSection(DscFile,Platform)
- StorePlatformSkuIdsSection(DscFile,Platform)
- StorePlatformLibrariesSection(DscFile,Platform) # new in dsc, Edk I components, list of INF files
- StorePlatformLibraryClassesSection(DscFile, Platform) # LibraryClasses are from Modules
- StorePlatformPcdSection(DscFile, Platform)
- #StorePlatformPcdDynamicSection(DscFile, Platform)
- StorePlatformComponentsSection(DscFile,Platform)
- StorePlatformUserExtensionsSection(DscFile,Platform)
- DscFile.close()
-
-if __name__ == '__main__':
- pass
diff --git a/BaseTools/Source/Python/fpd2dsc/__init__.py b/BaseTools/Source/Python/fpd2dsc/__init__.py
deleted file mode 100644
index f9d3a2197f..0000000000
--- a/BaseTools/Source/Python/fpd2dsc/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'fpd2dsc' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py b/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
deleted file mode 100644
index 4a65e615a4..0000000000
--- a/BaseTools/Source/Python/fpd2dsc/fpd2dsc.py
+++ /dev/null
@@ -1,117 +0,0 @@
-## @file
-# Convert an XML-based FPD file to a text-based DSC file.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os, re, sys, xml.dom.minidom #XmlRoutines, EdkIIWorkspace
-from LoadFpd import LoadFpd
-from StoreDsc import StoreDsc
-from optparse import OptionParser
-from Common.BuildVersion import gBUILD_VERSION
-
-# Version and Copyright
-__version_number__ = ("1.0" + " " + gBUILD_VERSION)
-__version__ = "%prog Version " + __version_number__
-__copyright__ = "Copyright (c) 2007 - 2010, Intel Corporation All rights reserved."
-
-## Parse command line options
-#
-# Using standard Python module optparse to parse command line option of this tool.
-#
-# @retval Options A optparse.Values object containing the parsed options
-# @retval Args All the arguments got from the command line
-#
-def MyOptionParser():
- """ Argument Parser """
- usage = "%prog [options] input_filename"
- parser = OptionParser(usage=usage,description=__copyright__,version="%prog " + str(__version_number__))
- parser.add_option("-o", "--output", dest="outfile", help="Specific Name of the DSC file to create, otherwise it is the FPD filename with the extension repalced.")
- parser.add_option("-a", "--auto", action="store_true", dest="autowrite", default=False, help="Automatically create output files and write the DSC file")
- parser.add_option("-q", "--quiet", action="store_const", const=0, dest="verbose", help="Do not print any messages, just return either 0 for succes or 1 for failure")
- parser.add_option("-v", "--verbose", action="count", dest="verbose", help="Do not print any messages, just return either 0 for succes or 1 for failure")
- parser.add_option("-d", "--debug", action="store_true", dest="debug", default=False, help="Enable printing of debug messages.")
- parser.add_option("-w", "--workspace", dest="workspace", default=str(os.environ.get('WORKSPACE')), help="Specify workspace directory.")
- (options, args) = parser.parse_args(sys.argv[1:])
-
- return options,args
-
-## Entrance method
-#
-# This method mainly dispatch specific methods per the command line options.
-# If no error found, return zero value so the caller of this tool can know
-# if it's executed successfully or not.
-#
-# @retval 0 Tool was successful
-# @retval 1 Tool failed
-#
-def Main():
- global Options
- global Args
- global WorkSpace
- Options,Args = MyOptionParser()
-
- WorkSpace = ""
- #print Options.workspace
- if (Options.workspace == None):
- print "ERROR: E0000: WORKSPACE not defined.\n Please set the WORKSPACE environment variable to the location of the EDK II install directory."
- sys.exit(1)
- else:
- WorkSpace = Options.workspace
- if (Options.debug):
- print "Using Workspace:", WorkSpace
- try:
- Options.verbose +=1
- except:
- Options.verbose = 1
- pass
-
- InputFile = ""
- if Args == []:
- print "usage:" "%prog [options] input_filename"
- else:
- InputFile = Args[0]
- #print InputFile
- if InputFile != "":
- FileName = InputFile
- if ((Options.verbose > 1) | (Options.autowrite)):
- print "FileName:",InputFile
- else:
- print "ERROR: E0001 - You must specify an input filename"
- sys.exit(1)
-
- if (Options.outfile):
- OutputFile = Options.outfile
- else:
- OutputFile = FileName.replace('.fpd', '.dsc')
-
- if ((Options.verbose > 2) or (Options.debug)):
- print "Output Filename:", OutputFile
-
- try:
- Platform = LoadFpd(FileName)
- StoreDsc(OutputFile, Platform)
- return 0
- except Exception, e:
- print e
- return 1
-
-if __name__ == '__main__':
- sys.exit(Main())
- #pass
- #global Options
- #global Args
- #Options,Args = MyOptionParser()
-
- #Main()
- #sys.exit(0) \ No newline at end of file
diff --git a/BaseTools/Source/Python/msa2inf/ConvertModule.py b/BaseTools/Source/Python/msa2inf/ConvertModule.py
deleted file mode 100644
index 2a118ae51e..0000000000
--- a/BaseTools/Source/Python/msa2inf/ConvertModule.py
+++ /dev/null
@@ -1,112 +0,0 @@
-## @file
-# Convert an MSA Module class object ot an INF Module class object by filling
-# several info required by INF file.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-from LoadMsa import LoadMsa
-from StoreInf import StoreInf
-from Common.MigrationUtilities import *
-from EdkIIWorkspaceGuidsInfo import gEdkIIWorkspaceGuidsInfo
-
-#The default INF version number tool generates.
-gInfVersion = "0x00010005"
-
-## Add required version information.
-#
-# Add the default INF version, EFI specificiation version and EDK release
-# version to Module class object.
-#
-# @param Module An input Module class object.
-#
-def AddModuleMiscVersion(Module):
- Version = gInfVersion
- Module.Header.InfVersion = Version
-
- Version = Module.Header.Specification.get("EFI_SPECIFICATION_VERSION", "")
- Module.Header.UefiSpecificationVersion = Version
-
- Version = Module.Header.Specification.get("EDK_RELEASE_VERSION", "")
- Module.Header.EdkReleaseVersion = Version
-
-
-## Add Module produced library class.
-#
-# Add the produced library class from library class list whose usage type is
-# always produced.
-#
-# @param Module An input Module class object.
-#
-def AddModuleProducedLibraryClass(Module):
- for LibraryClass in Module.LibraryClasses:
- if "ALWAYS_PRODUCED" in LibraryClass.Usage:
- Module.Header.LibraryClass.append(LibraryClass)
-
-
-## Add Module Package Dependency path.
-#
-# Translate Package Dependency Guid to a file path relative to workspace.
-#
-# @param Module An input Module class object.
-#
-def AddModulePackageDependencyPath(Module):
- for PackageDependency in Module.PackageDependencies:
- PackageGuid = PackageDependency.PackageGuid
- PackageVersion = PackageDependency.PackageVersion
-
- GuidToFilePath = gEdkIIWorkspaceGuidsInfo.ResolvePackageFilePath
- PackageFilePath = GuidToFilePath(PackageGuid, PackageVersion)
- PackageDependency.FilePath = PackageFilePath
-
-
-## Add Module Recommended Library Instance path.
-#
-# Translate Module Recommened Library Instance Guid to a file path relative to
-# workspace.
-#
-# @param Module An input Module class object.
-#
-def AddModuleRecommonedLibraryInstancePath(Module):
- for LibraryClass in Module.LibraryClasses:
- if "ALWAYS_PRODUCED" in LibraryClass.Usage:
- continue
-
- if LibraryClass.RecommendedInstanceGuid == "":
- continue
-
- LibraryGuid = LibraryClass.RecommendedInstanceGuid
- LibraryVersion = LibraryClass.RecommendedIntanceVersion
-
- GuidToFilePath = gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath
- LibraryInstance = GuidToFilePath(LibraryGuid, LibraryVersion)
- LibraryClass.RecommendedIntance = LibraryInstance
-
-
-## Convert MSA Module class object to INF Module class object.
-#
-# Convert MSA module class ojbect to INF Module class object by filling in
-# several information required by INF file.
-#
-# @param Module An input Module class object.
-#
-def ConvertMsaModuleToInfModule(Module):
- AddModuleMiscVersion(Module)
- AddModuleProducedLibraryClass(Module)
- AddModulePackageDependencyPath(Module)
- AddModuleRecommonedLibraryInstancePath(Module)
-
-
-if __name__ == '__main__':
- pass
- \ No newline at end of file
diff --git a/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py b/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py
deleted file mode 100644
index 6d6633b893..0000000000
--- a/BaseTools/Source/Python/msa2inf/EdkIIWorkspaceGuidsInfo.py
+++ /dev/null
@@ -1,325 +0,0 @@
-## @file
-# Collects the Guid Information in current workspace.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-import fnmatch
-from Common.EdkIIWorkspace import EdkIIWorkspace
-from Common.MigrationUtilities import *
-
-## A class for EdkII work space to resolve Guids.
-#
-# This class inherits from EdkIIWorkspace and collects the Guids information
-# in current workspace. The Guids information is important to translate the
-# package Guids and recommended library instances Guids to relative file path
-# (to workspace directory) in MSA files.
-#
-class EdkIIWorkspaceGuidsInfo(EdkIIWorkspace):
-
- ## The classconstructor.
- #
- # The constructor initialize workspace directory. It does not collect
- # pakage and module Guids info at initialization; instead, it collects them
- # on the fly.
- #
- # @param self The object pointer.
- #
- def __init__(self):
- # Initialize parent class.
- EdkIIWorkspace.__init__(self)
- # The internal map from Guid to FilePath.
- self.__GuidToFilePath = {}
- # The internal package directory list.
- self.__PackageDirList = []
- # The internal flag to indicate whether package Guids info has been
- # to avoid re-collection collected.
- self.__PackageGuidInitialized = False
- # The internal flag to indicate whether module Guids info has been
- # to avoid re-collection collected.
- self.__ModuleGuidInitialized = False
-
- ## Add Guid, Version and FilePath to Guids database.
- #
- # Add Guid, Version and FilePath to Guids database. It constructs a map
- # table from Guid, Version to FilePath internally. If also detects possible
- # Guid collision. For now, the version information is simply ignored and
- # Guid value itself acts as master key.
- #
- # @param self The object pointer.
- # @param Guid The Guid Value.
- # @param Version The version information
- #
- # @retval True The Guid value is successfully added to map table.
- # @retval False The Guid is an empty string or the map table
- # already contains a same Guid.
- #
- def __AddGuidToFilePath(self, Guid, Version, FilePath):
- if Guid == "":
- EdkLogger.info("Cannot find Guid in file %s" % FilePath)
- return False
- #Add the Guid value to map table to ensure case insensitive comparison.
- OldFilePath = self.__GuidToFilePath.setdefault(Guid.lower(), FilePath)
- if OldFilePath == FilePath:
- EdkLogger.verbose("File %s has new Guid '%s'" % (FilePath, Guid))
- return True
- else:
- EdkLogger.info("File %s has duplicate Guid with & %s" % (FilePath, OldFilePath))
- return False
-
-
- ## Gets file information from a module description file.
- #
- # Extracts Module Name, File Guid and Version number from INF, MSA and NMSA
- # file. It supports to exact such information from text based INF file or
- # XML based (N)MSA file.
- #
- # @param self The object pointer.
- # @param FileName The input module file name.
- #
- # @retval True This module file represents a new module discovered
- # in current workspace.
- # @retval False This module file is not regarded as a valid module.
- # The File Guid cannot be extracted or the another
- # file with the same Guid already exists
- #
- def __GetModuleFileInfo(self, FileName):
- if fnmatch.fnmatch(FileName, "*.inf"):
- TagTuple = ("BASE_NAME", "FILE_GUID", "VERSION_STRING")
- (Name, Guid, Version) = GetTextFileInfo(FileName, TagTuple)
- else :
- XmlTag1 = "ModuleSurfaceArea/MsaHeader/ModuleName"
- XmlTag2 = "ModuleSurfaceArea/MsaHeader/GuidValue"
- XmlTag3 = "ModuleSurfaceArea/MsaHeader/Version"
- TagTuple = (XmlTag1, XmlTag2, XmlTag3)
- (Name, Guid, Version) = GetXmlFileInfo(FileName, TagTuple)
-
- return self.__AddGuidToFilePath(Guid, Version, FileName)
-
-
- ## Gets file information from a package description file.
- #
- # Extracts Package Name, File Guid and Version number from INF, SPD and NSPD
- # file. It supports to exact such information from text based DEC file or
- # XML based (N)SPD file. EDK Compatibility Package is hardcoded to be
- # ignored since no EDKII INF file depends on that package.
- #
- # @param self The object pointer.
- # @param FileName The input package file name.
- #
- # @retval True This package file represents a new package
- # discovered in current workspace.
- # @retval False This package is not regarded as a valid package.
- # The File Guid cannot be extracted or the another
- # file with the same Guid already exists
- #
- def __GetPackageFileInfo(self, FileName):
- if fnmatch.fnmatch(FileName, "*.dec"):
- TagTuple = ("PACKAGE_NAME", "PACKAGE_GUID", "PACKAGE_VERSION")
- (Name, Guid, Version) = GetTextFileInfo(FileName, TagTuple)
- else:
- XmlTag1 = "PackageSurfaceArea/SpdHeader/PackageName"
- XmlTag2 = "PackageSurfaceArea/SpdHeader/GuidValue"
- XmlTag3 = "PackageSurfaceArea/SpdHeader/Version"
- TagTuple = (XmlTag1, XmlTag2, XmlTag3)
- (Name, Guid, Version) = GetXmlFileInfo(FileName, TagTuple)
-
- if Name == "EdkCompatibilityPkg":
- # Do not scan EDK compatibitilty package to avoid Guid collision
- # with those in EDK Glue Library.
- EdkLogger.verbose("Bypass EDK Compatibility Pkg")
- return False
-
- return self.__AddGuidToFilePath(Guid, Version, FileName)
-
- ## Iterate on all package files listed in framework database file.
- #
- # Yields all package description files listed in framework database files.
- # The framework database file describes the packages current workspace
- # includes.
- #
- # @param self The object pointer.
- #
- def __FrameworkDatabasePackageFiles(self):
- XmlFrameworkDb = XmlParseFile(self.WorkspaceFile)
- XmlTag = "FrameworkDatabase/PackageList/Filename"
- for PackageFile in XmlElementList(XmlFrameworkDb, XmlTag):
- yield os.path.join(self.WorkspaceDir, PackageFile)
-
-
- ## Iterate on all package files in current workspace directory.
- #
- # Yields all package description files listed in current workspace
- # directory. This happens when no framework database file exists.
- #
- # @param self The object pointer.
- #
- def __TraverseAllPackageFiles(self):
- for Path, Dirs, Files in os.walk(self.WorkspaceDir):
- # Ignore svn version control directory.
- if ".svn" in Dirs:
- Dirs.remove(".svn")
- if "Build" in Dirs:
- Dirs.remove("Build")
- # Assume priority from high to low: DEC, NSPD, SPD.
- PackageFiles = fnmatch.filter(Files, "*.dec")
- if len(PackageFiles) == 0:
- PackageFiles = fnmatch.filter(Files, "*.nspd")
- if len(PackageFiles) == 0:
- PackageFiles = fnmatch.filter(Files, "*.spd")
-
- for File in PackageFiles:
- # Assume no more package decription file in sub-directory.
- del Dirs[:]
- yield os.path.join(Path, File)
-
- ## Iterate on all module files in current package directory.
- #
- # Yields all module description files listed in current package
- # directory.
- #
- # @param self The object pointer.
- #
- def __TraverseAllModuleFiles(self):
- for PackageDir in self.__PackageDirList:
- for Path, Dirs, Files in os.walk(PackageDir):
- # Ignore svn version control directory.
- if ".svn" in Dirs:
- Dirs.remove(".svn")
- # Assume priority from high to low: INF, NMSA, MSA.
- ModuleFiles = fnmatch.filter(Files, "*.inf")
- if len(ModuleFiles) == 0:
- ModuleFiles = fnmatch.filter(Files, "*.nmsa")
- if len(ModuleFiles) == 0:
- ModuleFiles = fnmatch.filter(Files, "*.msa")
-
- for File in ModuleFiles:
- yield os.path.join(Path, File)
-
- ## Initialize package Guids info mapping table.
- #
- # Collects all package guids map to package decription file path. This
- # function is invokes on demand to avoid unnecessary directory scan.
- #
- # @param self The object pointer.
- #
- def __InitializePackageGuidInfo(self):
- if self.__PackageGuidInitialized:
- return
-
- EdkLogger.verbose("Start to collect Package Guids Info.")
-
- WorkspaceFile = os.path.join("Conf", "FrameworkDatabase.db")
- self.WorkspaceFile = os.path.join(self.WorkspaceDir, WorkspaceFile)
-
- # Try to find the frameworkdatabase file to discover package lists
- if os.path.exists(self.WorkspaceFile):
- TraversePackage = self.__FrameworkDatabasePackageFiles
- EdkLogger.verbose("Package list bases on: %s" % self.WorkspaceFile)
- else:
- TraversePackage = self.__TraverseAllPackageFiles
- EdkLogger.verbose("Package list in: %s" % self.WorkspaceDir)
-
- for FileName in TraversePackage():
- if self.__GetPackageFileInfo(FileName):
- PackageDir = os.path.dirname(FileName)
- EdkLogger.verbose("Find new package directory %s" % PackageDir)
- self.__PackageDirList.append(PackageDir)
-
- self.__PackageGuidInitialized = True
-
- ## Initialize module Guids info mapping table.
- #
- # Collects all module guids map to module decription file path. This
- # function is invokes on demand to avoid unnecessary directory scan.
- #
- # @param self The object pointer.
- #
- def __InitializeModuleGuidInfo(self):
- if self.__ModuleGuidInitialized:
- return
- EdkLogger.verbose("Start to collect Module Guids Info")
-
- self.__InitializePackageGuidInfo()
- for FileName in self.__TraverseAllModuleFiles():
- if self.__GetModuleFileInfo(FileName):
- EdkLogger.verbose("Find new module %s" % FileName)
-
- self.__ModuleGuidInitialized = True
-
- ## Get Package file path by Package guid and Version.
- #
- # Translates the Package Guid and Version to a file path relative
- # to workspace directory. If no package in current workspace match the
- # input Guid, an empty file path is returned. For now, the version
- # value is simply ignored.
- #
- # @param self The object pointer.
- # @param Guid The Package Guid value to look for.
- # @param Version The Package Version value to look for.
- #
- def ResolvePackageFilePath(self, Guid, Version = ""):
- self.__InitializePackageGuidInfo()
-
- EdkLogger.verbose("Resolve Package Guid '%s'" % Guid)
- FileName = self.__GuidToFilePath.get(Guid.lower(), "")
- if FileName == "":
- EdkLogger.info("Cannot resolve Package Guid '%s'" % Guid)
- else:
- FileName = self.WorkspaceRelativePath(FileName)
- FileName = os.path.splitext(FileName)[0] + ".dec"
- FileName = FileName.replace("\\", "/")
- return FileName
-
- ## Get Module file path by Package guid and Version.
- #
- # Translates the Module Guid and Version to a file path relative
- # to workspace directory. If no module in current workspace match the
- # input Guid, an empty file path is returned. For now, the version
- # value is simply ignored.
- #
- # @param self The object pointer.
- # @param Guid The Module Guid value to look for.
- # @param Version The Module Version value to look for.
- #
- def ResolveModuleFilePath(self, Guid, Version = ""):
- self.__InitializeModuleGuidInfo()
-
- EdkLogger.verbose("Resolve Module Guid '%s'" % Guid)
- FileName = self.__GuidToFilePath.get(Guid.lower(), "")
- if FileName == "":
- EdkLogger.info("Cannot resolve Module Guid '%s'" % Guid)
- else:
- FileName = self.WorkspaceRelativePath(FileName)
- FileName = os.path.splitext(FileName)[0] + ".inf"
- FileName = FileName.replace("\\", "/")
- return FileName
-
-# A global class object of EdkIIWorkspaceGuidsInfo for external reference.
-gEdkIIWorkspaceGuidsInfo = EdkIIWorkspaceGuidsInfo()
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- # Test the translation of package Guid.
- MdePkgGuid = "1E73767F-8F52-4603-AEB4-F29B510B6766"
- OldMdePkgGuid = "5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"
- print gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(MdePkgGuid)
- print gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(OldMdePkgGuid)
-
- # Test the translation of module Guid.
- UefiLibGuid = "3a004ba5-efe0-4a61-9f1a-267a46ae5ba9"
- UefiDriverModelLibGuid = "52af22ae-9901-4484-8cdc-622dd5838b09"
- print gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(UefiLibGuid)
- print gEdkIIWorkspaceGuidsInfo.ResolveModuleFilePath(UefiDriverModelLibGuid)
diff --git a/BaseTools/Source/Python/msa2inf/LoadMsa.py b/BaseTools/Source/Python/msa2inf/LoadMsa.py
deleted file mode 100644
index 52f4b2d12f..0000000000
--- a/BaseTools/Source/Python/msa2inf/LoadMsa.py
+++ /dev/null
@@ -1,747 +0,0 @@
-## @file
-# Open an MSA file and load all its contents to a ModuleClass object.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-from CommonDataClass.ModuleClass import *
-from Common.XmlRoutines import *
-from Common.MigrationUtilities import *
-
-
-## Load a list of Module Cloned Records.
-#
-# Read an input Module XML DOM object and return a list of Cloned Records
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel ClonedRecords A list of Cloned Records loaded from XmlMsa.
-#
-def LoadModuleClonedRecords(XmlMsa):
- XmlTag = "ModuleSurfaceArea/ModuleDefinitions/ClonedFrom/Cloned"
- return map(LoadClonedRecord, XmlList(XmlMsa, XmlTag))
-
-## Load Module Header.
-#
-# Read an input Module XML DOM object and return Module Header class object
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-# @param MsaFileName The file path of MSA File.
-#
-# @retvel ModuleHeader A new Module Header object loaded from XmlMsa.
-#
-def LoadModuleHeader(XmlMsa, MsaFileName):
- ModuleHeader = ModuleHeaderClass()
-
- XmlTag = "ModuleSurfaceArea/MsaHeader"
- MsaHeader = XmlNode(XmlMsa, XmlTag)
-
- SetIdentification(ModuleHeader, MsaHeader, "ModuleName", MsaFileName)
- SetCommonHeader(ModuleHeader, MsaHeader)
-
- XmlTag = "ModuleSurfaceArea/ModuleDefinitions/SupportedArchitectures"
- ModuleHeader.SupArchList = XmlElement(XmlMsa, XmlTag).split()
-
- XmlTag = "ModuleSurfaceArea/ModuleDefinitions/BinaryModule"
- if XmlElement(XmlMsa, XmlTag).lower() == "true":
- ModuleHeader.BinaryModule = True
-
- XmlTag = "ModuleSurfaceArea/ModuleDefinitions/OutputFileBasename"
- ModuleHeader.OutputFileBasename = XmlElement(XmlMsa, XmlTag)
-
- XmlTag = "ModuleSurfaceArea/ModuleDefinitions/ClonedForm"
- ModuleHeader.ClonedFrom = LoadModuleClonedRecords(XmlMsa)
-
- XmlTag = "ModuleSurfaceArea/Externs/PcdDriverTypes"
- ModuleHeader.PcdIsDriver = XmlElement(XmlMsa, XmlTag)
-
- XmlTag = "ModuleSurfaceArea/Externs/TianoEdkFlashMap_h"
- if XmlElement(XmlMsa, XmlTag).lower() == "true":
- ModuleHeader.TianoEdkFlashMap_h = True
-
- XmlTag = "ModuleSurfaceArea/Externs/Specification"
- for Specification in XmlElementList(XmlMsa, XmlTag):
- AddToSpecificationDict(ModuleHeader.Specification, Specification)
-
- return ModuleHeader
-
-
-## Load a list of Module Library Classes.
-#
-# Read an input Module XML DOM object and return a list of Library Classes
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel LibraryClasses A list of Library Classes loaded from XmlMsa.
-#
-def LoadModuleLibraryClasses(XmlMsa):
- XmlTag = "ModuleSurfaceArea/LibraryClassDefinitions/LibraryClass"
- return map(LoadLibraryClass, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module Source class object.
-#
-# Read an input XML Source DOM object and return an object of Source
-# contained in the DOM object.
-#
-# @param XmlFilename A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleSource A new Source object created by XmlFilename.
-#
-def LoadModuleSource(XmlFilename):
- ModuleSource = ModuleSourceFileClass()
-
- ModuleSource.SourceFile = XmlElementData(XmlFilename)
-
- XmlTag = "TagName"
- ModuleSource.TagName = XmlAttribute(XmlFilename, XmlTag)
-
- XmlTag = "ToolCode"
- ModuleSource.ToolCode = XmlAttribute(XmlFilename, XmlTag)
-
- XmlTag = "ToolChainFamily"
- ModuleSource.ToolChainFamily = XmlAttribute(XmlFilename, XmlTag)
-
- SetCommon(ModuleSource, XmlFilename)
-
- return ModuleSource
-
-
-## Load a list of Module Sources.
-#
-# Read an input Module XML DOM object and return a list of Sources
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Sources A list of Sources loaded from XmlMsa.
-#
-def LoadModuleSources(XmlMsa):
- XmlTag = "ModuleSurfaceArea/SourceFiles/Filename"
- return map(LoadModuleSource, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module Binary class object.
-#
-# Read an input XML Binary DOM object and return an object of Binary
-# contained in the DOM object.
-#
-# @param XmlFilename A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleBinary A new Binary object created by XmlFilename.
-#
-def LoadModuleBinary(XmlFilename):
- ModuleBinary = ModuleBinaryFileClass()
-
- ModuleBinary.BinaryFile = XmlElementData(XmlFilename)
-
- XmlTag = "FileType"
- ModuleBinary.FileType = XmlElementAttribute(XmlFilename, XmlTag)
-
- SetCommon(ModuleBinary, XmlFilename)
-
-
-## Load a list of Module Binaries.
-#
-# Read an input Module XML DOM object and return a list of Binaries
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Binaries A list of Binaries loaded from XmlMsa.
-#
-def LoadModuleBinaries(XmlMsa):
- XmlTag = "ModuleSurfaceArea/BinaryFiles/Filename"
- return map(LoadModuleBinary, XmlList(XmlMsa, XmlTag))
-
-
-## Load a list of Module Non Processed Files.
-#
-# Read an input Module XML DOM object and return a list of Non Processed Files
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel NonProcessedFiles A list of Non Processed Files loaded from XmlMsa.
-#
-def LoadModuleNonProcessedFiles(XmlMsa):
- XmlTag = "ModuleSurfaceArea/NonProcessedFiles/Filename"
- return XmlElementList(XmlMsa, XmlTag)
-
-
-## Load a new Module Package Dependency class object.
-#
-# Read an input XML PackageDependency DOM object and return an object of Package Dependency
-# contained in the DOM object.
-#
-# @param XmlPackage A child XML DOM object in Module XML DOM.
-#
-# @retvel ModulePackageDependency A new Package Dependency object created by XmlPackage.
-#
-def LoadModulePackageDependency(XmlPackage):
- ModulePackageDependency = ModulePackageDependencyClass()
-
- XmlTag = "PackageGuid"
- PackageKey = XmlAttribute(XmlPackage, XmlTag)
-
- #
- #TODO: Add resolution for Package name, package Version
- #
- ModulePackageDependency.PackageGuid = PackageKey
- SetCommon(ModulePackageDependency, XmlPackage)
-
- return ModulePackageDependency
-
-
-## Load a list of Module Package Dependencies.
-#
-# Read an input Module XML DOM object and return a list of Package Dependencies
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel PackageDependencies A list of Package Dependencies loaded from XmlMsa.
-#
-def LoadModulePackageDependencies(XmlMsa):
- XmlTag = "ModuleSurfaceArea/PackageDependencies/Package"
- return map(LoadModulePackageDependency, XmlList(XmlMsa, XmlTag))
-
-
-## Load a list of Module Protocols.
-#
-# Read an input Module XML DOM object and return a list of Protocols
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Protocols A list of Protocols loaded from XmlMsa.
-#
-def LoadModuleProtocols(XmlMsa):
- XmlTag = "ModuleSurfaceArea/Protocols/Protocol"
- XmlProtocolList = XmlList(XmlMsa, XmlTag)
-
- XmlTag = "ModuleSurfaceArea/Protocols/ProtocolNotify"
- XmlProtocolList += XmlList(XmlMsa, XmlTag)
-
- return map(LoadGuidProtocolPpiCommon, XmlProtocolList)
-
-
-## Load a list of Module Ppis.
-#
-# Read an input Module XML DOM object and return a list of Ppis
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Ppis A list of Ppis loaded from XmlMsa.
-#
-def LoadModulePpis(XmlMsa):
- XmlTag = "ModuleSurfaceArea/PPIs/Ppi"
- XmlPpiList = XmlList(XmlMsa, XmlTag)
-
- XmlTag = "ModuleSurfaceArea/PPIs/PpiNotify"
- XmlPpiList += XmlList(XmlMsa, XmlTag)
-
- return map(LoadGuidProtocolPpiCommon, XmlPpiList)
-
-
-## Load a new Module Event class object.
-#
-# Read an input XML Event DOM object and return an object of Event
-# contained in the DOM object.
-#
-# @param XmlEvent A child XML DOM object in Module XML DOM.
-# @param Type Specify the event type: SIGNAL_EVENT or CREATE_EVENT.
-#
-# @retvel ModuleEvent A new Event object created by XmlEvent.
-#
-def LoadModuleEvent(XmlEvent, Type):
- ModuleEvent = ModuleEventClass()
-
- XmlTag = "EventTypes/EventType"
- ModuleEvent.CName = XmlElement(XmlEvent, XmlTag)
-
- XmlTag = "EventGuidCName"
- ModuleEvent.GuidCName = XmlAttribute(XmlEvent, XmlTag)
-
- ModuleEvent.Type = Type
-
- SetCommon(ModuleEvent, XmlEvent)
-
- return ModuleEvent
-
-
-## Load a list of Module Events.
-#
-# Read an input Module XML DOM object and return a list of Events
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Events A list of Events loaded from XmlMsa.
-#
-def LoadModuleEvents(XmlMsa):
- ModuleEvents = []
-
- XmlTag = "ModuleSurfaceArea/Events/CreateEvents/EventTypes"
- for XmlCreateEvent in XmlList(XmlMsa, XmlTag):
- ModuleEvent = LoadModuleEvent(XmlCreateEvent, "CREATE_EVENT")
- ModuleEvents.append(ModuleEvent)
-
- XmlTag = "ModuleSurfaceArea/Events/SignalEvents/EventTypes"
- for XmlCreateEvent in XmlList(XmlMsa, XmlTag):
- ModuleEvent = LoadModuleEvent(XmlCreateEvent, "SIGNAL_EVENT")
- ModuleEvents.append(ModuleEvent)
-
- return ModuleEvents
-
-
-## Load a new Module Hob class object.
-#
-# Read an input XML Hob DOM object and return an object of Hob
-# contained in the DOM object.
-#
-# @param XmlHob A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleHob A new Hob object created by XmlHob.
-#
-def LoadModuleHob(XmlHob):
- ModuleHob = ModuleHobClass()
-
- XmlTag = "HobTypes/HobType"
- ModuleHob.Type = XmlElement(XmlHob, XmlTag)
-
- XmlTag = "HobGuidCName"
- ModuleHob.GuidCName = XmlAttribute(XmlHob, XmlTag)
-
- SetCommon(ModuleHob, XmlHob)
-
- return ModuleHob
-
-
-## Load a list of Module Hobs.
-#
-# Read an input Module XML DOM object and return a list of Hobs
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Hobs A list of Hobs loaded from XmlMsa.
-#
-def LoadModuleHobs(XmlMsa):
- XmlTag = "ModuleSurfaceArea/Hobs/HobTypes"
- return map(LoadModuleHob, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module Variable class object.
-#
-# Read an input XML Variable DOM object and return an object of Variable
-# contained in the DOM object.
-#
-# @param XmlVariable A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleVariable A new Variable object created by XmlVariable.
-#
-def LoadModuleVariable(XmlVariable):
- ModuleVariable = ModuleVariableClass()
-
- XmlTag = "Variable/VariableName"
- HexWordArray = XmlElement(XmlVariable, XmlTag).split()
- try:
- ModuleVariable.Name = "".join([unichr(int(a, 16)) for a in HexWordArray])
- except:
- ModuleVariable.Name = ""
-
- XmlTag = "Variable/GuidC_Name"
- ModuleVariable.GuidCName = XmlElement(XmlVariable, XmlTag)
-
- SetCommon(ModuleVariable, XmlVariable)
-
- return ModuleVariable
-
-
-## Load a list of Module Variables.
-#
-# Read an input Module XML DOM object and return a list of Variables
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Variables A list of Variables loaded from XmlMsa.
-#
-def LoadModuleVariables(XmlMsa):
- XmlTag = "ModuleSurfaceArea/Variables/Variable"
- return map(LoadModuleVariable, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module Boot Mode class object.
-#
-# Read an input XML BootMode DOM object and return an object of Boot Mode
-# contained in the DOM object.
-#
-# @param XmlBootMode A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleBootMode A new Boot Mode object created by XmlBootMode.
-#
-def LoadModuleBootMode(XmlBootMode):
- ModuleBootMode = ModuleBootModeClass()
-
- XmlTag = "BootModeName"
- ModuleBootMode.Name = XmlAttribute(XmlBootMode, XmlTag)
-
- SetCommon(ModuleBootMode, XmlBootMode)
-
- return ModuleBootMode
-
-
-## Load a list of Module Boot Modes.
-#
-# Read an input Module XML DOM object and return a list of Boot Modes
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel BootModes A list of Boot Modes loaded from XmlMsa.
-#
-def LoadModuleBootModes(XmlMsa):
- XmlTag = "ModuleSurfaceArea/BootModes/BootMode"
- return map(LoadModuleBootMode, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module System Table class object.
-#
-# Read an input XML SystemTable DOM object and return an object of System Table
-# contained in the DOM object.
-#
-# @param XmlSystemTable A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleSystemTable A new System Table object created by XmlSystemTable.
-#
-def LoadModuleSystemTable(XmlSystemTable):
- ModuleSystemTable = ModuleSystemTableClass()
-
- XmlTag = "SystemTable/SystemTableCName"
- ModuleSystemTable.CName = XmlElement(XmlSystemTable, XmlTag)
-
- SetCommon(ModuleSystemTable, XmlSystemTable)
-
- return ModuleSystemTable
-
-
-## Load a list of Module System Tables.
-#
-# Read an input Module XML DOM object and return a list of System Tables
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel SystemTables A list of System Tables loaded from XmlMsa.
-#
-def LoadModuleSystemTables(XmlMsa):
- XmlTag = "ModuleSurfaceArea/SystemTables/SystemTableCNames"
- return map(LoadModuleSystemTable, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module Data Hub class object.
-#
-# Read an input XML DataHub DOM object and return an object of Data Hub
-# contained in the DOM object.
-#
-# @param XmlDataHub A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleDataHub A new Data Hub object created by XmlDataHub.
-#
-def LoadModuleDataHub(XmlDataHub):
- ModuleDataHub = ModuleDataHubClass()
-
- XmlTag = "DataHub/DataHubCName"
- ModuleDataHub.CName = XmlElement(XmlDataHub, "DataHubCName")
-
- SetCommon(ModuleDataHub, XmlDataHub)
-
- return ModuleDataHub
-
-
-## Load a list of Module Data Hubs.
-#
-# Read an input Module XML DOM object and return a list of Data Hubs
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel DataHubs A list of Data Hubs loaded from XmlMsa.
-#
-def LoadModuleDataHubs(XmlMsa):
- XmlTag = "ModuleSurfaceArea/DataHubs/DataHubRecord"
- return map(LoadModuleDataHub, XmlList(XmlMsa, XmlTag))
-
-
-## Load a new Module Hii Package class object.
-#
-# Read an input XML HiiPackage DOM object and return an object of Hii Package
-# contained in the DOM object.
-#
-# @param XmlHiiPackage A child XML DOM object in Module XML DOM.
-#
-# @retvel ModuleHiiPackage A new Hii Package object created by XmlHiiPackage.
-#
-def LoadModuleHiiPackage(XmlHiiPackage):
- ModuleHiiPackage = ModuleHiiPackageClass()
-
- XmlTag = "HiiPackage/HiiPackageCName"
- ModuleHiiPackage.CName = XmlElement(XmlHiiPackage, "HiiCName")
-
- SetCommon(ModuleHiiPackage, XmlHiiPackage)
-
- return ModuleHiiPackage
-
-
-## Load a list of Module Hii Packages.
-#
-# Read an input Module XML DOM object and return a list of Hii Packages
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel HiiPackages A list of Hii Packages loaded from XmlMsa.
-#
-def LoadModuleHiiPackages(XmlMsa):
- XmlTag = "ModuleSurfaceArea/HiiPackages/HiiPackage"
- return map(LoadModuleHiiPackage, XmlList(XmlMsa, XmlTag))
-
-
-## Load a list of Module Guids.
-#
-# Read an input Module XML DOM object and return a list of Guids
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel Guids A list of Guids loaded from XmlMsa.
-#
-def LoadModuleGuids(XmlMsa):
- XmlTag = "ModuleSurfaceArea/Guids/GuidCNames"
- return map(LoadGuidProtocolPpiCommon, XmlList(XmlMsa, XmlTag))
-
-
-## Load a list of Module Pcd Codes.
-#
-# Read an input Module XML DOM object and return a list of Pcd Codes
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel PcdCodes A list of Pcd Codes loaded from XmlMsa.
-#
-def LoadModulePcdCodes(XmlMsa):
- XmlTag = "ModuleSurfaceArea/PcdCoded/PcdEntry"
- return map(LoadPcd, XmlList(XmlMsa, XmlTag))
-
-
-## Load a list of Module Extern Images.
-#
-# Read an input Module XML DOM object and return a list of Extern Images
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel ExternImages A list of Extern Images loaded from XmlMsa.
-#
-def LoadModuleExternImages(XmlMsa):
- ModuleExternImages = []
-
- XmlTag = "ModuleSurfaceArea/Externs/Extern"
- for XmlExtern in XmlList(XmlMsa, XmlTag):
- XmlTag = "Extern/ModuleEntryPoint"
- ModuleEntryPoint = XmlElement(XmlExtern, XmlTag)
- XmlTag = "Extern/ModuleUnloadImage"
- ModuleUnloadImage = XmlElement(XmlExtern, XmlTag)
- if ModuleEntryPoint == "" and ModuleUnloadImage == "":
- continue
-
- ModuleExtern = ModuleExternImageClass()
- ModuleExtern.ModuleEntryPoint = ModuleEntryPoint
- ModuleExtern.ModuleUnloadImage = ModuleUnloadImage
- ModuleExternImages.append(ModuleExtern)
-
- return ModuleExternImages
-
-
-## Load a list of Module Extern Libraries.
-#
-# Read an input Module XML DOM object and return a list of Extern Libraries
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel ExternLibraries A list of Extern Libraries loaded from XmlMsa.
-#
-def LoadModuleExternLibraries(XmlMsa):
- ModuleExternLibraries = []
-
- XmlTag = "ModuleSurfaceArea/Externs/Extern"
- for XmlExtern in XmlList(XmlMsa, XmlTag):
- XmlTag = "Extern/Constructor"
- Constructor = XmlElement(XmlExtern, XmlTag)
- XmlTag = "Extern/Destructor"
- Destructor = XmlElement(XmlExtern, XmlTag)
- if Constructor == "" and Destructor == "":
- continue
-
- ModuleExtern = ModuleExternLibraryClass()
- ModuleExtern.Constructor = Constructor
- ModuleExtern.Destructor = Destructor
- ModuleExternLibraries.append(ModuleExtern)
-
- return ModuleExternLibraries
-
-
-## Load a list of Module Extern Drivers.
-#
-# Read an input Module XML DOM object and return a list of Extern Drivers
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel ExternDrivers A list of Extern Drivers loaded from XmlMsa.
-#
-def LoadModuleExternDrivers(XmlMsa):
- ModuleExternDrivers = []
-
- XmlTag = "ModuleSurfaceArea/Externs/Extern"
- for XmlExtern in XmlList(XmlMsa, XmlTag):
- XmlTag = "Extern/DriverBinding"
- DriverBinding = XmlElement(XmlExtern, XmlTag)
- XmlTag = "Extern/ComponentName"
- ComponentName = XmlElement(XmlExtern, XmlTag)
- XmlTag = "Extern/DriverConfig"
- DriverConfig = XmlElement(XmlExtern, XmlTag)
- XmlTag = "Extern/DriverDiag"
- DriverDiag = XmlElement(XmlExtern, XmlTag)
- if DriverBinding == "":
- continue
-
- ModuleExtern = ModuleExternDriverClass()
- ModuleExtern.DriverBinding = DriverBinding
- ModuleExtern.ComponentName = ComponentName
- ModuleExtern.DriverConfig = DriverConfig
- ModuleExtern.DriverDiag = DriverDiag
- ModuleExternDrivers.append(ModuleExtern)
-
- return ModuleExternDrivers
-
-
-## Load a list of Module Extern Call Backs.
-#
-# Read an input Module XML DOM object and return a list of Extern Call Backs
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel ExternCallBacks A list of Extern Call Backs loaded from XmlMsa.
-#
-def LoadModuleExternCallBacks(XmlMsa):
- ModuleExternCallBacks = []
-
- XmlTag = "ModuleSurfaceArea/Externs/Extern"
- for XmlExtern in XmlList(XmlMsa, XmlTag):
- XmlTag = "Extern/SetVirtualAddressMapCallBack"
- SetVirtualAddressMap = XmlElement(XmlExtern, XmlTag)
- XmlTag = "Extern/ExitBootServicesCallBack"
- ExitBootServices = XmlElement(XmlExtern, XmlTag)
- if SetVirtualAddressMap == "" and ExitBootServices == "":
- continue
-
- ModuleExtern = ModuleExternCallBackClass()
- ModuleExtern.ExitBootServicesCallBack = ExitBootServices
- ModuleExtern.SetVirtualAddressMapCallBack = SetVirtualAddressMap
- ModuleExternCallBacks.append(ModuleExtern)
-
- return ModuleExternCallBacks
-
-
-## Load a list of Module Build Options.
-#
-# Read an input Module XML DOM object and return a list of Build Options
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel BuildOptions A list of Build Options loaded from XmlMsa.
-#
-def LoadModuleBuildOptions(XmlMsa):
- XmlTag = "ModuleSurfaceArea/ModuleBuildOptions/Options/Option"
- return map(LoadBuildOption, XmlList(XmlMsa, XmlTag))
-
-
-## Load a list of Module User Extensions.
-#
-# Read an input Module XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlMsa An XML DOM object read from MSA file.
-#
-# @retvel UserExtensions A list of User Extensions loaded from XmlMsa.
-#
-def LoadModuleUserExtensions(XmlMsa):
- XmlTag = "ModuleSurfaceArea/UserExtensions"
- return map(LoadUserExtensions, XmlList(XmlMsa, XmlTag))
-
-## Load a new Module class object.
-#
-# Read an input MSA File and return a new Module class Object.
-#
-# @param MsaFileName An XML DOM object read from MSA file.
-#
-# @retvel Module A new Module class object loaded from MSA File.
-#
-def LoadMsa(MsaFileName):
- XmlMsa = XmlParseFile(MsaFileName)
- EdkLogger.verbose("Load MSA File: %s" % MsaFileName)
-
- Module = ModuleClass()
- Module.Header = LoadModuleHeader(XmlMsa, MsaFileName)
- Module.LibraryClasses = LoadModuleLibraryClasses(XmlMsa)
- Module.Sources = LoadModuleSources(XmlMsa)
- Module.BinaryFiles = LoadModuleBinaries(XmlMsa)
- Module.NonProcessedFiles = LoadModuleNonProcessedFiles(XmlMsa)
- Module.PackageDependencies = LoadModulePackageDependencies(XmlMsa)
- Module.Protocols = LoadModuleProtocols(XmlMsa)
- Module.Ppis = LoadModulePpis(XmlMsa)
- Module.Events = LoadModuleEvents(XmlMsa)
- Module.Hobs = LoadModuleHobs(XmlMsa)
- Module.Variables = LoadModuleVariables(XmlMsa)
- Module.BootModes = LoadModuleBootModes(XmlMsa)
- Module.SystemTables = LoadModuleSystemTables(XmlMsa)
- Module.DataHubs = LoadModuleDataHubs(XmlMsa)
- Module.HiiPackages = LoadModuleHiiPackages(XmlMsa)
- Module.Guids = LoadModuleGuids(XmlMsa)
- Module.PcdCodes = LoadModulePcdCodes(XmlMsa)
- Module.ExternImages = LoadModuleExternImages(XmlMsa)
- Module.ExternLibraries = LoadModuleExternLibraries(XmlMsa)
- Module.ExternDrivers = LoadModuleExternDrivers(XmlMsa)
- Module.ExternCallBacks = LoadModuleExternCallBacks(XmlMsa)
- Module.BuildOptions = LoadModuleBuildOptions(XmlMsa)
- Module.UserExtensions = LoadModuleUserExtensions(XmlMsa)
-
- return Module
-
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- pass \ No newline at end of file
diff --git a/BaseTools/Source/Python/msa2inf/Msa2Inf.py b/BaseTools/Source/Python/msa2inf/Msa2Inf.py
deleted file mode 100644
index 04c86026de..0000000000
--- a/BaseTools/Source/Python/msa2inf/Msa2Inf.py
+++ /dev/null
@@ -1,44 +0,0 @@
-## @file
-# Convert an XML-based MSA file to a text-based INF file.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import sys
-from Common.MigrationUtilities import *
-from LoadMsa import LoadMsa
-from StoreInf import StoreInf
-from ConvertModule import ConvertMsaModuleToInfModule
-
-## Entrance method
-#
-# This method mainly dispatch specific methods per the command line options.
-# If no error found, return zero value so the caller of this tool can know
-# if it's executed successfully or not.
-#
-# @retval 0 Tool was successful.
-# @retval 1 Tool failed.
-#
-def Main():
- try:
- Options, InputFile = MigrationOptionParser("MSA", "INF", "%prog")
- Module = LoadMsa(InputFile)
- ConvertMsaModuleToInfModule(Module)
- StoreInf(Options.OutputFile, Module)
- return 0
- except Exception, e:
- print e
- return 1
-
-if __name__ == '__main__':
- sys.exit(Main())
diff --git a/BaseTools/Source/Python/msa2inf/StoreInf.py b/BaseTools/Source/Python/msa2inf/StoreInf.py
deleted file mode 100644
index d7f6869d76..0000000000
--- a/BaseTools/Source/Python/msa2inf/StoreInf.py
+++ /dev/null
@@ -1,442 +0,0 @@
-## @file
-# Store a Module class object to an INF file.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-from LoadMsa import LoadMsa
-from CommonDataClass.ModuleClass import *
-from Common.MigrationUtilities import *
-
-## Get the produced library class.
-#
-# Return the item of Library Class based on Library .
-#
-# @param LibraryClasses A list of library classes the module produces.
-#
-# @retval LibraryClassItem A text format library class item.
-#
-def GetModuleLibraryClass(LibraryClasses):
- ProducedLibraryClasses = []
- for LibraryClass in LibraryClasses:
- ProducedLibraryClass = LibraryClass.LibraryClass
- SupportedModueTypes = " ".join(LibraryClass.SupModuleList)
- if SupportedModueTypes != "":
- ProducedLibraryClass += "|" + SupportedModueTypes
- ProducedLibraryClasses.append(ProducedLibraryClass)
-
- return "|".join(ProducedLibraryClasses)
-
-
-## Store Defines section.
-#
-# Write [Defines] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Defines section.
-# @param Module An input Module class object.
-#
-def StoreModuleDefinesSection(InfFile, Module):
- ModuleHeader = Module.Header
-
- DefinesTupleList = []
- DefinesTupleList.append(("INF_VERSION", ModuleHeader.InfVersion))
-
- if ModuleHeader.Name != "":
- DefinesTupleList.append(("BASE_NAME", ModuleHeader.Name))
-
- if ModuleHeader.Guid != "":
- DefinesTupleList.append(("FILE_GUID", ModuleHeader.Guid))
-
- if ModuleHeader.Version != "":
- DefinesTupleList.append(("VERSION_STRING", ModuleHeader.Version))
-
- if ModuleHeader.ModuleType != "":
- DefinesTupleList.append(("MODULE_TYPE", ModuleHeader.ModuleType))
-
- if ModuleHeader.UefiSpecificationVersion != "":
- DefinesTupleList.append(("UEFI_SPECIFICATION_VERSION", ModuleHeader.UefiSpecificationVersion))
-
- if ModuleHeader.EdkReleaseVersion != "":
- DefinesTupleList.append(("EDK_RELEASE_VERSION", ModuleHeader.EdkReleaseVersion))
-
- ProducedLibraryClass = GetModuleLibraryClass(ModuleHeader.LibraryClass)
- if ProducedLibraryClass != "":
- DefinesTupleList.append(("LIBRARY_CLASS", ProducedLibraryClass))
-
- if ModuleHeader.MakefileName != "":
- DefinesTupleList.append(("MAKEFILE_NAME", ModuleHeader.MakeFileName))
-
- if ModuleHeader.PcdIsDriver != "":
- DefinesTupleList.append(("PCD_DRIVER", "TRUE"))
-
- if len(Module.ExternImages) > 0:
- ModuleEntryPoint = Module.ExternImages[0].ModuleEntryPoint
- ModuleUnloadImage = Module.ExternImages[0].ModuleUnloadImage
- if ModuleEntryPoint != "":
- DefinesTupleList.append(("ENTRY_POINT", ModuleEntryPoint))
- if ModuleUnloadImage != "":
- DefinesTupleList.append(("UNLOAD_IMAGE", ModuleUnloadImage))
-
- if len(Module.ExternLibraries) > 0:
- Constructor = Module.ExternLibraries[0].Constructor
- Destructor = Module.ExternLibraries[0].Destructor
- if Constructor != "":
- DefinesTupleList.append(("CONSTRUCTOR", Constructor))
- if Destructor != "":
- DefinesTupleList.append(("DESTRUCTOR", Destructor))
-
- StoreDefinesSection(InfFile, DefinesTupleList)
-
-
-## Return a Module Source Item.
-#
-# Read the input ModuleSourceFile class object and return one line of Source Item.
-#
-# @param ModuleSourceFile An input ModuleSourceFile class object.
-#
-# @retval SourceItem A Module Source Item.
-#
-def GetModuleSourceItem(ModuleSourceFile):
- Source = []
- Source.append(ModuleSourceFile.SourceFile)
- Source.append(ModuleSourceFile.ToolChainFamily)
- Source.append(ModuleSourceFile.TagName)
- Source.append(ModuleSourceFile.ToolCode)
- Source.append(ModuleSourceFile.FeatureFlag)
- return "|".join(Source).rstrip("|")
-
-
-## Store Sources section.
-#
-# Write [Sources] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Sources section.
-# @param Module An input Module class object.
-#
-def StoreModuleSourcesSection(InfFile, Module):
- Section = GetSection("Sources", GetModuleSourceItem, Module.Sources)
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Binary Item.
-#
-# Read the input ModuleBinaryFile class object and return one line of Binary Item.
-#
-# @param ModuleBinaryFile An input ModuleBinaryFile class object.
-#
-# @retval BinaryItem A Module Binary Item.
-#
-def GetModuleBinaryItem(ModuleBinaryFile):
- Binary = []
- Binary.append(ModuleBinaryFile.FileType)
- Binary.append(ModuleBinaryFile.BinaryFile)
- Binary.append(ModuleBinaryFile.Target)
- Binary.append(ModuleBinaryFile.FeatureFlag)
- return "|".join(Binary).rstrip("|")
-
-
-## Store Binaries section.
-#
-# Write [Binaries] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Binaries section.
-# @param Module An input Module class object.
-#
-def StoreModuleBinariesSection(InfFile, Module):
- Section = GetSection("Binaries", GetModuleBinaryItem, Module.Binaries)
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Library Class Item.
-#
-# Read the input LibraryClass class object and return one line of Library Class Item.
-#
-# @param LibraryClass An input LibraryClass class object.
-#
-# @retval LibraryClassItem A Module Library Class Item.
-#
-def GetModuleLibraryClassItem(LibraryClass):
- if "ALWAYS_PRODUCED" in LibraryClass.Usage:
- return ""
-
- LibraryClassList = []
- LibraryClassList.append(LibraryClass.LibraryClass)
- LibraryClassList.append(LibraryClass.RecommendedInstance)
- LibraryClassList.append(LibraryClass.FeatureFlag)
-
- return "|".join(LibraryClassList).rstrip("|")
-
-
-## Store Library Classes section.
-#
-# Write [LibraryClasses] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Library Classes section.
-# @param Module An input Module class object.
-#
-def StoreModuleLibraryClassesSection(InfFile, Module):
- Section = GetSection("LibraryClasses", GetModuleLibraryClassItem, Module.LibraryClasses)
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Package Item.
-#
-# Read the input PackageDependency class object and return one line of Package Item.
-#
-# @param PackageDependency An input PackageDependency class object.
-#
-# @retval PackageItem A Module Package Item.
-#
-def GetModulePackageItem(PackageDependency):
- return PackageDependency.FilePath
-
-
-## Store Packages section.
-#
-# Write [Packages] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Packages section.
-# @param Module An input Module class object.
-#
-def StoreModulePackagesSection(InfFile, Module):
- Section = GetSection("Packages", GetModulePackageItem, Module.PackageDependencies)
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Guid C Name Item.
-#
-# Read the input Guid class object and return one line of Guid C Name Item.
-#
-# @param Guid An input Guid class object.
-#
-# @retval GuidCNameItem A Module Guid C Name Item.
-#
-def GetModuleGuidCNameItem(Guid):
- try:
- return Guid.GuidCName
- except:
- return Guid.CName
-
-
-## Store Protocols section.
-#
-# Write [Protocols] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Protocols section.
-# @param Module An input Module class object.
-#
-def StoreModuleProtocolsSection(InfFile, Module):
- Section = GetSection("Protocols", GetModuleGuidCNameItem, Module.Protocols)
- StoreTextFile(InfFile, Section)
-
-
-## Store Ppis section.
-#
-# Write [Ppis] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Ppis section.
-# @param Module An input Module class object.
-#
-def StoreModulePpisSection(InfFile, Module):
- Section = GetSection("Ppis", GetModuleGuidCNameItem, Module.Ppis)
- StoreTextFile(InfFile, Section)
-
-
-## Store Guids section.
-#
-# Write [Guids] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Guids section.
-# @param Module An input Module class object.
-#
-def StoreModuleGuidsSection(InfFile, Module):
- Guids = []
- Guids += Module.Guids
- Guids += Module.Events
- Guids += Module.Hobs
- Guids += Module.Variables
- Guids += Module.SystemTables
- Guids += Module.DataHubs
- Guids += Module.HiiPackages
- Section = GetSection("Guids", GetModuleGuidCNameItem, Guids)
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Pcd Item.
-#
-# Read the input Pcd class object and return one line of Pcd Item.
-#
-# @param Pcd An input Pcd class object.
-#
-# @retval PcdItem A Module Pcd Item.
-#
-def GetModulePcdItem(Pcd):
- PcdItem = "%s.%s" % (Pcd.TokenSpaceGuidCName, Pcd.CName)
- if Pcd.DefaultValue != "":
- PcdItem = "%s|%s" % (PcdItem, Pcd.DefaultValue)
-
- return PcdItem
-
-
-## DEC Pcd Section Name dictionary indexed by PCD Item Type.
-mInfPcdSectionNameDict = {
- "FEATURE_FLAG" : "FeaturePcd",
- "FIXED_AT_BUILD" : "FixedPcd",
- "PATCHABLE_IN_MODULE" : "PatchPcd",
- "DYNAMIC" : "Pcd",
- "DYNAMIC_EX" : "PcdEx"
- }
-
-## Store Pcds section.
-#
-# Write [(PcdType)] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Pcds section.
-# @param Module An input Module class object.
-#
-def StoreModulePcdsSection(InfFile, Module):
- PcdsDict = {}
- for Pcd in Module.PcdCodes:
- PcdSectionName = mInfPcdSectionNameDict.get(Pcd.ItemType)
- if PcdSectionName:
- PcdsDict.setdefault(PcdSectionName, []).append(Pcd)
- else:
- EdkLogger.info("Unknown Pcd Item Type: %s" % Pcd.ItemType)
-
- Section = ""
- for PcdSectionName in PcdsDict:
- Pcds = PcdsDict[PcdSectionName]
- Section += GetSection(PcdSectionName, GetModulePcdItem, Pcds)
- Section += "\n"
-
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Depex Item.
-#
-# Read the input Depex class object and return one line of Depex Item.
-#
-# @param Depex An input Depex class object.
-#
-# @retval DepexItem A Module Depex Item.
-#
-def GetModuleDepexItem(Depex):
- return Depex.Depex
-
-
-## Store Depex section.
-#
-# Write [Depex] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Depex section.
-# @param Module An input Module class object.
-#
-def StoreModuleDepexSection(InfFile, Module):
- Section = GetSection("Depex", GetModuleDepexItem, Module.Depex)
- StoreTextFile(InfFile, Section)
-
-
-## Return a Module Build Option Item.
-#
-# Read the input BuildOption class object and return one line of Build Option Item.
-#
-# @param BuildOption An input BuildOption class object.
-#
-# @retval BuildOptionItem A Module Build Option Item.
-#
-def GetModuleBuildOptionItem(BuildOption):
- BuildTarget = BuildOption.BuildTarget
- if BuildTarget == "":
- BuildTarget = "*"
-
- TagName = BuildOption.TagName
- if TagName == "":
- TagName = "*"
-
- ToolCode = BuildOption.ToolCode
- if ToolCode == "":
- ToolCode = "*"
-
- Item = "_".join((BuildTarget, TagName, "*", ToolCode, "Flag"))
-
- ToolChainFamily = BuildOption.ToolChainFamily
- if ToolChainFamily != "":
- Item = "%s:%s" % (ToolChainFamily, Item)
-
- return "%-30s = %s" % (Item, BuildOption.Option)
-
-
-## Store Build Options section.
-#
-# Write [BuildOptions] section to the InfFile based on Module class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param InfFile The output INF file to store the Build Options section.
-# @param Module An input Module class object.
-#
-def StoreModuleBuildOptionsSection(InfFile, Module):
- Section = GetSection("BuildOption", GetModuleBuildOptionItem, Module.BuildOptions)
- StoreTextFile(InfFile, Section)
-
-
-## Store User Extensions section.
-#
-# Write [UserExtensions] section to the InfFile based on Module class object.
-#
-# @param InfFile The output INF file to store the User Extensions section.
-# @param Module An input Module class object.
-#
-def StoreModuleUserExtensionsSection(InfFile, Module):
- Section = "".join(map(GetUserExtensions, Module.UserExtensions))
- StoreTextFile(InfFile, Section)
-
-
-## Store a Module class object to a new INF file.
-#
-# Read an input Module class object and save the contents to a new INF file.
-#
-# @param INFFileName The output INF file.
-# @param Module An input Package class object.
-#
-def StoreInf(InfFileName, Module):
- InfFile = open(InfFileName, "w+")
- EdkLogger.info("Save file to %s" % InfFileName)
-
- StoreHeader(InfFile, Module.Header)
- StoreModuleDefinesSection(InfFile, Module)
- StoreModuleSourcesSection(InfFile, Module)
- StoreModuleBinariesSection(InfFile, Module)
- StoreModulePackagesSection(InfFile, Module)
- StoreModuleLibraryClassesSection(InfFile, Module)
- StoreModuleProtocolsSection(InfFile, Module)
- StoreModulePpisSection(InfFile, Module)
- StoreModuleGuidsSection(InfFile, Module)
- StoreModulePcdsSection(InfFile, Module)
- StoreModuleDepexSection(InfFile, Module)
- StoreModuleBuildOptionsSection(InfFile, Module)
- StoreModuleUserExtensionsSection(InfFile, Module)
-
- InfFile.close()
-
-if __name__ == '__main__':
- pass
diff --git a/BaseTools/Source/Python/msa2inf/__init__.py b/BaseTools/Source/Python/msa2inf/__init__.py
deleted file mode 100644
index ed1749bd12..0000000000
--- a/BaseTools/Source/Python/msa2inf/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'msa2inf' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Source/Python/spd2dec/ConvertPackage.py b/BaseTools/Source/Python/spd2dec/ConvertPackage.py
deleted file mode 100644
index f074225280..0000000000
--- a/BaseTools/Source/Python/spd2dec/ConvertPackage.py
+++ /dev/null
@@ -1,66 +0,0 @@
-## @file
-# Convert an SPD Package class object ot a DEC Package class object by filling
-# some fields required by DEC file.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-from Common.MigrationUtilities import *
-from LoadSpd import LoadSpd
-from StoreDec import StoreDec
-
-#The default DEC version number tool generates.
-gDecVersion = "0x00010005"
-
-
-## Add required version information.
-#
-# Add the default DEC specification version to Package class object.
-#
-# @param Package An input Package class object.
-#
-def AddPackageMiscVersion(Package):
- PackageHeader = Package.Header
- PackageHeader.DecSpecification = gDecVersion
-
-## Add package include information.
-#
-# Adds the default "Include" folder to if that directory exists.
-#
-# @param Package An input Package class object.
-#
-def AddPackageInclude(Package):
- PackageDir = os.path.dirname(Package.Header.FullPath)
- DefaultIncludeDir = os.path.join(PackageDir, "Include")
- if os.path.exists(DefaultIncludeDir):
- Include = IncludeClass()
- Include.FilePath = "Include"
- Package.Includes.insert(0, Include)
-
-## Convert SPD Package class object to DEC Package class object.
-#
-# Convert SPD Package class ojbect to DEC Package class object by filling in
-# several information required by DEC file.
-#
-# @param Package An input Package class object.
-#
-def ConvertSpdPackageToDecPackage(Package):
- AddPackageMiscVersion(Package)
- AddPackageInclude(Package)
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- pass
- \ No newline at end of file
diff --git a/BaseTools/Source/Python/spd2dec/LoadSpd.py b/BaseTools/Source/Python/spd2dec/LoadSpd.py
deleted file mode 100644
index e82a9bfa80..0000000000
--- a/BaseTools/Source/Python/spd2dec/LoadSpd.py
+++ /dev/null
@@ -1,273 +0,0 @@
-## @file
-# Open an SPD file and load all its contents to a PackageClass object.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-from Common.XmlRoutines import *
-from Common.MigrationUtilities import *
-from CommonDataClass.PackageClass import *
-
-
-## Load a list of Package Cloned Records.
-#
-# Read an input Package XML DOM object and return a list of Cloned Records
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel ClonedRecords A list of Cloned Records loaded from XmlSpd.
-#
-def LoadPackageClonedRecords(XmlSpd):
- XmlTag = "PackageSurfaceArea/PackageDefinitions/ClonedFrom/Cloned"
- return map(LoadClonedRecord, XmlList(XmlSpd, XmlTag))
-
-
-## Load Package Header.
-#
-# Read an input Package XML DOM object and return Package Header class object
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-# @param SpdFileName The file path of SPD File.
-#
-# @retvel PackageHeader A new Package Header object loaded from XmlSpd.
-#
-def LoadPackageHeader(XmlSpd, SpdFileName):
- PackageHeader = PackageHeaderClass()
-
- XmlTag = "PackageSurfaceArea/SpdHeader"
- SpdHeader = XmlNode(XmlSpd, XmlTag)
-
- SetIdentification(PackageHeader, SpdHeader, "PackageName", SpdFileName)
- SetCommonHeader(PackageHeader, SpdHeader)
-
- XmlTag = "PackageSurfaceArea/PackageDefinitions/ReadOnly"
- if XmlElement(XmlSpd, XmlTag).lower() == "true":
- PackageHeader.ReadOnly = True
-
- XmlTag = "PackageSurfaceArea/PackageDefinitions/RePackage"
- if XmlElement(XmlSpd, XmlTag).lower() == "true":
- PackageHeader.RePackage = True
-
- PackageHeader.ClonedFrom = LoadPackageClonedRecords(XmlSpd)
-
- return PackageHeader
-
-
-## Load a list of Package Library Classes.
-#
-# Read an input Package XML DOM object and return a list of Library Classes
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel LibraryClasses A list of Library Classes loaded from XmlSpd.
-#
-def LoadPackageLibraryClasses(XmlSpd):
- XmlTag = "PackageSurfaceArea/LibraryClassDeclarations/LibraryClass"
- return map(LoadLibraryClass, XmlList(XmlSpd, XmlTag))
-
-
-## Load a new Package Industry Std Header class object.
-#
-# Read an input XML IndustryStdHeader DOM object and return an object of
-# Industry Std Header contained in the DOM object.
-#
-# @param XmlIndustryStdHeader A child XML DOM object in Package XML DOM.
-#
-# @retvel PackageIndustryStdHeader A new Industry Std Header object created by XmlIndustryStdHeader.
-#
-def LoadPackageIndustryStdHeader(XmlIndustryStdHeader):
- PackageIndustryStdHeader = PackageIndustryStdHeaderClass()
-
- XmlTag = "Name"
- Name = XmlAttribute(XmlIndustryStdHeader, XmlTag)
- PackageIndustryStdHeader.Name = Name
-
- XmlTag = "IndustryStdHeader/IncludeHeader"
- IncludeHeader = XmlElement(XmlIndustryStdHeader, XmlTag)
- PackageIndustryStdHeader.IncludeHeader = IncludeHeader
-
- SetCommon(PackageIndustryStdHeader, XmlIndustryStdHeader)
-
- return PackageIndustryStdHeader
-
-
-## Load a list of Package Industry Std Headers.
-#
-# Read an input Package XML DOM object and return a list of Industry Std Headers
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel IndustryStdHeaders A list of Industry Std Headers loaded from XmlSpd.
-#
-def LoadPackageIndustryStdHeaders(XmlSpd):
- XmlTag = "PackageSurfaceArea/IndustryStdIncludes/IndustryStdHeader"
- return map(LoadPackageIndustryStdHeader, XmlList(XmlSpd, XmlTag))
-
-
-## Load a list of Package Module Files.
-#
-# Read an input Package XML DOM object and return a list of Module Files
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel ModuleFiles A list of Module Files loaded from XmlSpd.
-#
-def LoadPackageModuleFiles(XmlSpd):
- XmlTag = "PackageSurfaceArea/MsaFiles/Filename"
- return XmlElementList(XmlSpd, XmlTag)
-
-
-## Load a new Package Include Pkg Header class object.
-#
-# Read an input XML IncludePkgHeader DOM object and return an object of Include
-# Package Header contained in the DOM object.
-#
-# @param XmlPackageIncludeHeader A child XML DOM object in Package XML DOM.
-#
-# @retvel PackageIncludePkgHeader A new Include Pkg Header object created by
-# XmlPackageIncludeHeader.
-#
-def LoadPackageIncludePkgHeader(XmlPackageIncludeHeader):
- PackageIncludeHeader = PackageIncludePkgHeaderClass()
-
- IncludeHeader = XmlElementData(XmlPackageIncludeHeader)
- PackageIncludeHeader.IncludeHeader = IncludeHeader
-
- XmlTag = "ModuleType"
- ModuleTypes = XmlAttribute(XmlPackageIncludeHeader, XmlTag)
- PackageIncludeHeader.ModuleType = ModuleTypes.split()
-
- return PackageIncludeHeader
-
-
-## Load a list of Package Include Pkg Headers.
-#
-# Read an input Package XML DOM object and return a list of Include Pkg Headers
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel IncludePkgHeaders A list of Include Pkg Headers loaded from XmlSpd.
-#
-def LoadPackageIncludePkgHeaders(XmlSpd):
- XmlTag = "PackageSurfaceArea/PackageHeaders/IncludePkgHeader"
- return map(LoadPackageIncludePkgHeader, XmlList(XmlSpd, XmlTag))
-
-
-## Load a list of Package Guid Declarations.
-#
-# Read an input Package XML DOM object and return a list of Guid Declarations
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel GuidDeclarations A list of Guid Declarations loaded from XmlSpd.
-#
-def LoadPackageGuidDeclarations(XmlSpd):
- XmlTag = "PackageSurfaceArea/GuidDeclarations/Entry"
- return map(LoadGuidProtocolPpiCommon, XmlList(XmlSpd, XmlTag))
-
-
-## Load a list of Package Protocol Declarations.
-#
-# Read an input Package XML DOM object and return a list of Protocol Declarations
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel ProtocolDeclarations A list of Protocol Declarations loaded from XmlSpd.
-#
-def LoadPackageProtocolDeclarations(XmlSpd):
- XmlTag = "PackageSurfaceArea/ProtocolDeclarations/Entry"
- return map(LoadGuidProtocolPpiCommon, XmlList(XmlSpd, XmlTag))
-
-
-## Load a list of Package Ppi Declarations.
-#
-# Read an input Package XML DOM object and return a list of Ppi Declarations
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel PpiDeclarations A list of Ppi Declarations loaded from XmlSpd.
-#
-def LoadPackagePpiDeclarations(XmlSpd):
- XmlTag = "PackageSurfaceArea/PpiDeclarations/Entry"
- return map(LoadGuidProtocolPpiCommon, XmlList(XmlSpd, XmlTag))
-
-
-## Load a list of Package Pcd Declarations.
-#
-# Read an input Package XML DOM object and return a list of Pcd Declarations
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel PcdDeclarations A list of Pcd Declarations loaded from XmlSpd.
-#
-def LoadPackagePcdDeclarations(XmlSpd):
- XmlTag = "PackageSurfaceArea/PcdDeclarations/PcdEntry"
- return map(LoadPcd, XmlList(XmlSpd, XmlTag))
-
-
-## Load a list of Package User Extensions.
-#
-# Read an input Package XML DOM object and return a list of User Extensions
-# contained in the DOM object.
-#
-# @param XmlSpd An XML DOM object read from SPD file.
-#
-# @retvel UserExtensions A list of User Extensions loaded from XmlSpd.
-#
-def LoadPackageUserExtensions(XmlSpd):
- XmlTag = "PackageSurfaceArea/UserExtensions"
- return map(LoadUserExtensions, XmlList(XmlSpd, XmlTag))
-
-
-## Load a new Package class object.
-#
-# Read an input SPD File and return a new Package class Object.
-#
-# @param SpdFileName An XML DOM object read from SPD file.
-#
-# @retvel Package A new Module class object loaded from SPD File.
-#
-def LoadSpd(SpdFileName):
- XmlSpd = XmlParseFile(SpdFileName)
- EdkLogger.verbose("Xml Object loaded for file %s" % SpdFileName)
-
- Package = PackageClass()
- Package.Header = LoadPackageHeader(XmlSpd, SpdFileName)
- Package.LibraryClassDeclarations = LoadPackageLibraryClasses(XmlSpd)
- Package.IndustryStdHeaders = LoadPackageIndustryStdHeaders(XmlSpd)
- Package.ModuleFiles = LoadPackageModuleFiles(XmlSpd)
- Package.PackageIncludePkgHeaders = LoadPackageIncludePkgHeaders(XmlSpd)
- Package.GuidDeclarations = LoadPackageGuidDeclarations(XmlSpd)
- Package.ProtocolDeclarations = LoadPackageProtocolDeclarations(XmlSpd)
- Package.PpiDeclarations = LoadPackagePpiDeclarations(XmlSpd)
- Package.PcdDeclarations = LoadPackagePcdDeclarations(XmlSpd)
- Package.UserExtensions = LoadPackageUserExtensions(XmlSpd)
-
- return Package
-
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- pass
diff --git a/BaseTools/Source/Python/spd2dec/Spd2Dec.py b/BaseTools/Source/Python/spd2dec/Spd2Dec.py
deleted file mode 100644
index 2d2814ae0d..0000000000
--- a/BaseTools/Source/Python/spd2dec/Spd2Dec.py
+++ /dev/null
@@ -1,46 +0,0 @@
-## @file
-# Convert an XML-based SPD file to a text-based DEC file.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import sys
-from Common.MigrationUtilities import *
-from LoadSpd import LoadSpd
-from StoreDec import StoreDec
-from ConvertPackage import ConvertSpdPackageToDecPackage
-
-## Entrance method
-#
-# This method mainly dispatch specific methods per the command line options.
-# If no error found, return zero value so the caller of this tool can know
-# if it's executed successfully or not.
-#
-# @retval 0 Tool was successful.
-# @retval 1 Tool failed.
-#
-def Main():
- try:
- Options, InputFile = MigrationOptionParser("SPD", "DEC", "%prog")
- Package = LoadSpd(InputFile)
- ConvertSpdPackageToDecPackage(Package)
- StoreDec(Options.OutputFile, Package)
- return 0
- except Exception, e:
- print e
- return 1
-
-if __name__ == '__main__':
- sys.exit(Main())
-
-
diff --git a/BaseTools/Source/Python/spd2dec/StoreDec.py b/BaseTools/Source/Python/spd2dec/StoreDec.py
deleted file mode 100644
index f3805f6210..0000000000
--- a/BaseTools/Source/Python/spd2dec/StoreDec.py
+++ /dev/null
@@ -1,247 +0,0 @@
-## @file
-# Store a Package class object to a DEC file.
-#
-# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-##
-# Import Modules
-#
-import os
-from Common.MigrationUtilities import *
-from LoadSpd import LoadSpd
-from CommonDataClass.PackageClass import *
-
-
-## Store Defines section.
-#
-# Write [Defines] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Defines section.
-# @param Package An input Package class object.
-#
-def StorePackageDefinesSection(DecFile, Package):
- DefinesTupleList = []
- DefinesTupleList.append(("DEC_VERSION", Package.Header.DecSpecification))
- DefinesTupleList.append(("PACKAGE_NAME", Package.Header.Name))
- DefinesTupleList.append(("PACKAGE_GUID", Package.Header.Guid))
-
- StoreDefinesSection(DecFile, DefinesTupleList)
-
-
-## Return a Package Include Class Item.
-#
-# Read the input Include class object and return one Include Class Item.
-#
-# @param Include An input Include class object.
-#
-# @retval IncludeClassItem A Package Include Class Item.
-#
-def GetPackageIncludeClassItem(Include):
- return Include.FilePath
-
-
-## Store Includes section.
-#
-# Write [Includes] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Includes section.
-# @param Package An input Package class object.
-#
-def StorePackageIncludesSection(DecFile, Package):
- Includes = Package.Includes
- Section = GetSection("Includes", GetPackageIncludeClassItem, Includes)
- StoreTextFile(DecFile, Section)
-
-
-## Return a Package Library Class Item.
-#
-# Read the input LibraryClass class object and return one Library Class Item.
-#
-# @param LibraryClass An input LibraryClass class object.
-#
-# @retval LibraryClassItem A Package Library Class Item.
-#
-def GetPackageLibraryClassItem(LibraryClass):
- return "|".join((LibraryClass.LibraryClass, LibraryClass.IncludeHeader))
-
-
-## Store Library Classes section.
-#
-# Write [LibraryClasses] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Library Classes
-# section.
-# @param Package An input Package class object.
-#
-def StorePackageLibraryClassesSection(DecFile, Package):
- LibraryClasses = Package.LibraryClassDeclarations
- Section = GetSection("LibraryClasses", GetPackageLibraryClassItem, LibraryClasses)
- StoreTextFile(DecFile, Section)
-
-
-## Return a Package Guid Declaration Item.
-#
-# Read the input Guid class object and return one line of Guid Declaration Item.
-#
-# @param Guid An input Guid class object.
-#
-# @retval GuidDeclarationItem A Package Guid Declaration Item.
-#
-def GetPackageGuidDeclarationItem(Guid):
- GuidCName = Guid.CName
- GuidValue = Guid.Guid.replace("-", "")
- GuidValueList = [GuidValue[0:8]]
- GuidValueList += [GuidValue[i : i + 4] for i in range(8, 16, 4)]
- GuidValueList += [GuidValue[i : i + 2] for i in range(16, 32, 2)]
-
- GuidCFormat = "{0x%s" + ", 0x%s" * 2 + ", {0x%s" + ", 0x%s" * 7 + "}}"
- GuidCValue = GuidCFormat % tuple(GuidValueList)
- return "%-30s = %s" % (GuidCName, GuidCValue)
-
-
-## Store Protocols section.
-#
-# Write [Protocols] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Protocols section.
-# @param Package An input Package class object.
-#
-def StorePackageProtocolsSection(DecFile, Package):
- Protocols = Package.ProtocolDeclarations
- Section = GetSection("Protocols", GetPackageGuidDeclarationItem, Protocols)
- StoreTextFile(DecFile, Section)
-
-
-## Store Ppis section.
-#
-# Write [Ppis] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Ppis section.
-# @param Package An input Package class object.
-#
-def StorePackagePpisSection(DecFile, Package):
- Ppis = Package.PpiDeclarations
- Section = GetSection("Ppis", GetPackageGuidDeclarationItem, Ppis)
- StoreTextFile(DecFile, Section)
-
-
-## Store Guids section.
-#
-# Write [Guids] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Guids section.
-# @param Package An input Package class object.
-#
-def StorePackageGuidsSection(DecFile, Package):
- Guids = Package.GuidDeclarations
- Section = GetSection("Guids", GetPackageGuidDeclarationItem, Guids)
- StoreTextFile(DecFile, Section)
-
-
-## Return a Package Pcd Item.
-#
-# Read the input Pcd class object and return one line of Pcd Item.
-#
-# @param Pcd An input Pcd class object.
-#
-# @retval PcdItem A Package Pcd Item.
-#
-def GetPackagePcdItem(Pcd):
- PcdPair = "%s.%s" % (Pcd.TokenSpaceGuidCName, Pcd.CName)
- DatumType = Pcd.DatumType
- DefaultValue = Pcd.DefaultValue
- Token = Pcd.Token
- PcdList = [PcdPair, DefaultValue, DatumType, Token]
- return "|".join(PcdList)
-
-
-## DEC Pcd Section Name dictionary indexed by PCD Item Type.
-mDecPcdSectionNameDict = {
- "FEATURE_FLAG" : "PcdsFeatureFlag",
- "FIXED_AT_BUILD" : "PcdsFixedAtBuild",
- "PATCHABLE_IN_MODULE" : "PcdsPatchableInModule",
- "DYNAMIC" : "PcdsDynamic",
- "DYNAMIC_EX" : "PcdsDynamicEx"
- }
-
-## Store Pcds section.
-#
-# Write [Pcds*] section to the DecFile based on Package class object.
-# Different CPU architectures are specified in the subsection if possible.
-#
-# @param DecFile The output DEC file to store the Pcds section.
-# @param Package An input Package class object.
-#
-def StorePackagePcdsSection(DecFile, Package):
- PcdsDict = {}
- for Pcd in Package.PcdDeclarations:
- for PcdItemType in Pcd.ValidUsage:
- PcdSectionName = mDecPcdSectionNameDict.get(PcdItemType)
- if PcdSectionName:
- PcdsDict.setdefault(PcdSectionName, []).append(Pcd)
- else:
- EdkLogger.info("Unknown Pcd Item Type: %s" % PcdItemType)
-
- Section = ""
- for PcdSectionName in PcdsDict:
- Pcds = PcdsDict[PcdSectionName]
- Section += GetSection(PcdSectionName, GetPackagePcdItem, Pcds)
-
- StoreTextFile(DecFile, Section)
-
-
-## Store User Extensions section.
-#
-# Write [UserExtensions] section to the DecFile based on Package class object.
-#
-# @param DecFile The output DEC file to store the User Extensions section.
-# @param Package An input Package class object.
-#
-def StorePackageUserExtensionsSection(DecFile, Package):
- Section = "".join(map(GetUserExtensions, Package.UserExtensions))
- StoreTextFile(DecFile, Section)
-
-
-## Store a Package class object to a new DEC file.
-#
-# Read an input Package class object and ave the contents to a new DEC file.
-#
-# @param DecFileName The output DEC file.
-# @param Package An input Package class object.
-#
-def StoreDec(DecFileName, Package):
- DecFile = open(DecFileName, "w+")
- EdkLogger.info("Save file to %s" % DecFileName)
-
- StoreHeader(DecFile, Package.Header)
- StorePackageDefinesSection(DecFile, Package)
- StorePackageIncludesSection(DecFile, Package)
- StorePackageLibraryClassesSection(DecFile, Package)
- StorePackageProtocolsSection(DecFile, Package)
- StorePackagePpisSection(DecFile, Package)
- StorePackageGuidsSection(DecFile, Package)
- StorePackagePcdsSection(DecFile, Package)
- StorePackageUserExtensionsSection(DecFile, Package)
-
- DecFile.close()
-
-
-# This acts like the main() function for the script, unless it is 'import'ed
-# into another script.
-if __name__ == '__main__':
- pass
- \ No newline at end of file
diff --git a/BaseTools/Source/Python/spd2dec/__init__.py b/BaseTools/Source/Python/spd2dec/__init__.py
deleted file mode 100644
index 41e5b2656e..0000000000
--- a/BaseTools/Source/Python/spd2dec/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-## @file
-# Python 'spd2dec' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
diff --git a/BaseTools/Tests/TestTools.py b/BaseTools/Tests/TestTools.py
index 4a70e92bcd..e838ae4294 100644
--- a/BaseTools/Tests/TestTools.py
+++ b/BaseTools/Tests/TestTools.py
@@ -1,7 +1,7 @@
## @file
# Utility functions and classes for BaseTools unit tests
#
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -41,21 +41,20 @@ def MakeTheTestSuite(localItems):
tests.append(item())
return lambda: unittest.TestSuite(tests)
-def GetBaseToolsPath():
+def GetBaseToolsPaths():
if sys.platform in ('win32', 'win64'):
- return os.path.join(BaseToolsDir, 'Bin', sys.platform.title())
- elif sys.platform in ('cygwin'):
- uname = os.popen('uname -sm').read().strip()
- for char in (' ', '/'):
- uname = uname.replace(char, '-')
- return os.path.join(BaseToolsDir, 'Bin', uname)
+ return [ os.path.join(BaseToolsDir, 'Bin', sys.platform.title()) ]
else:
uname = os.popen('uname -sm').read().strip()
for char in (' ', '/'):
uname = uname.replace(char, '-')
- return os.path.join(BaseToolsDir, 'BinWrappers', uname)
+ return [
+ os.path.join(BaseToolsDir, 'Bin', uname),
+ os.path.join(BaseToolsDir, 'BinWrappers', uname),
+ os.path.join(BaseToolsDir, 'BinWrappers', 'PosixLike')
+ ]
-BaseToolsBinPath = GetBaseToolsPath()
+BaseToolsBinPaths = GetBaseToolsPaths()
class BaseToolsTest(unittest.TestCase):
@@ -93,6 +92,14 @@ class BaseToolsTest(unittest.TestCase):
sys.stdout.write(self.ReadTmpFile(fileName))
sys.stdout.flush()
+ def FindToolBin(self, toolName):
+ for binPath in BaseToolsBinPaths:
+ bin = os.path.join(binPath, toolName)
+ if os.path.exists(bin):
+ break
+ assert os.path.exists(bin)
+ return bin
+
def RunTool(self, *args, **kwd):
if 'toolName' in kwd: toolName = kwd['toolName']
else: toolName = None
@@ -100,7 +107,7 @@ class BaseToolsTest(unittest.TestCase):
else: logFile = None
if toolName is None: toolName = self.toolName
- bin = os.path.join(self.baseToolsBins, toolName)
+ bin = self.FindToolBin(toolName)
if logFile is not None:
logFile = open(os.path.join(self.testDir, logFile), 'w')
popenOut = logFile
@@ -154,9 +161,9 @@ class BaseToolsTest(unittest.TestCase):
self.savedEnvPath = os.environ['PATH']
self.savedSysPath = sys.path[:]
- self.baseToolsBins = BaseToolsBinPath
- os.environ['PATH'] = \
- os.path.pathsep.join((os.environ['PATH'], self.baseToolsBins))
+ for binPath in BaseToolsBinPaths:
+ os.environ['PATH'] = \
+ os.path.pathsep.join((os.environ['PATH'], binPath))
self.testDir = TestTempDir
if not os.path.exists(self.testDir):
diff --git a/BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf b/BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf
index b7935af694..8906913171 100644
--- a/BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf
+++ b/BaseTools/UserManuals/LzmaCompress_Utility_Man_Page.rtf
@@ -1,27 +1,27 @@
{\rtf1\adeflang1025\ansi\ansicpg936\uc2\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe2052\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}
{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}
-{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Verdana{\*\falt Verdana};}{\f40\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}
-{\f42\fbidi \fmodern\fcharset0\fprq1{\*\panose 020b0609020204030204}Consolas;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana{\*\falt Verdana};}{\f40\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@\'cb\'ce\'cc\'e5;}
+{\f41\fbidi \fmodern\fcharset0\fprq1{\*\panose 020b0609020204030204}Consolas;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbmajor\f31501\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbminor\f31505\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
-{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f45\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f46\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
-{\f48\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f49\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f50\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f51\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
-{\f52\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f53\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f55\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f56\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
-{\f58\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f59\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f60\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f61\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
-{\f62\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f63\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f65\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f66\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}
-{\f68\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f69\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f70\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f71\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
-{\f72\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f73\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f177\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f385\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
-{\f386\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f388\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f389\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f392\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
-{\f393\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f415\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f416\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f418\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}
-{\f419\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f422\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f423\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f425\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}
-{\f426\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f428\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;}{\f429\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;}{\f430\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}
-{\f431\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f432\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f433\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f434\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}
-{\f435\fbidi \fswiss\fcharset238\fprq2 Verdana CE{\*\falt Verdana};}{\f436\fbidi \fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Verdana};}{\f438\fbidi \fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Verdana};}
-{\f439\fbidi \fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Verdana};}{\f442\fbidi \fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Verdana};}{\f443\fbidi \fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Verdana};}
-{\f447\fbidi \fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\f465\fbidi \fmodern\fcharset238\fprq1 Consolas CE;}{\f466\fbidi \fmodern\fcharset204\fprq1 Consolas Cyr;}{\f468\fbidi \fmodern\fcharset161\fprq1 Consolas Greek;}
-{\f469\fbidi \fmodern\fcharset162\fprq1 Consolas Tur;}{\f472\fbidi \fmodern\fcharset186\fprq1 Consolas Baltic;}{\f473\fbidi \fmodern\fcharset163\fprq1 Consolas (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f245\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f246\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f248\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f249\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f250\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f251\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f252\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f253\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f255\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f256\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
+{\f258\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f259\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f260\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f261\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
+{\f262\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f263\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f265\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}{\f266\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}
+{\f268\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f269\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f270\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f271\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}
+{\f272\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f273\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f377\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f585\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
+{\f586\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f588\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f589\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f592\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
+{\f593\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f615\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f616\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f618\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}
+{\f619\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f622\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f623\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f625\fbidi \fswiss\fcharset238\fprq2 Tahoma CE;}
+{\f626\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f628\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek;}{\f629\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur;}{\f630\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew);}
+{\f631\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f632\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f633\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f634\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai);}
+{\f635\fbidi \fswiss\fcharset238\fprq2 Verdana CE{\*\falt Verdana};}{\f636\fbidi \fswiss\fcharset204\fprq2 Verdana Cyr{\*\falt Verdana};}{\f638\fbidi \fswiss\fcharset161\fprq2 Verdana Greek{\*\falt Verdana};}
+{\f639\fbidi \fswiss\fcharset162\fprq2 Verdana Tur{\*\falt Verdana};}{\f642\fbidi \fswiss\fcharset186\fprq2 Verdana Baltic{\*\falt Verdana};}{\f643\fbidi \fswiss\fcharset163\fprq2 Verdana (Vietnamese){\*\falt Verdana};}
+{\f647\fbidi \fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\f655\fbidi \fmodern\fcharset238\fprq1 Consolas CE;}{\f656\fbidi \fmodern\fcharset204\fprq1 Consolas Cyr;}{\f658\fbidi \fmodern\fcharset161\fprq1 Consolas Greek;}
+{\f659\fbidi \fmodern\fcharset162\fprq1 Consolas Tur;}{\f662\fbidi \fmodern\fcharset186\fprq1 Consolas Baltic;}{\f663\fbidi \fmodern\fcharset163\fprq1 Consolas (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31520\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}
@@ -43,21 +43,22 @@
\fs24\lang1033\langfe1033\loch\f39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\f39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \slink15 \sqformat heading 1;}{\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025
\ltrch\fcs0 \fs24\lang1033\langfe1033\loch\f39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \slink16 \sqformat heading 2;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
-\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
-\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext11 \ssemihidden \sunhideused
-Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\kerning32\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink1 \slocked \spriority9 Heading 1 Char;}{\*\cs16 \additive \rtlch\fcs1 \ab\ai\af0\afs28 \ltrch\fcs0
-\b\i\fs28\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink2 \slocked Heading 2 Char;}{\s17\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af38\afs16\alang1025 \ltrch\fcs0
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052
+\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\kerning32\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink1 \slocked \spriority9 Heading 1 Char;}{\*\cs16 \additive
+\rtlch\fcs1 \ab\ai\af0\afs28 \ltrch\fcs0 \b\i\fs28\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink2 \slocked Heading 2 Char;}{\s17\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af38\afs16\alang1025 \ltrch\fcs0
\fs16\lang1033\langfe1033\loch\f38\hich\af38\dbch\af31505\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 \slink18 \ssemihidden \sunhideused \styrsid1535607 Balloon Text;}{\*\cs18 \additive \rtlch\fcs1 \af38\afs16 \ltrch\fcs0 \f38\fs16
\sbasedon10 \slink17 \slocked \ssemihidden \styrsid1535607 Balloon Text Char;}{\s19\ql \li0\ri20\sb60\sa60\sl-200\slmult0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin20\lin0\itap0 \rtlch\fcs1 \af0\afs16\alang1025 \ltrch\fcs0
\fs16\cf1\lang1033\langfe1033\loch\f39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext19 \spriority0 \styrsid13255892 CellBodyLeft;}{\*\cs20 \additive \b\f2\cf13 \spriority0 \styrsid13255892 CodeCharacter;}{\*\ts21\tsrowd\trbrdrt
\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
-\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052
-\sbasedon11 \snext21 \spriority59 \styrsid13255892 Table Grid;}}{\*\rsidtbl \rsid200707\rsid1535607\rsid3478841\rsid4999604\rsid5140827\rsid5788588\rsid5911148\rsid8600807\rsid9728962\rsid10095135\rsid11874792\rsid12198464\rsid13255892}{\mmathPr
-\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator ydliu}{\creatim\yr2010\mo10\dy6\hr16\min2}{\revtim\yr2011\mo8\dy10\hr9\min52}{\version10}{\edmins20}{\nofpages3}
-{\nofwords429}{\nofchars2446}{\nofcharsws2870}{\vern49255}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\sbasedon11 \snext21 \spriority59 \styrsid13255892 Table Grid;}}{\*\revtbl {Unknown;}{lgao4;}}{\*\rsidtbl \rsid200707\rsid1530076\rsid1535607\rsid1840106\rsid2567646\rsid3478841\rsid4929157\rsid4999604\rsid5140827\rsid5788588\rsid5911148\rsid8600807\rsid9728962\rsid10095135
+\rsid10558486\rsid11685714\rsid11874792\rsid12003746\rsid12126252\rsid12198464\rsid13058712\rsid13255892\rsid13715311}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info
+{\operator lgao4}{\creatim\yr2010\mo10\dy6\hr16\min2}{\revtim\yr2012\mo3\dy13\hr10\min34}{\version19}{\edmins44}{\nofpages3}{\nofwords536}{\nofchars2849}{\nofcharsws3379}{\vern32773}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/word
+ml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
\deftab360\ftnbj\aenddoc\revisions\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120
-\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale135\rsidroot5140827 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang
+\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot5140827 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang
{\pntxta \dbch .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5
\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8
\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\s2\ql \fi-2830\li1390\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar
@@ -68,14 +69,15 @@ Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\k
\par }\pard\plain \ltrpar\s2\ql \fi-1300\li-90\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx0\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-90\itap0\pararsid9728962 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Synopsis
\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs18
-\ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 LzmaCompress}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 [-v | -q | -}{\rtlch\fcs1
-\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid5788588 -}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 d}{\rtlch\fcs1 \ab\af39\afs18
-\ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid5788588 \hich\af39\dbch\af31505\loch\f39 ebug <\hich\af39\dbch\af31505\loch\f39 Level\hich\af39\dbch\af31505\loch\f39 >}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
-\b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 ]}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 -e|-d}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
-\b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 [-o }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid10095135 \hich\af39\dbch\af31505\loch\f39 <}{\rtlch\fcs1
-\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 OutputFile}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid10095135
-\hich\af39\dbch\af31505\loch\f39 >}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 ]}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827
-\hich\af39\dbch\af31505\loch\f39 <inputFile>}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid5140827
+\ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 LzmaCompress}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 [-v | -q | }{\rtlch\fcs1
+\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm654533262\langfenp2052\insrsid4929157 \hich\af39\dbch\af31505\loch\f39 --f86 | }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 -}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid5788588 -}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 d}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid5788588 \hich\af39\dbch\af31505\loch\f39 ebug <Level>}{\rtlch\fcs1
+\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 ]}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 -e|-d}{\rtlch\fcs1
+\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 [-o }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid10095135
+\hich\af39\dbch\af31505\loch\f39 <}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 OutputFile}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid10095135 \hich\af39\dbch\af31505\loch\f39 >}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 ]}{\rtlch\fcs1
+\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 <inputFile>}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid5140827
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 LzmaCompress}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39
\hich\f39 \endash \loch\f39 h
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid9728962 \hich\af39\dbch\af31505\loch\f39 LzmaCompress}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid9728962 \hich\af39\dbch\af31505\loch\f39
@@ -83,14 +85,24 @@ Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\k
\par }\pard\plain \ltrpar\s2\ql \fi-2740\li1300\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx720\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin1300\itap0\pararsid9728962 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Description
\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af39\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 \hich\f39 The LzmaCompress tool is used to encode or decode files with LZMA encode or decode algorithm. When \'93\loch\f39 \hich\f39 -e\'94\loch\f39 \hich\f39
- option is specified in the command line the tool will encode the input file with LZMA encode algorithm; when \'93\loch\f39 \hich\f39 -d\'94\loch\f39 opt\hich\af39\dbch\af31505\loch\f39
-ion is specified in the command line the tool will decode the input file with LZMA decode algorithm. When decoding file, this tool performs some rudimentary checking on the input files to verify they are compressed by LZMA algorithm. These checks include
-\hich\af39\dbch\af31505\loch\f39 :\hich\af39\dbch\af31505\loch\f39
+\ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 \hich\f39 The LzmaCompress tool is used to encode or decode files with LZMA encode or decode algorithm. When \'93\loch\f39 \hich\f39 -e\'94\loch\f39
+ option is specified in the command line the tool will encode the input file with LZMA encode algorith\hich\af39\dbch\af31505\loch\f39 \hich\f39 m; when \'93\loch\f39 \hich\f39 -d\'94\loch\f39
+ option is specified in the command line the tool will decode the input file with LZMA decode algorithm. }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392165\langfenp2052\insrsid4929157
+\loch\af39\dbch\af31505\hich\f39 \'93}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm654533262\langfenp2052\insrsid4929157 \loch\af39\dbch\af31505\hich\f39 \emdash \loch\f39 f86}{\rtlch\fcs1 \af39\afs18
+\ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392165\langfenp2052\insrsid11685714 \hich\af39\dbch\af31505\loch\f39 " option }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392166\langfenp2052\insrsid11685714 \hich\af39\dbch\af31505\loch\f39 is specified to enable }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392180\langfenp2052\insrsid13058712 \hich\af39\dbch\af31505\loch\f39 converter for x}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392166\langfenp2052\insrsid11685714 \hich\af39\dbch\af31505\loch\f39 86 code that can improve the compress ratio }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392167\langfenp2052\insrsid1840106 \hich\af39\dbch\af31505\loch\f39 for }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392171\langfenp2052\insrsid1840106 \hich\af39\dbch\af31505\loch\f39 IA32 or X64 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392167\langfenp2052\insrsid1840106 \hich\af39\dbch\af31505\loch\f39 PE image}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392171\langfenp2052\insrsid1840106 .}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392167\langfenp2052\insrsid1840106
+\hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39
+When decoding file, this tool performs some rudimentary checking on the input files to verify they are compressed by LZMA algorithm. These checks include:
\par \hich\af39\dbch\af31505\loch\f39 The input file header (5 + 8 bytes header);
-\par \hich\af39\dbch\af31505\loch\f39 The first 5 bytes is the attribute of compression.
+\par \hich\af39\dbch\af31505\loch\f39 The first 5 bytes is the attribute of compressi\hich\af39\dbch\af31505\loch\f39 on.
\par \hich\af39\dbch\af31505\loch\f39 The following 8 bytes is original size which is the input file size and it is the decompressed file size.
-\par \hich\af39\dbch\af31505\loch\f39 While encoding file, this tool does n\hich\af39\dbch\af31505\loch\f39 ot perform any checking.
+\par \hich\af39\dbch\af31505\loch\f39 While encoding file, this tool does not perform any checking.
\par }\pard\plain \ltrpar\s2\ql \fi-4810\li3460\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx0\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin3460\itap0\pararsid9728962 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Options
\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af39\afs18
@@ -102,20 +114,29 @@ ion is specified in the command line the tool will decode the input file with LZ
Decode the input file, which means to decompress the input file
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 -o, --output Filename}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid5140827
\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 The file containing encoded or decoded content of input file
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 --version
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13715311 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191392161\insrsid13715311 -}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm654533263\langfenp2052\insrsid4929157 -}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm654533262\langfenp2052\insrsid4929157
+\hich\af39\dbch\af31505\loch\f39 f}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392161\langfenp2052\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 86}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0
+\f0\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392161\langfenp2052\insrsid13715311
+\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191392161\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191392161\insrsid10558486
+\hich\af39\dbch\af31505\loch\f39 enable conver}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392179\langfenp2052\insrsid10558486 \hich\af39\dbch\af31505\loch\f39 ter}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\revauth1\revdttm1191392161\insrsid13715311\charrsid13715311 \hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392179\langfenp2052\insrsid10558486
+\hich\af39\dbch\af31505\loch\f39 for }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191392161\insrsid13715311\charrsid13715311 \hich\af39\dbch\af31505\loch\f39 x86 code}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\revauth1\revdttm1191392161\insrsid13715311
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 --version
\par }{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid5140827 \tab }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Print version and copyright of this program and exit
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 -v, --verbose
\par \hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3478841 \hich\af39\dbch\af31505\loch\f39 Enable}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39
- verbose output with informational messages printed. This is a count value, so specifying \hich\f39 \endash \loch\f39 v can be\hich\af39\dbch\af31505\loch\f39 used to increase the verbosity level.
+ verbose output with informational messages printed. This is a count value, so specifying \hich\f39 \endash \loch\f39 v can be used to increase the verbosity level.
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 -q, --quiet}{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid5140827
-\par \tab }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Disable all messages except FATAL ERRORS
+\par \tab }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Disabl\hich\af39\dbch\af31505\loch\f39 e all messages except FATAL ERRORS
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 --debug [0-9]
\par }{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid5140827 \tab }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Enable debug messages. Only 0-9 Level is supported.
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 -h, --help
\par }{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \f0\fs18\cf1\insrsid5140827 \tab }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Print copyright, version and usage of this program and exit
\par }\pard\plain \ltrpar\s2\ql \li-1440\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin-1440\itap0\pararsid13255892 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf18\lang1033\langfe2052\langfenp2052\insrsid13255892 {\*\bkmkstart OLE_LINK10}{\*\bkmkstart OLE_LINK11}
-{\*\bkmkstart OLE_LINK3}{\*\bkmkstart OLE_LINK4}{\*\bkmkstart OLE_LINK5}{\*\bkmkstart OLE_LINK6}{\*\bkmkstart OLE_LINK9}\hich\af39\dbch\af31505\loch\f39 Status codes returned}{\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0
+{\*\bkmkstart OLE_LINK3}{\*\bkmkstart OLE_LINK4}{\*\bkmkstart OLE_LINK5}{\*\bkmkstart OLE_LINK6}{\*\bkmkstart OLE_LINK9}\hich\af39\dbch\af31505\loch\f39 Status codes retu\hich\af39\dbch\af31505\loch\f39 rned}{\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0
\b\fs28\cf18\lang1033\langfe2052\langfenp2052\insrsid13255892\charrsid4999604
\par \ltrrow}\trowd \irow0\irowband0\ltrrow\ts21\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
\trftsWidth3\trwWidth8820\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid5911148\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
@@ -129,9 +150,9 @@ ion is specified in the command line the tool will decode the input file with LZ
\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth2970\clshdrawnil\clhidemark \cellx2862\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10
\cltxlrtb\clftsWidth3\clwWidth5850\clshdrawnil\clhidemark \cellx8712\row \ltrrow}\pard\plain \ltrpar\s19\ql \li0\ri20\sb60\sa60\sl-200\slmult0\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin20\lin0\pararsid5911148\yts21 \rtlch\fcs1
\af0\afs16\alang1025 \ltrch\fcs0 \fs16\cf1\lang1033\langfe1033\loch\af39\hich\af39\dbch\af13\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af2\afs18 \ltrch\fcs0 \cs20\b\f2\fs18\cf13\lang1033\langfe2052\kerning2\langfenp2052\insrsid13255892
-\hich\af2\dbch\af13\loch\f2 Nonzero}{\rtlch\fcs1 \af42\afs19 \ltrch\fcs0 \cs20\f42\fs19\cf0\lang1033\langfe2052\langfenp2052\insrsid13255892\charrsid8600807 \cell }\pard \ltrpar\s19\ql \li0\ri20\sb60\sa60\sl-200\slmult0
-\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin20\lin0\pararsid200707\yts21 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe2052\kerning2\langfenp2052\insrsid13255892 \hich\af39\dbch\af13\loch\f39 The action
-\hich\af39\dbch\af13\loch\f39 failed.\cell }\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
+\hich\af2\dbch\af13\loch\f2 Nonzero}{\rtlch\fcs1 \af41\afs19 \ltrch\fcs0 \cs20\f41\fs19\cf0\lang1033\langfe2052\langfenp2052\insrsid13255892\charrsid8600807 \cell }\pard \ltrpar\s19\ql \li0\ri20\sb60\sa60\sl-200\slmult0
+\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin20\lin0\pararsid200707\yts21 {\rtlch\fcs1 \af0 \ltrch\fcs0 \lang1033\langfe2052\kerning2\langfenp2052\insrsid13255892 \hich\af39\dbch\af13\loch\f39 The action failed.\cell
+}\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\intbl\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af37\afs20 \ltrch\fcs0 \fs20\insrsid13255892 \trowd \irow1\irowband1\lastrow \ltrrow\ts21\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10
\trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
\trftsWidth3\trwWidth8820\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblrsid5911148\tbllkhdrrows\tbllkhdrcols\tbllknocolband\tblind0\tblindtype3 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
@@ -140,14 +161,44 @@ ion is specified in the command line the tool will decode the input file with LZ
\af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5140827 {\*\bkmkend OLE_LINK3}{\*\bkmkend OLE_LINK4}{\*\bkmkend OLE_LINK5
}{\*\bkmkend OLE_LINK6}{\*\bkmkend OLE_LINK9}\hich\af39\dbch\af31505\loch\f39 Example
\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af39\afs18
-\ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 \hich\f39 1. Encode the input file \'93\loch\f39 \hich\f39 file.efi\'94\hich\af39\dbch\af31505\loch\f39 \hich\f39 and specify the output file name with \'93\loch\f39 \hich\f39
-file.lzma\'94
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 LzmaCompress \hich\f39 \endash \loch\f39 e \hich\f39 \endash \loch\f39 o file.lzma file.efi
+\ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 \hich\f39 1. Encode the input file \'93\loch\f39 \hich\f39 file.efi\'94\loch\f39 \hich\f39 and specify the output file name with \'93\loch\f39 \hich\f39 file.lzma\'94
+\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 LzmaCompress \hich\f39 \endash \loch\f39 e \hich\f39 \endash \hich\af39\dbch\af31505\loch\f39 o file.lzma file.efi
\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 \hich\f39 2. Decode the input file \'93\loch\f39 \hich\f39 file.lzma\'94\loch\f39 \hich\f39 and specify the output file name with \'93\loch\f39 \hich\f39
file.orig\'94
\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 LzmaCompress \hich\f39 \endash \loch\f39 d \hich\f39 \endash \loch\f39 o file.orig file.lzma
-\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 3. Decode the input file "file.lzma" in t\hich\af39\dbch\af31505\loch\f39 he quiet mode and specify the output file name with "file.orig"
-\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 LzmaCompress \hich\f39 \endash \loch\f39 d -q \hich\f39 \endash \loch\f39 o file.orig file.lzma
+\par }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 3. Decode the input file "file.lzma" in the quiet mode and specify the output file name with "file.orig"
+\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Lzma\hich\af39\dbch\af31505\loch\f39 Compress \hich\f39 \endash \loch\f39 d -q \hich\f39 \endash \loch\f39 o file.orig file.lzma}{\rtlch\fcs1
+\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392162\langfenp2052\insrsid5140827
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13715311 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392162\langfenp2052\insrsid13715311
+\hich\af39\dbch\af31505\loch\f39 4}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191392162\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 \hich\f39 . Encode the input file \'93\loch\f39 \hich\f39 file.efi\'94\loch\f39 }{
+\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392162\langfenp2052\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 with }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392180\langfenp2052\insrsid12126252 \hich\af39\dbch\af31505\loch\f39 converter for }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392180\langfenp2052\insrsid13058712 \hich\af39\dbch\af31505\loch\f39 x}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392162\langfenp2052\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 86 code }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191392162\insrsid13715311
+\hich\af39\dbch\af31505\loch\f39 \hich\f39 and specify the output file name with \'93\loch\f39 \hich\f39 file.lzma\'94
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191392162\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 LzmaCompress \hich\f39 \endash
+\loch\f39 e }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392162\langfenp2052\insrsid4929157 \loch\af39\dbch\af31505\hich\f39 \endash }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm654533263\langfenp2052\insrsid4929157 \hich\af39\dbch\af31505\loch\f39 -f86}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392162\langfenp2052\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191392162\insrsid13715311
+\loch\af39\dbch\af31505\hich\f39 \endash \loch\f39 o file}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 x86}{\rtlch\fcs1
+\ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191392162\insrsid13715311 \hich\af39\dbch\af31505\loch\f39 .lzma file}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 x86}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191392162\insrsid13715311
+\hich\af39\dbch\af31505\loch\f39 .efi}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid13715311
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid2567646 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646
+\hich\af39\dbch\af31505\loch\f39 5}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 \hich\f39 . Decode the input file \'93\loch\f39 file}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 x86}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646
+\hich\af39\dbch\af31505\loch\f39 \hich\f39 .lzma\'94\loch\f39 }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406242\langfenp2052\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 with
+\hich\af39\dbch\af31505\loch\f39 converter for \hich\af39\dbch\af31505\loch\f39 x\hich\af39\dbch\af31505\loch\f39 86 code}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191406242\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 }{
+\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 \hich\f39 and specify the output file name with \'93\loch\f39 file}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 x86}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646
+\hich\af39\dbch\af31505\loch\f39 \hich\f39 .orig\'94
+\par }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 LzmaCompress \hich\f39 \endash \loch\f39 d }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406242\langfenp2052\insrsid2567646 --\hich\af39\dbch\af31505\loch\f39 f8\hich\af39\dbch\af31505\loch\f39 6 }{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646 \loch\af39\dbch\af31505\hich\f39 \endash \loch\f39 o file}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646
+\hich\af39\dbch\af31505\loch\f39 x86}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 .orig file}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0
+\b\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191406241\langfenp2052\insrsid2567646 \hich\af39\dbch\af31505\loch\f39 x86}{\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\revised\revauth1\revdttm1191406241\insrsid2567646
+\hich\af39\dbch\af31505\loch\f39 .lzma
+\par }\pard \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af39\afs18 \ltrch\fcs0 \b\fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid2567646\charrsid2567646
\par }\pard\plain \ltrpar\s2\ql \fi-1300\li0\ri0\sb400\sa60\sl-340\slmult0\keep\keepn\nowidctlpar\tx0\tx1440\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0\pararsid9728962 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0
\fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab\af39\afs28 \ltrch\fcs0 \b\fs28\cf17\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Bugs
\par }\pard\plain \ltrpar\ql \li0\ri0\sb200\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af39\afs18
@@ -166,64 +217,66 @@ file.orig\'94
\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\af39\hich\af39\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
\fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 Based on LZMA Utility 4.65 : Igor Pavlov : Public domain : 2009-02-03
\par
-\par \hich\af39\dbch\af31505\loch\f39 Copyright (c) 2006 - }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3478841 \hich\af39\dbch\af31505\loch\f39 201}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\lang1033\langfe2052\langfenp2052\insrsid11874792
-\hich\af39\dbch\af31505\loch\f39 1}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39 , Intel Corporation. All rights reserved.
+\par \hich\af39\dbch\af31505\loch\f39 Copyright (c) 2006 - }{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid3478841 \hich\af39\dbch\af31505\loch\f39 201}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\fs18\cf1\revised\lang1033\langfe2052\revauth1\revdttm1191392171\langfenp2052\insrsid12003746 \hich\af39\dbch\af31505\loch\f39 2}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0
+\deleted\fs18\cf1\lang1033\langfe2052\revauthdel1\revdttmdel1191392171\langfenp2052\insrsid11874792\delrsid12003746 \hich\af39\dbch\af31505\loch\f39 1}{\rtlch\fcs1 \af39\afs18 \ltrch\fcs0 \fs18\cf1\insrsid5140827 \hich\af39\dbch\af31505\loch\f39
+, Intel Corporation. All rights reserved.
\par \hich\af39\dbch\af31505\loch\f39 This program and the accompanying materials
-\par \hich\af39\dbch\af31505\loch\f39 are licensed and made available under the terms and conditions of the BSD\hich\af39\dbch\af31505\loch\f39 License
+\par \hich\af39\dbch\af31505\loch\f39 are licensed and made available under the terms and conditions of the BSD License
\par \hich\af39\dbch\af31505\loch\f39 which accompanies this distribution. The full text of the license may be found at
-\par \hich\af39\dbch\af31505\loch\f39 http://opensource.org/licenses/bsd-license.php
+\par \hich\af39\dbch\af31505\loch\f39 http:\hich\af39\dbch\af31505\loch\f39 //opensource.org/licenses/bsd-license.php
\par
\par \hich\af39\dbch\af31505\loch\f39 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-\par \hich\af39\dbch\af31505\loch\f39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY K\hich\af39\dbch\af31505\loch\f39 IND, EITHER EXPRESS OR IMPLIED.
+\par \hich\af39\dbch\af31505\loch\f39 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid5140827
-\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
-9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
-5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
-b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
-0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
-a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
-c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
-0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
-a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
-6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
-4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
-4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f
-7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87
-615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad
-79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b
-5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab
-999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9
-699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586
-8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6
-0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f
-9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be
-15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979
-3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d
-32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a
-f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86
-e877f0034e16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb
-44f95d843b5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a
-6409fb44d08741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c
-3d9058edf2c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db0256
-5e85f3b9660d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276
-b9f7dec44b7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8
-c33585b5fb9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e
-51440ca2e0088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95
-b21be5ceaf8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff
-6dce591a26ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec6
-9ffb9e65d028d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239
-b75a5bb1e6345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a449
-59d366ad93b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e8
-2db8df9f30254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468
-656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4
-350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d2624
-52282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe5141
-73d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000
-0000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000
-000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019
-0200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b00001600000000
-000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027
-00000000000000000000000000a00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d0100009b0a00000000}
+\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
+72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
+2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
+44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
+065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
+00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
+84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
+52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
+bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
+656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
+070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
+29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
+312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
+a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
+98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
+94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
+7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
+9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
+e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
+193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
+17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
+8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
+6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
+668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
+bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
+16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
+5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
+8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
+c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
+0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
+7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
+9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
+088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
+8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
+ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
+28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
+345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
+b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
+254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
+68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
+51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
+720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
+a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
+000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
+002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
+656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
+00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
+00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
@@ -272,17 +325,33 @@ b75a5bb1e6345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c1
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
-4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
-d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+4d73786d6c322e534158584d4c5265616465722e352e30000000000000000000000e0000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdffffff04000000feffffff05000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000006059
-f6250057cc01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
-0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff01000000ec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000d049
+4bd2c100cd010300000080020000000000004d0073006f004400610074006100530074006f0072006500000000000000000000000000000000000000000000000000000000000000000000000000000000001a000101ffffffffffffffff020000000000000000000000000000000000000000000000d0494bd2c100cd01
+d0494bd2c100cd01000000000000000000000000ce00c600c400d9003500c800c700520055004500430042003300c6004b004c003400d3005000d6005000c0003d003d000000000000000000000000000000000032000101ffffffffffffffff030000000000000000000000000000000000000000000000d0494bd2c100
+cd01d0494bd2c100cd010000000000000000000000004900740065006d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffff04000000ffffffff000000000000000000000000000000000000000000000000
+00000000000000000000000000000000dd00000000000000010000000200000003000000feffffff0500000006000000070000000800000009000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3c623a536f757263657320786d6c6e733a623d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f6772617068792220786d6c6e733d
+22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f677261706879222053656c65637465645374796c653d225c4150412e58534c22205374796c654e616d653d224150412046696674682045646974696f6e222f3e0d
+0a00000000000000000000000000000000000000000000000000000000000000000000003c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0d0a3c64733a6461746173746f72654974656d2064733a6974656d49443d227b37453339
+363942412d443138392d343035302d383137362d3632384237423333463633457d2220786d6c6e733a64733d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f637573746f6d586d6c223e3c64733a736368656d61526566733e3c
+64733a736368656d615265662064733a7572693d22687474703a2f2f736368656d61732e6f70656e500072006f007000650072007400690065007300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000200ffffffffffffffffffffffff000000000000
+0000000000000000000000000000000000000000000000000000000000000400000055010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000786d6c666f726d6174732e6f72672f6f6666696365446f63756d656e742f323030362f6269626c696f677261706879222f3e3c2f64733a736368656d61526566733e3c2f64733a6461746173746f
+72654974656d3e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file
diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat
index 5a081430db..561cc408cb 100755
--- a/BaseTools/toolsetup.bat
+++ b/BaseTools/toolsetup.bat
@@ -3,7 +3,7 @@
@REM however it may be executed directly from the BaseTools project folder
@REM if the file is not executed within a WORKSPACE\BaseTools folder.
@REM
-@REM Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+@REM Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
@REM
@REM This program and the accompanying materials are licensed and made available
@REM under the terms and conditions of the BSD Licensewhich accompanies this
@@ -158,14 +158,6 @@ if NOT exist %WORKSPACE%\Conf (
)
)
-if NOT exist %WORKSPACE%\Conf\FrameworkDatabase.db (
- echo copying ... FrameworkDatabase.template to %WORKSPACE%\Conf\FrameworkDatabase.db
- copy %EDK_TOOLS_PATH%\Conf\FrameworkDatabase.template %WORKSPACE%\Conf\FrameworkDatabase.db > nul
-) else (
- if defined RECONFIG echo over-write ... FrameworkDatabase.template to %WORKSPACE%\Conf\FrameworkDatabase.db
- if defined RECONFIG copy /Y %EDK_TOOLS_PATH%\Conf\FrameworkDatabase.template %WORKSPACE%\Conf\FrameworkDatabase.db > nul
-)
-
if NOT exist %WORKSPACE%\Conf\target.txt (
echo copying ... target.template to %WORKSPACE%\Conf\target.txt
if NOT exist %EDK_TOOLS_PATH%\Conf\target.template (
@@ -299,16 +291,24 @@ goto end
echo.
if defined VCINSTALLDIR goto VisualStudioAvailable
- if defined VS71COMNTOOLS (
- call "%VS71COMNTOOLS%\vsvars32.bat"
+ if defined VS100COMNTOOLS (
+ call "%VS100COMNTOOLS%\vsvars32.bat"
) else (
- if defined VS80COMNTOOLS (
- call "%VS80COMNTOOLS%\vsvars32.bat"
+ if defined VS90COMNTOOLS (
+ call "%VS90COMNTOOLS%\vsvars32.bat"
) else (
- echo.
- echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!
- echo.
- goto end
+ if defined VS80COMNTOOLS (
+ call "%VS80COMNTOOLS%\vsvars32.bat"
+ ) else (
+ if defined VS71COMNTOOLS (
+ call "%VS71COMNTOOLS%\vsvars32.bat"
+ ) else (
+ echo.
+ echo !!! ERROR !!!! Cannot find Visual Studio, required to build C tools !!!
+ echo.
+ goto end
+ )
+ )
)
)