mirror of https://github.com/acidanthera/audk.git
1) Change the schema type for <VariableGuid> used in PCD HiiEnable group in FPD file.
2) Modify PCD tools to support that. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@591 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
61d66c136c
commit
cd0170f5b0
|
@ -2133,6 +2133,7 @@ public class CollectPCDAction {
|
||||||
Token.PCD_TYPE pcdType = Token.PCD_TYPE.UNKNOWN;
|
Token.PCD_TYPE pcdType = Token.PCD_TYPE.UNKNOWN;
|
||||||
int tokenNumber = 0;
|
int tokenNumber = 0;
|
||||||
String hiiDefaultValue = null;
|
String hiiDefaultValue = null;
|
||||||
|
String[] variableGuidString = null;
|
||||||
|
|
||||||
List<DynamicPcdBuildDefinitions.PcdBuildData.SkuInfo> skuInfoList = null;
|
List<DynamicPcdBuildDefinitions.PcdBuildData.SkuInfo> skuInfoList = null;
|
||||||
DynamicPcdBuildDefinitions.PcdBuildData dynamicInfo = null;
|
DynamicPcdBuildDefinitions.PcdBuildData dynamicInfo = null;
|
||||||
|
@ -2240,7 +2241,9 @@ public class CollectPCDAction {
|
||||||
"file, who use HII, but there is no <VariableGuid> defined for Sku %d data!",
|
"file, who use HII, but there is no <VariableGuid> defined for Sku %d data!",
|
||||||
token.cName,
|
token.cName,
|
||||||
index);
|
index);
|
||||||
|
if (exceptionString != null) {
|
||||||
|
throw new EntityException(exceptionString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skuInfoList.get(index).getVariableOffset() == null) {
|
if (skuInfoList.get(index).getVariableOffset() == null) {
|
||||||
|
@ -2248,6 +2251,9 @@ public class CollectPCDAction {
|
||||||
"file, who use HII, but there is no <VariableOffset> defined for Sku %d data!",
|
"file, who use HII, but there is no <VariableOffset> defined for Sku %d data!",
|
||||||
token.cName,
|
token.cName,
|
||||||
index);
|
index);
|
||||||
|
if (exceptionString != null) {
|
||||||
|
throw new EntityException(exceptionString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skuInfoList.get(index).getHiiDefaultValue() == null) {
|
if (skuInfoList.get(index).getHiiDefaultValue() == null) {
|
||||||
|
@ -2255,11 +2261,10 @@ public class CollectPCDAction {
|
||||||
"file, who use HII, but there is no <HiiDefaultValue> defined for Sku %d data!",
|
"file, who use HII, but there is no <HiiDefaultValue> defined for Sku %d data!",
|
||||||
token.cName,
|
token.cName,
|
||||||
index);
|
index);
|
||||||
}
|
|
||||||
|
|
||||||
if (exceptionString != null) {
|
if (exceptionString != null) {
|
||||||
throw new EntityException(exceptionString);
|
throw new EntityException(exceptionString);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (skuInfoList.get(index).getHiiDefaultValue() != null) {
|
if (skuInfoList.get(index).getHiiDefaultValue() != null) {
|
||||||
hiiDefaultValue = skuInfoList.get(index).getHiiDefaultValue().toString();
|
hiiDefaultValue = skuInfoList.get(index).getHiiDefaultValue().toString();
|
||||||
|
@ -2283,8 +2288,18 @@ public class CollectPCDAction {
|
||||||
index));
|
index));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get variable guid string according to the name of guid which will be mapped into a GUID in SPD file.
|
||||||
|
//
|
||||||
|
variableGuidString = GlobalData.getGuidInfoGuid(skuInfoList.get(index).getVariableGuid().toString());
|
||||||
|
if (variableGuidString == null) {
|
||||||
|
throw new EntityException(String.format("[GUID Error] For dynamic PCD %s, the variable guid %s can be found in all SPD file!",
|
||||||
|
token.cName,
|
||||||
|
skuInfoList.get(index).getVariableGuid().toString()));
|
||||||
|
}
|
||||||
|
|
||||||
skuInstance.value.setHiiData(skuInfoList.get(index).getVariableName(),
|
skuInstance.value.setHiiData(skuInfoList.get(index).getVariableName(),
|
||||||
translateSchemaStringToUUID(skuInfoList.get(index).getVariableGuid().toString()),
|
translateSchemaStringToUUID(variableGuidString[1]),
|
||||||
skuInfoList.get(index).getVariableOffset(),
|
skuInfoList.get(index).getVariableOffset(),
|
||||||
skuInfoList.get(index).getHiiDefaultValue().toString());
|
skuInfoList.get(index).getHiiDefaultValue().toString());
|
||||||
token.skuData.add(skuInstance);
|
token.skuData.add(skuInstance);
|
||||||
|
@ -2350,6 +2365,9 @@ public class CollectPCDAction {
|
||||||
return new UUID(0, 0);
|
return new UUID(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uuidString = uuidString.replaceAll("\\{", "");
|
||||||
|
uuidString = uuidString.replaceAll("\\}", "");
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the UUID schema string is GuidArrayType type then need translate
|
// If the UUID schema string is GuidArrayType type then need translate
|
||||||
// to GuidNamingConvention type at first.
|
// to GuidNamingConvention type at first.
|
||||||
|
@ -2434,11 +2452,11 @@ public class CollectPCDAction {
|
||||||
**/
|
**/
|
||||||
public static void main(String argv[]) throws EntityException {
|
public static void main(String argv[]) throws EntityException {
|
||||||
CollectPCDAction ca = new CollectPCDAction();
|
CollectPCDAction ca = new CollectPCDAction();
|
||||||
ca.setWorkspacePath("m:/tianocore_latest/edk2");
|
ca.setWorkspacePath("m:/tianocore/edk2");
|
||||||
ca.setFPDFilePath("m:/tianocore_latest/edk2/EdkNt32Pkg/Nt32.fpd");
|
ca.setFPDFilePath("m:/tianocore/edk2/EdkNt32Pkg/Nt32.fpd");
|
||||||
ca.setActionMessageLevel(ActionMessage.MAX_MESSAGE_LEVEL);
|
ca.setActionMessageLevel(ActionMessage.MAX_MESSAGE_LEVEL);
|
||||||
GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db",
|
GlobalData.initInfo("Tools" + File.separator + "Conf" + File.separator + "FrameworkDatabase.db",
|
||||||
"m:/tianocore_latest/edk2");
|
"m:/tianocore/edk2");
|
||||||
ca.execute();
|
ca.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1245,7 +1245,7 @@
|
||||||
</xs:annotation>
|
</xs:annotation>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element minOccurs="1" maxOccurs="1" name="VariableName" type="VariableNameDataType"/>
|
<xs:element minOccurs="1" maxOccurs="1" name="VariableName" type="VariableNameDataType"/>
|
||||||
<xs:element minOccurs="0" maxOccurs="1" name="VariableGuid" type="VariableGuidType"/>
|
<xs:element minOccurs="0" maxOccurs="1" name="VariableGuid" type="C_NameType"/>
|
||||||
<xs:element minOccurs="1" maxOccurs="1" name="VariableOffset" type="Hex64BitDataType"/>
|
<xs:element minOccurs="1" maxOccurs="1" name="VariableOffset" type="Hex64BitDataType"/>
|
||||||
<xs:element minOccurs="1" maxOccurs="1" name="HiiDefaultValue" type="DefaultValueType"/>
|
<xs:element minOccurs="1" maxOccurs="1" name="HiiDefaultValue" type="DefaultValueType"/>
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
|
|
Loading…
Reference in New Issue