|
From: <xf...@us...> - 2012-05-29 08:21:40
|
Revision: 2528
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2528&view=rev
Author: xfzyr
Date: 2012-05-29 08:21:34 +0000 (Tue, 29 May 2012)
Log Message:
-----------
Add the check of not allow Dynamic or DynamicEx PCD used in FDF file.
Signed-off-by: Yurui Zeng <yur...@in...>
Reviewed-by: Liu, Yingke D <yin...@in...>
Modified Paths:
--------------
trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
Modified: trunk/BaseTools/Source/Python/AutoGen/AutoGen.py
===================================================================
--- trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2012-05-28 02:56:13 UTC (rev 2527)
+++ trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2012-05-29 08:21:34 UTC (rev 2528)
@@ -293,11 +293,13 @@
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
DecPcds = {}
+ DecPcdsKey = set()
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
Pkgs = PGen.PackageList
for Pkg in Pkgs:
for Pcd in Pkg.Pcds:
DecPcds[Pcd[0], Pcd[1]] = Pkg.Pcds[Pcd]
+ DecPcdsKey.add((Pcd[0], Pcd[1], Pcd[2]))
Platform.IsPlatformPcdDeclared(DecPcds)
Platform.SkuName = self.SkuId
@@ -310,6 +312,20 @@
File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
)
+ else:
+ # Check whether Dynamic or DynamicEx PCD used in FDF file. If used, build break and give a error message.
+ if (Name, Guid, TAB_PCDS_FIXED_AT_BUILD) in DecPcdsKey \
+ or (Name, Guid, TAB_PCDS_PATCHABLE_IN_MODULE) in DecPcdsKey \
+ or (Name, Guid, TAB_PCDS_FEATURE_FLAG) in DecPcdsKey:
+ continue
+ elif (Name, Guid, TAB_PCDS_DYNAMIC) in DecPcdsKey or (Name, Guid, TAB_PCDS_DYNAMIC_EX) in DecPcdsKey:
+ EdkLogger.error(
+ 'build',
+ PARSER_ERROR,
+ "Using Dynamic or DynamicEx type of PCD [%s.%s] in FDF file is not allowed." % (Guid, Name),
+ File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
+ Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
+ )
Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
Pa = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|