summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-14 04:01:11 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-14 04:01:11 +0000
commit833b154119b2c08ccaecac2a9d98acd7c1e50f80 (patch)
treeb78b0f5311e6ee44218f3077ba2ebb1f5ff1cd4c
parentd5e51168eb8d7006616c6a999fe771b91aace087 (diff)
downloadedk2-833b154119b2c08ccaecac2a9d98acd7c1e50f80.zip
edk2-833b154119b2c08ccaecac2a9d98acd7c1e50f80.tar.gz
edk2-833b154119b2c08ccaecac2a9d98acd7c1e50f80.tar.bz2
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
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java39
1 files changed, 30 insertions, 9 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
index fe09be2..473247f 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
@@ -1485,15 +1485,15 @@ public class CollectPCDAction {
// <ModuleSAs>, It is work around code.
//
primaryKey1 = UsageInstance.getPrimaryKey(modules.get(index).module.getModuleName(),
- translateSchemaStringToUUID(modules.get(index).module.getModuleGuid()),
- modules.get(index).module.getPackageName(),
- translateSchemaStringToUUID(modules.get(index).module.getPackageGuid()),
+ null,
+ null,
+ null,
modules.get(index).module.getArch().toString(),
null);
primaryKey2 = UsageInstance.getPrimaryKey(modules.get(index2).module.getModuleName(),
- translateSchemaStringToUUID(modules.get(index2).module.getModuleGuid()),
- modules.get(index2).module.getPackageName(),
- translateSchemaStringToUUID(modules.get(index2).module.getPackageGuid()),
+ null,
+ null,
+ null,
modules.get(index2).module.getArch().toString(),
null);
if (primaryKey1.equalsIgnoreCase(primaryKey2)) {
@@ -1533,6 +1533,17 @@ public class CollectPCDAction {
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
// -------------------------------------------------------------------------------------------
@@ -1676,9 +1687,9 @@ public class CollectPCDAction {
//
usageInstance = new UsageInstance(token,
moduleName,
- translateSchemaStringToUUID(modules.get(index).module.getModuleGuid()),
- modules.get(index).module.getPackageName(),
- translateSchemaStringToUUID(modules.get(index).module.getPackageGuid()),
+ null,
+ null,
+ null,
modules.get(index).type,
pcdType,
modules.get(index).module.getArch().toString(),
@@ -1734,6 +1745,16 @@ public class CollectPCDAction {
dynamicPcdBuildDataArray = dynamicPcdBuildDefinitions.getPcdBuildDataList();
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(),
translateSchemaStringToUUID(dynamicPcdBuildDataArray.get(index).getTokenSpaceGuid()));
if (dynamicPrimaryKey.equalsIgnoreCase(token.getPrimaryKeyString())) {