[edk2] [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID

Liming Gao posted 3 patches 6 years, 9 months ago
[edk2] [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID
Posted by Liming Gao 6 years, 9 months ago
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
 2_dsc_overview/25_[skuids]_section_processing.md | 11 +++++++----
 3_edk_ii_dsc_file_format/37_[skuids]_section.md  | 10 ++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/2_dsc_overview/25_[skuids]_section_processing.md b/2_dsc_overview/25_[skuids]_section_processing.md
index afd102e..70b98b1 100644
--- a/2_dsc_overview/25_[skuids]_section_processing.md
+++ b/2_dsc_overview/25_[skuids]_section_processing.md
@@ -34,16 +34,19 @@
 The contents of this section are used to define valid `SKUID_IDENTIFIER` names.
 Since a platform may support different SKUs, and different SKUs may implement
 different methods for handing platform configuration data (PCD) the user can
-define, in this section, tag names to use. Use `0` for the `DEFAULT` SKU
-identifier. Each entry below the section header is of the form:
+define, in this section, tag names to use. One SKU may override some settings 
+in another SKU setting, and inherit other setting from it. If not specified, 
+SKU will inherit DEFAULT SKU setting. Use `0` for the `DEFAULT` SKU identifier. 
+Each entry below the section header is of the form:
 
-`Number | word`
+`Number | word [|word]`
 
 The following is an example of a `[SkuIds]` section:
 
 ```
 [SkuIds]
+  0|DEFAULT
   1|Sku_Two
   22|Sku1
-  5|SkuSeven
+  5|SkuSeven | Sku1  #SkuSeven inherits Sku1 setting.
 ```
diff --git a/3_edk_ii_dsc_file_format/37_[skuids]_section.md b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
index 756ded2..8e70b33 100644
--- a/3_edk_ii_dsc_file_format/37_[skuids]_section.md
+++ b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
@@ -37,8 +37,9 @@ The `[SkuIds]` section is optional in all EDK II DSC files.
 
 Entries may appear in any order. This section lists numeric mappings to the SKU
 ID User Interface Name, only valid values from this list can be specified in
-the defines section. Use of the `!include` statement is supported; it is
-recommended that a ".txt" extension be used.
+the defines section. If one SKU inherits from none DEFAULT SKU, it can specify 
+its parent SKU User Name after its definition. Use of the `!include` statement 
+is supported; it is recommended that a ".txt" extension be used.
 
 If this section is not specified, the parsing tools will assume a SkuId of 0,
 with a `UiName` of "DEFAULT". The default entry must not be re-defined.
@@ -51,7 +52,7 @@ The `!include` file can only contain an ASCII (not Unicode) list of
 ```c
 <SkuId>     ::= "[SkuIds]" <EOL>
                 {<Statement>*} {<IncludeStatement>}
-<Statement> ::= <TS> <Number> <FS> <UiName> <EOL>
+<Statement> ::= <TS> <Number> <FS> <UiName> [<FS> <UiName>] <EOL>
 <UiName>    ::= <Word>
 ```
 
@@ -60,5 +61,6 @@ The `!include` file can only contain an ASCII (not Unicode) list of
 ```ini
 [SkuIds]
   0|DEFAULT # The entry: 0|DEFAULT is reserved and always required.
-  1|SkuTwo
+  1|SkuOne
+  2|SkuTwo|SkuOne # SkuTwo setting inherits from SkuOne
 ```
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID
Posted by Zhu, Yonghong 6 years, 9 months ago
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Gao, Liming 
Sent: Friday, March 16, 2018 12:42 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch 1/3] DSCSpecification: Add syntax to support SKU ID inherit from another SKU ID

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
 2_dsc_overview/25_[skuids]_section_processing.md | 11 +++++++----  3_edk_ii_dsc_file_format/37_[skuids]_section.md  | 10 ++++++----
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/2_dsc_overview/25_[skuids]_section_processing.md b/2_dsc_overview/25_[skuids]_section_processing.md
index afd102e..70b98b1 100644
--- a/2_dsc_overview/25_[skuids]_section_processing.md
+++ b/2_dsc_overview/25_[skuids]_section_processing.md
@@ -34,16 +34,19 @@
 The contents of this section are used to define valid `SKUID_IDENTIFIER` names.
 Since a platform may support different SKUs, and different SKUs may implement  different methods for handing platform configuration data (PCD) the user can -define, in this section, tag names to use. Use `0` for the `DEFAULT` SKU -identifier. Each entry below the section header is of the form:
+define, in this section, tag names to use. One SKU may override some 
+settings in another SKU setting, and inherit other setting from it. If 
+not specified, SKU will inherit DEFAULT SKU setting. Use `0` for the `DEFAULT` SKU identifier.
+Each entry below the section header is of the form:
 
-`Number | word`
+`Number | word [|word]`
 
 The following is an example of a `[SkuIds]` section:
 
 ```
 [SkuIds]
+  0|DEFAULT
   1|Sku_Two
   22|Sku1
-  5|SkuSeven
+  5|SkuSeven | Sku1  #SkuSeven inherits Sku1 setting.
 ```
diff --git a/3_edk_ii_dsc_file_format/37_[skuids]_section.md b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
index 756ded2..8e70b33 100644
--- a/3_edk_ii_dsc_file_format/37_[skuids]_section.md
+++ b/3_edk_ii_dsc_file_format/37_[skuids]_section.md
@@ -37,8 +37,9 @@ The `[SkuIds]` section is optional in all EDK II DSC files.
 
 Entries may appear in any order. This section lists numeric mappings to the SKU  ID User Interface Name, only valid values from this list can be specified in -the defines section. Use of the `!include` statement is supported; it is -recommended that a ".txt" extension be used.
+the defines section. If one SKU inherits from none DEFAULT SKU, it can 
+specify its parent SKU User Name after its definition. Use of the 
+`!include` statement is supported; it is recommended that a ".txt" extension be used.
 
 If this section is not specified, the parsing tools will assume a SkuId of 0,  with a `UiName` of "DEFAULT". The default entry must not be re-defined.
@@ -51,7 +52,7 @@ The `!include` file can only contain an ASCII (not Unicode) list of  ```c
 <SkuId>     ::= "[SkuIds]" <EOL>
                 {<Statement>*} {<IncludeStatement>} -<Statement> ::= <TS> <Number> <FS> <UiName> <EOL>
+<Statement> ::= <TS> <Number> <FS> <UiName> [<FS> <UiName>] <EOL>
 <UiName>    ::= <Word>
 ```
 
@@ -60,5 +61,6 @@ The `!include` file can only contain an ASCII (not Unicode) list of  ```ini  [SkuIds]
   0|DEFAULT # The entry: 0|DEFAULT is reserved and always required.
-  1|SkuTwo
+  1|SkuOne
+  2|SkuTwo|SkuOne # SkuTwo setting inherits from SkuOne
 ```
--
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel