public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-BuildSpecification PATCH] Add EBNF for --pcd flag command line flag
@ 2017-05-27  4:40 Michael Kinney
  2017-05-27  4:40 ` Michael Kinney
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kinney @ 2017-05-27  4:40 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu, Kevin W Shaw

https://bugzilla.tianocore.org/show_bug.cgi?id=523

GitHub branch for review:

* https://github.com/mdkinney/edk2-BuildSpecification/tree/Bugzilla_523_EbnfPcdCommandLineOption

GitHub word diff view of the patches in this series:

* [1/1] https://github.com/mdkinney/edk2-BuildSpecification/commit/7f8868c5df4ab39aa6c7ab8f07202d76eba381b3?w=1

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>

Michael Kinney (1):
  Add EBNF for --pcd flag command line flag

 README.md                               |  3 ++-
 appendix_d_buildexe_command/d4_usage.md | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

-- 
2.6.3.windows.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [edk2-BuildSpecification PATCH] Add EBNF for --pcd flag command line flag
  2017-05-27  4:40 [edk2-BuildSpecification PATCH] Add EBNF for --pcd flag command line flag Michael Kinney
@ 2017-05-27  4:40 ` Michael Kinney
  2017-05-27  7:44   ` Zhu, Yonghong
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kinney @ 2017-05-27  4:40 UTC (permalink / raw)
  To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu, Kevin W Shaw

https://bugzilla.tianocore.org/show_bug.cgi?id=523

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 README.md                               |  3 ++-
 appendix_d_buildexe_command/d4_usage.md | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 16fcc4a..00fd89d 100644
--- a/README.md
+++ b/README.md
@@ -200,7 +200,7 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 |            | Remove Unicode file storage requirement; refer to the Multi-String UNI File Format Specification instead.                                                                                                                                                                                                                                                           |               |
 |            | Clarify BUILDRULEORDER                                                                                                                                                                                                                                                                                                                                              |               |
 |            | Add support for INF statement in an FD region.                                                                                                                                                                                                                                                                                                                      |               |
-| 1.27       | Convert to Gitbook                                                                                                                                                                                                                                                                                                                                                  | April 2017    |
+| 1.27       | Convert to Gitbook                                                                                                                                                                                                                                                                                                                                                  | May 2017      |
 |            | [#471](https://bugzilla.tianocore.org/show_bug.cgi?id=471) Build spec: only copy the "TianoCore" Userextension section into "As Built" INF                                                                                                                                                                                                                          |               |
 |            | [#472](https://bugzilla.tianocore.org/show_bug.cgi?id=472) [Build Spec] Extend macro usage in the !include statements for DSC/FDF files                                                                                                                                                                                                                             |               |
 |            | [#483](https://bugzilla.tianocore.org/show_bug.cgi?id=483) Build Spec: add description for merge Pre-build and Post-build into build process                                                                                                                                                                                                                        |               |
@@ -212,3 +212,4 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 |            | [#504](https://bugzilla.tianocore.org/show_bug.cgi?id=504) Update build report to support -Y HASH option                                                                                                                                                                                                                                                            |               |
 |            | [#508](https://bugzilla.tianocore.org/show_bug.cgi?id=508) Build Spec: Add sections to PCD report for PCDs only used in conditions PCDs that are not used anywhere                                                                                                                                                                                                  |               |
 |            | [#480](https://bugzilla.tianocore.org/show_bug.cgi?id=480) Build spec: add description for Override PCD value on the command line                                                                                                                                                                                                                                   |               |
+|            | [#523](https://bugzilla.tianocore.org/show_bug.cgi?id=523) Build spec: add EBNF for the --pcd syntax in the Section D.4                                                                                                                                                                                                                                             |               |
diff --git a/appendix_d_buildexe_command/d4_usage.md b/appendix_d_buildexe_command/d4_usage.md
index 6271d4f..525a036 100644
--- a/appendix_d_buildexe_command/d4_usage.md
+++ b/appendix_d_buildexe_command/d4_usage.md
@@ -173,3 +173,32 @@ precedence over Macros defined in the DSC and FDF files.
 <H12>            ::= <H4> <H4> <H4>
 <RegFmtGUID>     ::= <H8> "-" <H4> "-" <H4> "-" <H4> "-" <H12>
 ```
+
+### D.4.3 PCD Option Definition
+
+This section provides the EBNF for the `--pcd` option, which allows users to
+specify PCD values on the command-line. PCD values on the command-line take
+precedence over PCD provided in DSC, FDF, INC, and DEC files.
+
+#### Prototype
+
+```c
+<PcdOption>       ::= "--pcd" <PcdName> ["=" <PcdValue>] <MTS>
+<SP>              ::= 0x20
+<MTS>             ::= <SP>+
+<PcdName>         ::= [<TokenSpaceCName> "."] <PcdCName>
+<TokenSpaceCName> ::= C Variable Name of the Token Space GUID
+<PcdCName>        ::= C Variable Name of the PCD
+<PcdValue>        ::= {<Boolean>} {<HexValue>} {<CString>} {<CArray>}
+<Boolean>         ::= {<True>} {<False>}
+<True>            ::= {"TRUE"} {"True"} {"true"} {"1"} {"0x1"} {"0x01"}
+<False>           ::= {"FALSE"} {"False"} {"false"} {"0"} {"0x0"} {"0x00"}
+<HexValue>        ::= "0x" (a-fA-F0-9){1,16}
+<CString>         ::= ["L"] <QuotedString>
+<QuotedString>    ::= <DblQuote> <CChars>* <DblQuote>
+<DblQuote>        ::= 0x22
+<CChars>          ::= {0x21} {(0x23 - 0x5B)} {(0x5D - 0x7E)} {<EscapeSequence>}
+<EscapeSequence>  ::= "\" {"n"} {"t"} {"f"} {"r"} {"b"} {"0"} {"\"} {0x22}
+<CArray>          ::= "H" "{" <NList> "}"
+<NList>           ::= <HexByte> ["," <HexByte>]*
+```
-- 
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-BuildSpecification PATCH] Add EBNF for --pcd flag command line flag
  2017-05-27  4:40 ` Michael Kinney
@ 2017-05-27  7:44   ` Zhu, Yonghong
  0 siblings, 0 replies; 3+ messages in thread
From: Zhu, Yonghong @ 2017-05-27  7:44 UTC (permalink / raw)
  To: Kinney, Michael D, edk2-devel@lists.01.org
  Cc: Gao, Liming, Shaw, Kevin W, Zhu, Yonghong

Hi Mike,

Some comment, please check it. thanks.
1. How about change the PcdValue as below since we also support the integer value.
<PcdValue>        ::= {<Boolean>} {<Number>} {<CString>} {<CArray>}
<Number>          ::= {<Integer>} {<HexNumber>}
<Integer>            ::= {(0-9)} {(1-9)(0-9)+}

2. How about change HexNumber to support the upper case "0X" ?
<HexNumber>        ::= {"0x"} {"0X"} (a-fA-F0-9){1,16}

3. No <HexByte> definition. How about add this one ?
<HexByte>        ::= {"0x"} {"0X"} (a-fA-F0-9){1,2}

4. A typo error (it is INF, not INC) in sentence " command-line take precedence over PCD provided in DSC, FDF, INC, and DEC files".


Best Regards,
Zhu Yonghong

-----Original Message-----
From: Kinney, Michael D 
Sent: Saturday, May 27, 2017 12:41 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>
Subject: [edk2-BuildSpecification PATCH] Add EBNF for --pcd flag command line flag

https://bugzilla.tianocore.org/show_bug.cgi?id=523

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 README.md                               |  3 ++-
 appendix_d_buildexe_command/d4_usage.md | 29 +++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 16fcc4a..00fd89d 100644
--- a/README.md
+++ b/README.md
@@ -200,7 +200,7 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 |            | Remove Unicode file storage requirement; refer to the Multi-String UNI File Format Specification instead.                                                                                                                                                                                                                                                           |               |
 |            | Clarify BUILDRULEORDER                                                                                                                                                                                                                                                                                                                                              |               |
 |            | Add support for INF statement in an FD region.                                                                                                                                                                                                                                                                                                                      |               |
-| 1.27       | Convert to Gitbook                                                                                                                                                                                                                                                                                                                                                  | April 2017    |
+| 1.27       | Convert to Gitbook                                                                                                                                                                                                                                                                                                                                                  | May 2017      |
 |            | [#471](https://bugzilla.tianocore.org/show_bug.cgi?id=471) Build spec: only copy the "TianoCore" Userextension section into "As Built" INF                                                                                                                                                                                                                          |               |
 |            | [#472](https://bugzilla.tianocore.org/show_bug.cgi?id=472) [Build Spec] Extend macro usage in the !include statements for DSC/FDF files                                                                                                                                                                                                                             |               |
 |            | [#483](https://bugzilla.tianocore.org/show_bug.cgi?id=483) Build Spec: add description for merge Pre-build and Post-build into build process                                                                                                                                                                                                                        |               |
@@ -212,3 +212,4 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 |            | [#504](https://bugzilla.tianocore.org/show_bug.cgi?id=504) Update build report to support -Y HASH option                                                                                                                                                                                                                                                            |               |
 |            | [#508](https://bugzilla.tianocore.org/show_bug.cgi?id=508) Build Spec: Add sections to PCD report for PCDs only used in conditions PCDs that are not used anywhere                                                                                                                                                                                                  |               |
 |            | [#480](https://bugzilla.tianocore.org/show_bug.cgi?id=480) Build spec: add description for Override PCD value on the command line                                                                                                                                                                                                                                   |               |
+|            | [#523](https://bugzilla.tianocore.org/show_bug.cgi?id=523) Build spec: add EBNF for the --pcd syntax in the Section D.4                                                                                                                                                                                                                                             |               |
diff --git a/appendix_d_buildexe_command/d4_usage.md b/appendix_d_buildexe_command/d4_usage.md
index 6271d4f..525a036 100644
--- a/appendix_d_buildexe_command/d4_usage.md
+++ b/appendix_d_buildexe_command/d4_usage.md
@@ -173,3 +173,32 @@ precedence over Macros defined in the DSC and FDF files.
 <H12>            ::= <H4> <H4> <H4>
 <RegFmtGUID>     ::= <H8> "-" <H4> "-" <H4> "-" <H4> "-" <H12>
 ```
+
+### D.4.3 PCD Option Definition
+
+This section provides the EBNF for the `--pcd` option, which allows 
+users to specify PCD values on the command-line. PCD values on the 
+command-line take precedence over PCD provided in DSC, FDF, INC, and DEC files.
+
+#### Prototype
+
+```c
+<PcdOption>       ::= "--pcd" <PcdName> ["=" <PcdValue>] <MTS>
+<SP>              ::= 0x20
+<MTS>             ::= <SP>+
+<PcdName>         ::= [<TokenSpaceCName> "."] <PcdCName>
+<TokenSpaceCName> ::= C Variable Name of the Token Space GUID
+<PcdCName>        ::= C Variable Name of the PCD
+<PcdValue>        ::= {<Boolean>} {<HexValue>} {<CString>} {<CArray>}
+<Boolean>         ::= {<True>} {<False>}
+<True>            ::= {"TRUE"} {"True"} {"true"} {"1"} {"0x1"} {"0x01"}
+<False>           ::= {"FALSE"} {"False"} {"false"} {"0"} {"0x0"} {"0x00"}
+<HexValue>        ::= "0x" (a-fA-F0-9){1,16}
+<CString>         ::= ["L"] <QuotedString>
+<QuotedString>    ::= <DblQuote> <CChars>* <DblQuote>
+<DblQuote>        ::= 0x22
+<CChars>          ::= {0x21} {(0x23 - 0x5B)} {(0x5D - 0x7E)} {<EscapeSequence>}
+<EscapeSequence>  ::= "\" {"n"} {"t"} {"f"} {"r"} {"b"} {"0"} {"\"} {0x22}
+<CArray>          ::= "H" "{" <NList> "}"
+<NList>           ::= <HexByte> ["," <HexByte>]*
+```
--
2.6.3.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-27  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-27  4:40 [edk2-BuildSpecification PATCH] Add EBNF for --pcd flag command line flag Michael Kinney
2017-05-27  4:40 ` Michael Kinney
2017-05-27  7:44   ` Zhu, Yonghong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox