mirror of https://github.com/acidanthera/audk.git
Fix two transition issue:
1) Although current PCD tool's code support use packageName, packageGuid, version, arch to identify a module, but these value can not be got from FPD file, so use null for transition phase. 2) Add transition code to check <TokenSpaceGuid>, In future, the checking work should be done by schema checking tools when change occur of <TokenSpaceGuid> from[0..1] to [1] in schema. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@508 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d5e51168eb
commit
833b154119
|
@ -1485,15 +1485,15 @@ public class CollectPCDAction {
|
||||||
// <ModuleSAs>, It is work around code.
|
// <ModuleSAs>, It is work around code.
|
||||||
//
|
//
|
||||||
primaryKey1 = UsageInstance.getPrimaryKey(modules.get(index).module.getModuleName(),
|
primaryKey1 = UsageInstance.getPrimaryKey(modules.get(index).module.getModuleName(),
|
||||||
translateSchemaStringToUUID(modules.get(index).module.getModuleGuid()),
|
null,
|
||||||
modules.get(index).module.getPackageName(),
|
null,
|
||||||
translateSchemaStringToUUID(modules.get(index).module.getPackageGuid()),
|
null,
|
||||||
modules.get(index).module.getArch().toString(),
|
modules.get(index).module.getArch().toString(),
|
||||||
null);
|
null);
|
||||||
primaryKey2 = UsageInstance.getPrimaryKey(modules.get(index2).module.getModuleName(),
|
primaryKey2 = UsageInstance.getPrimaryKey(modules.get(index2).module.getModuleName(),
|
||||||
translateSchemaStringToUUID(modules.get(index2).module.getModuleGuid()),
|
null,
|
||||||
modules.get(index2).module.getPackageName(),
|
null,
|
||||||
translateSchemaStringToUUID(modules.get(index2).module.getPackageGuid()),
|
null,
|
||||||
modules.get(index2).module.getArch().toString(),
|
modules.get(index2).module.getArch().toString(),
|
||||||
null);
|
null);
|
||||||
if (primaryKey1.equalsIgnoreCase(primaryKey2)) {
|
if (primaryKey1.equalsIgnoreCase(primaryKey2)) {
|
||||||
|
@ -1532,6 +1532,17 @@ public class CollectPCDAction {
|
||||||
datum = pcdBuildData.getValue();
|
datum = pcdBuildData.getValue();
|
||||||
maxDatumSize = pcdBuildData.getMaxDatumSize();
|
maxDatumSize = pcdBuildData.getMaxDatumSize();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check <TokenSpaceGuid> is exist? In future, because all schema verification will tools
|
||||||
|
// will check that, following checking code could be removed.
|
||||||
|
//
|
||||||
|
if (pcdBuildData.getTokenSpaceGuid() == null) {
|
||||||
|
exceptionString = String.format("[FPD file error] There is no <TokenSpaceGuid> for PCD %s in module %s! This is required!",
|
||||||
|
pcdBuildData.getCName(),
|
||||||
|
moduleName);
|
||||||
|
throw new EntityException(exceptionString);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// -------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------
|
||||||
// 2.1.1), Do some necessary checking work for FixedAtBuild, FeatureFlag and PatchableInModule
|
// 2.1.1), Do some necessary checking work for FixedAtBuild, FeatureFlag and PatchableInModule
|
||||||
|
@ -1676,9 +1687,9 @@ public class CollectPCDAction {
|
||||||
//
|
//
|
||||||
usageInstance = new UsageInstance(token,
|
usageInstance = new UsageInstance(token,
|
||||||
moduleName,
|
moduleName,
|
||||||
translateSchemaStringToUUID(modules.get(index).module.getModuleGuid()),
|
null,
|
||||||
modules.get(index).module.getPackageName(),
|
null,
|
||||||
translateSchemaStringToUUID(modules.get(index).module.getPackageGuid()),
|
null,
|
||||||
modules.get(index).type,
|
modules.get(index).type,
|
||||||
pcdType,
|
pcdType,
|
||||||
modules.get(index).module.getArch().toString(),
|
modules.get(index).module.getArch().toString(),
|
||||||
|
@ -1734,6 +1745,16 @@ public class CollectPCDAction {
|
||||||
|
|
||||||
dynamicPcdBuildDataArray = dynamicPcdBuildDefinitions.getPcdBuildDataList();
|
dynamicPcdBuildDataArray = dynamicPcdBuildDefinitions.getPcdBuildDataList();
|
||||||
for (index = 0; index < dynamicPcdBuildDataArray.size(); index ++) {
|
for (index = 0; index < dynamicPcdBuildDataArray.size(); index ++) {
|
||||||
|
//
|
||||||
|
// Check <TokenSpaceGuid> is exist? In future, because all schema verification will tools
|
||||||
|
// will check that, following checking code could be removed.
|
||||||
|
//
|
||||||
|
if (dynamicPcdBuildDataArray.get(index).getTokenSpaceGuid() == null) {
|
||||||
|
exceptionString = String.format("[FPD file error] There is no <TokenSpaceGuid> for PCD %s in <DynamicPcdBuildDefinitions>! This is required!",
|
||||||
|
dynamicPcdBuildDataArray.get(index).getCName());
|
||||||
|
throw new EntityException(exceptionString);
|
||||||
|
}
|
||||||
|
|
||||||
dynamicPrimaryKey = Token.getPrimaryKeyString(dynamicPcdBuildDataArray.get(index).getCName(),
|
dynamicPrimaryKey = Token.getPrimaryKeyString(dynamicPcdBuildDataArray.get(index).getCName(),
|
||||||
translateSchemaStringToUUID(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuid()));
|
translateSchemaStringToUUID(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuid()));
|
||||||
if (dynamicPrimaryKey.equalsIgnoreCase(token.getPrimaryKeyString())) {
|
if (dynamicPrimaryKey.equalsIgnoreCase(token.getPrimaryKeyString())) {
|
||||||
|
|
Loading…
Reference in New Issue