diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-01-29 04:48:55 +0000 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-02-24 15:31:25 +0800 |
commit | 7be61547f59d48aed0e93c44d7eec5949ead8f6f (patch) | |
tree | 661297c15469bd721081d491d21701e99b30320c /BaseTools/Source/Python/AutoGen | |
parent | f3962f2ff0a5a841a1c35ec00b0902aab153006a (diff) | |
download | edk2-platforms-7be61547f59d48aed0e93c44d7eec5949ead8f6f.tar.xz |
BaseTools:Incremental build not work if VPD values in DSC changed by -D
If a -D flag is passed into build that selects different lines in
[PcdsDynamicExVpd], then build does not see any changes to the timestamp
of the DSC file and the VPD tool is not used to regenerate the VPD
region based in the statements that are active. so we changed the detect
condition and use SaveFileOnChange function to generate VPD.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19767 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit e459de78001be89d37cc286d0fcd57f92e1a438a)
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 55a59dabc0..776743a710 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1256,7 +1256,6 @@ class PlatformAutoGen(AutoGen): "Fail to get FLASH_DEFINITION definition in DSC file %s which is required when DSC contains VPD PCD." % str(self.Platform.MetaFile))
if VpdFile.GetCount() != 0:
- DscTimeStamp = self.Platform.MetaFile.TimeStamp
FvPath = os.path.join(self.BuildDir, "FV")
if not os.path.exists(FvPath):
try:
@@ -1264,13 +1263,9 @@ class PlatformAutoGen(AutoGen): except:
EdkLogger.error("build", FILE_WRITE_FAILURE, "Fail to create FV folder under %s" % self.BuildDir)
-
VpdFilePath = os.path.join(FvPath, "%s.txt" % self.Platform.VpdToolGuid)
-
- if not os.path.exists(VpdFilePath) or os.path.getmtime(VpdFilePath) < DscTimeStamp:
- VpdFile.Write(VpdFilePath)
-
+ if VpdFile.Write(VpdFilePath):
# retrieve BPDG tool's path from tool_def.txt according to VPD_TOOL_GUID defined in DSC file.
BPDGToolName = None
for ToolDef in self.ToolDefinition.values():
|