|
From: <yi...@us...> - 2012-03-23 07:01:03
|
Revision: 2506
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2506&view=rev
Author: yingke
Date: 2012-03-23 07:00:57 +0000 (Fri, 23 Mar 2012)
Log Message:
-----------
Check if PCD name used in FDF file is declared in DEC files.
Signed-off-by: yingke
Reviewed-by: lgao4
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-03-23 06:59:21 UTC (rev 2505)
+++ trunk/BaseTools/Source/Python/AutoGen/AutoGen.py 2012-03-23 07:00:57 UTC (rev 2506)
@@ -291,8 +291,23 @@
# apply SKU and inject PCDs from Flash Definition file
for Arch in self.ArchList:
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
+ DecPcds = set()
+ if PcdSet:
+ PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
+ Pkgs = PGen.PackageList
+ for Pkg in Pkgs:
+ for Pcd in Pkg.Pcds.keys():
+ DecPcds.add((Pcd[0], Pcd[1]))
Platform.SkuName = self.SkuId
for Name, Guid in PcdSet:
+ if (Name, Guid) not in DecPcds:
+ EdkLogger.error(
+ 'build',
+ FORMAT_INVALID,
+ "PCD (%s.%s) used in FDF is not declared in DEC files. FDF file: %s, line #: %d." % \
+ (Guid, Name, self.FdfProfile.PcdFileLineDict[Name, Guid][0], self.FdfProfile.PcdFileLineDict[Name, Guid][1]),
+ ExtraData=None
+ )
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.
|