Mike,
I think we should re-apply these 4 changes separately in EDK II. (See
attachments 1-4)
I also found a difference in some 'build version' variables. (See attachment 5).
After applying these 5 patches, the two BaseTools seem to be in sync.
-Jordan
https://github.com/jljusten/edk2/tree/sync-BaseTools
On Fri, Jul 25, 2014 at 10:38 AM, Kinney, Michael D
<michael.d.kin...@intel.com> wrote:
> Hello,
>
>
>
> The attached patch contains the changes to sync the edk2-buildtools
> sub-project to the EDK II BaseTools trunk. This is the last step before the
> edk2-buildtools sub-project permissions are changed to read-only.
>
>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Michael Kinney michael.d.kin...@intel.com
>
>
>
> The patch includes changes for the following check-in log entries from the
> edk2-buildtools sub-project.
>
>
>
> =====
>
> Update GenFv tool to handle the file path with space.
>
>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Gao, Liming liming....@intel.com
>
> Review-by: Kinney, Michael D michael.d.kin...@intel.com
>
> ====
>
> Report warning info if vfr file use the flags used for framework code only.
>
>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Eric Dong <eric.d...@intel.com>
>
> Reviewed-by: Liming Gao <liming....@intel.com>
>
> ====
>
> Clean 1 build error and 1 warning for VfrCompiler.
>
>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Eric Dong <eric.d...@intel.com>
>
> Reviewed-by: Liming Gao <liming....@intel.com>
>
> ====
>
> Report warning info if an action opcode has text two statement.
>
>
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Eric Dong <eric.d...@intel.com>
>
> Reviewed-by: Liming Gao <liming....@intel.com>
>
> =====
>
>
>
> Thanks,
>
>
>
> Mike
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> edk2-buildtools-devel mailing list
> edk2-buildtools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel
>
From b3129b7965293c2ca5b5b7dfe47620360d90ef4c Mon Sep 17 00:00:00 2001
From: Eric Dong <eric.d...@intel.com>
Date: Wed, 9 Jul 2014 02:47:47 +0000
Subject: [PATCH 1/5] Report warning info if an action opcode has text two
statement.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.d...@intel.com>
Reviewed-by: Liming Gao <liming....@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools@2671 c2973edb-eda0-4c78-bc6a-9341b269661f
---
BaseTools/Source/C/VfrCompile/VfrError.cpp | 1 +
BaseTools/Source/C/VfrCompile/VfrError.h | 1 +
BaseTools/Source/C/VfrCompile/VfrSyntax.g | 7 +++++++
3 files changed, 9 insertions(+)
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/C/VfrCompile/VfrError.cpp
index ffed732..b5167e5 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrError.cpp
@@ -52,6 +52,7 @@ static SVFR_ERROR_HANDLE VFR_ERROR_HANDLE_TABLE [] = {
static SVFR_WARNING_HANDLE VFR_WARNING_HANDLE_TABLE [] = {
{ VFR_WARNING_DEFAULT_VALUE_REDEFINED, ": default value re-defined with different value"},
{ VFR_WARNING_STRING_TO_UINT_OVERFLOW, ": String to UINT* Overflow"},
+ { VFR_WARNING_ACTION_WITH_TEXT_TWO, ": Action opcode should not have TextTwo part"},
{ VFR_WARNING_CODEUNDEFINED, ": undefined Warning Code" }
};
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/VfrCompile/VfrError.h
index 622cba6..c0b4ec6 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.h
+++ b/BaseTools/Source/C/VfrCompile/VfrError.h
@@ -50,6 +50,7 @@ typedef enum {
typedef enum {
VFR_WARNING_DEFAULT_VALUE_REDEFINED = 0,
VFR_WARNING_STRING_TO_UINT_OVERFLOW,
+ VFR_WARNING_ACTION_WITH_TEXT_TWO,
VFR_WARNING_CODEUNDEFINED
} EFI_VFR_WARNING_CODE;
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index a38f770..5da8767 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -1685,6 +1685,13 @@ vfrStatementStaticText :
}
<<
if (Flags & EFI_IFR_FLAG_CALLBACK) {
+ if (TxtTwo != EFI_STRING_ID_INVALID) {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_ACTION_WITH_TEXT_TWO,
+ S3->getLine(),
+ S3->getText()
+ );
+ }
CIfrAction AObj;
mCVfrQuestionDB.RegisterQuestion (NULL, NULL, QId);
AObj.SetLineNo (F->getLine());
--
2.0.1
From eef2c408b6668d3e021f34df0727441b46eacc68 Mon Sep 17 00:00:00 2001
From: Eric Dong <eric.d...@intel.com>
Date: Mon, 14 Jul 2014 03:02:20 +0000
Subject: [PATCH 2/5] Clean 1 build error and 1 warning for VfrCompiler.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.d...@intel.com>
Reviewed-by: Liming Gao <liming....@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools@2672 c2973edb-eda0-4c78-bc6a-9341b269661f
---
BaseTools/Source/C/VfrCompile/VfrSyntax.g | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 5da8767..4c42aa8 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -505,10 +505,10 @@ vfrFormSetDefinition :
{
ClassGuid "=" guidDefinition[ClassGuid1] << ++ClassGuidNum; >>
{
- "\|" guidDefinition[ClassGuid2] << ++ClassGuidNum; >>
- }
- {
- "\|" guidDefinition[ClassGuid3] << ++ClassGuidNum; >>
+ "\|" guidDefinition[ClassGuid2] << ++ClassGuidNum; >>
+ {
+ "\|" guidDefinition[ClassGuid3] << ++ClassGuidNum; >>
+ }
}
","
}
@@ -1652,7 +1652,7 @@ vfrStatementSubTitle :
|
{ "," vfrStatementStatTagList}
{ "," (vfrStatementStat | vfrStatementQuestions)*}
- E: EndSubtitle ";" << CRT_END_OP (E); >>
+ D: EndSubtitle ";" << CRT_END_OP (D); >>
)
;
--
2.0.1
From 1af0ef047d8ab8484500a4fe5ee8c3fcee81b8b4 Mon Sep 17 00:00:00 2001
From: Eric Dong <eric.d...@intel.com>
Date: Wed, 16 Jul 2014 01:36:10 +0000
Subject: [PATCH 3/5] Report warning info if vfr file use the flags used for
framework code only.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.d...@intel.com>
Reviewed-by: Liming Gao <liming....@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools@2673 c2973edb-eda0-4c78-bc6a-9341b269661f
---
BaseTools/Source/C/VfrCompile/VfrError.cpp | 1 +
BaseTools/Source/C/VfrCompile/VfrError.h | 1 +
BaseTools/Source/C/VfrCompile/VfrSyntax.g | 81 +++++++++++++++++++++++++++---
3 files changed, 76 insertions(+), 7 deletions(-)
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.cpp b/BaseTools/Source/C/VfrCompile/VfrError.cpp
index b5167e5..3be2bd8 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrError.cpp
@@ -53,6 +53,7 @@ static SVFR_WARNING_HANDLE VFR_WARNING_HANDLE_TABLE [] = {
{ VFR_WARNING_DEFAULT_VALUE_REDEFINED, ": default value re-defined with different value"},
{ VFR_WARNING_STRING_TO_UINT_OVERFLOW, ": String to UINT* Overflow"},
{ VFR_WARNING_ACTION_WITH_TEXT_TWO, ": Action opcode should not have TextTwo part"},
+ { VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE, ": Not recommend to use obsoleted framework opcode"},
{ VFR_WARNING_CODEUNDEFINED, ": undefined Warning Code" }
};
diff --git a/BaseTools/Source/C/VfrCompile/VfrError.h b/BaseTools/Source/C/VfrCompile/VfrError.h
index c0b4ec6..8241ce2 100644
--- a/BaseTools/Source/C/VfrCompile/VfrError.h
+++ b/BaseTools/Source/C/VfrCompile/VfrError.h
@@ -51,6 +51,7 @@ typedef enum {
VFR_WARNING_DEFAULT_VALUE_REDEFINED = 0,
VFR_WARNING_STRING_TO_UINT_OVERFLOW,
VFR_WARNING_ACTION_WITH_TEXT_TWO,
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
VFR_WARNING_CODEUNDEFINED
} EFI_VFR_WARNING_CODE;
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 4c42aa8..9688aad 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -1184,9 +1184,35 @@ questionheaderFlagsField[UINT8 & Flags] :
ReadOnlyFlag << $Flags |= 0x01; >>
| InteractiveFlag << $Flags |= 0x04; >>
| ResetRequiredFlag << $Flags |= 0x10; >>
- | OptionOnlyFlag << $Flags |= 0x80; >>
- | NVAccessFlag
- | LateCheckFlag
+ | O:OptionOnlyFlag <<
+ if (mCompatibleMode) {
+ $Flags |= 0x80;
+ } else {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ O->getLine(),
+ O->getText()
+ );
+ }
+ >>
+ | N:NVAccessFlag <<
+ if (!mCompatibleMode) {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ N->getLine(),
+ N->getText()
+ );
+ }
+ >>
+ | L:LateCheckFlag <<
+ if (!mCompatibleMode) {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ L->getLine(),
+ L->getText()
+ );
+ }
+ >>
;
vfrStorageVarId[EFI_VARSTORE_INFO & Info, CHAR8 *&QuestVarIdStr, BOOLEAN CheckFlag = TRUE] :
@@ -1617,8 +1643,29 @@ vfrStatementInvalid :
;
flagsField :
- Number | InteractiveFlag | ManufacturingFlag | DefaultFlag |
- NVAccessFlag | ResetRequiredFlag | LateCheckFlag
+ Number
+ | InteractiveFlag
+ | ManufacturingFlag
+ | DefaultFlag
+ | ResetRequiredFlag
+ | N:NVAccessFlag <<
+ if (!mCompatibleMode) {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ N->getLine(),
+ N->getText()
+ );
+ }
+ >>
+ | L:LateCheckFlag <<
+ if (!mCompatibleMode) {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ L->getLine(),
+ L->getText()
+ );
+ }
+ >>
;
vfrStatementValue :
@@ -3042,11 +3089,31 @@ oneofoptionFlagsField [UINT8 & HFlags, UINT8 & LFlags] :
| "OPTION_DEFAULT" << $LFlags |= 0x10; >>
| "OPTION_DEFAULT_MFG" << $LFlags |= 0x20; >>
| InteractiveFlag << $HFlags |= 0x04; >>
- | NVAccessFlag << $HFlags |= 0x08; >>
| ResetRequiredFlag << $HFlags |= 0x10; >>
- | LateCheckFlag << $HFlags |= 0x20; >>
| ManufacturingFlag << $LFlags |= 0x20; >>
| DefaultFlag << $LFlags |= 0x10; >>
+ | A:NVAccessFlag <<
+ if (mCompatibleMode) {
+ $HFlags |= 0x08;
+ } else {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ A->getLine(),
+ A->getText()
+ );
+ }
+ >>
+ | L:LateCheckFlag <<
+ if (mCompatibleMode) {
+ $HFlags |= 0x20;
+ } else {
+ gCVfrErrorHandle.HandleWarning (
+ VFR_WARNING_OBSOLETED_FRAMEWORK_OPCODE,
+ L->getLine(),
+ L->getText()
+ );
+ }
+ >>
;
vfrStatementLabel :
--
2.0.1
From 49c5582386aa50b2acb11e1df4c8da7dc2f1ff16 Mon Sep 17 00:00:00 2001
From: "liming....@intel.com" <liming....@intel.com>
Date: Tue, 22 Jul 2014 01:47:25 +0000
Subject: [PATCH 4/5] Update GenFv tool to handle the file path with space.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming liming....@intel.com
Review-by: Kinney, Michael D michael.d.kin...@intel.com
git-svn-id: https://svn.code.sf.net/p/edk2-buildtools/code/trunk/BaseTools@2674 c2973edb-eda0-4c78-bc6a-9341b269661f
---
BaseTools/Source/C/Common/ParseInf.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/Common/ParseInf.c b/BaseTools/Source/C/Common/ParseInf.c
index bbccb61..385758f 100644
--- a/BaseTools/Source/C/Common/ParseInf.c
+++ b/BaseTools/Source/C/Common/ParseInf.c
@@ -236,6 +236,7 @@ Returns:
{
CHAR8 InputBuffer[_MAX_PATH];
CHAR8 *CurrentToken;
+ CHAR8 *Delimiter;
BOOLEAN ParseError;
BOOLEAN ReadError;
UINTN Occurrance;
@@ -283,8 +284,13 @@ Returns:
//
// Get the first non-whitespace string
//
+ Delimiter = strchr (InputBuffer, '=');
+ if (Delimiter != NULL) {
+ *Delimiter = 0;
+ }
+
CurrentToken = strtok (InputBuffer, " \t\n");
- if (CurrentToken == NULL) {
+ if (CurrentToken == NULL || Delimiter == NULL) {
//
// Whitespace line found (or comment) so continue
//
@@ -311,17 +317,29 @@ Returns:
//
// Copy the contents following the =
//
- CurrentToken = strtok (NULL, "= \t\n");
- if (CurrentToken == NULL) {
+ CurrentToken = Delimiter + 1;
+ if (*CurrentToken == 0) {
//
// Nothing found, parsing error
//
ParseError = TRUE;
} else {
//
+ // Strip leading white space
+ //
+ while (*CurrentToken == ' ' || *CurrentToken == '\t') {
+ CurrentToken++;
+ }
+ //
// Copy the current token to the output value
//
strcpy (Value, CurrentToken);
+ //
+ // Strip trailing white space
+ //
+ while (strlen(Value) > 0 && (*(Value + strlen(Value) - 1) == ' ' || *(Value + strlen(Value) - 1) == '\t')) {
+ *(Value + strlen(Value) - 1) = 0;
+ }
return EFI_SUCCESS;
}
} else {
--
2.0.1
From b414cb8cedf6c25d011ecfc5d8a495d5ab5234a6 Mon Sep 17 00:00:00 2001
From: Jordan Justen <jordan.l.jus...@intel.com>
Date: Fri, 25 Jul 2014 13:34:46 -0700
Subject: [PATCH 5/5] BaseTools: Clear build versions to sync with
buildtools/BaseTools
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
---
BaseTools/Source/C/Include/Common/BuildVersion.h | 2 +-
BaseTools/Source/Python/Common/BuildVersion.py | 2 +-
BaseTools/Source/Python/UPT/BuildVersion.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/Include/Common/BuildVersion.h b/BaseTools/Source/C/Include/Common/BuildVersion.h
index fb19609..764bebf 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 2670"
+#define __BUILD_VERSION ""
diff --git a/BaseTools/Source/Python/Common/BuildVersion.py b/BaseTools/Source/Python/Common/BuildVersion.py
index e178a4a..7414d30 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 2670"
+gBUILD_VERSION = ""
diff --git a/BaseTools/Source/Python/UPT/BuildVersion.py b/BaseTools/Source/Python/UPT/BuildVersion.py
index 2cf0923..edd4696 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 2670"
+gBUILD_VERSION = ""
--
2.0.1
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
edk2-buildtools-devel mailing list
edk2-buildtools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel