From nobody Mon Apr 29 15:20:57 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1495521778737617.2944752569475; Mon, 22 May 2017 23:42:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 430AC21A0BA9C; Mon, 22 May 2017 23:42:54 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2132821A134BB for ; Mon, 22 May 2017 23:42:53 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2017 23:42:52 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga005.fm.intel.com with ESMTP; 22 May 2017 23:42:52 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,381,1491289200"; d="scan'208";a="105436764" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Tue, 23 May 2017 14:42:48 +0800 Message-Id: <1495521768-8016-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [Patch V2] BaseTools: Fix incremental build bug on DynamicPcd Token Generation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" During incremental build, we meet the bug that the different drivers use the different token for the same DynamicPcd. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 17 +++++++++++++++++ BaseTools/Source/Python/build/build.py | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index 736c1ae..fa6ec56 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -669,10 +669,23 @@ class WorkspaceAutoGen(AutoGen): content +=3D 'BuildOptionPcd: ' content +=3D str(GlobalData.BuildOptionPcd) SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), cont= ent, False) =20 # + # Create PcdToken Number file for Dynamic/DynamicEx Pcd. + # + PcdTokenNumber =3D 'PcdTokenNumber: ' + if Pa.PcdTokenNumber: + if Pa.DynamicPcdList: + for Pcd in Pa.DynamicPcdList: + PcdTokenNumber +=3D os.linesep + PcdTokenNumber +=3D str((Pcd.TokenCName, Pcd.TokenSpac= eGuidCName)) + PcdTokenNumber +=3D ' : ' + PcdTokenNumber +=3D str(Pa.PcdTokenNumber[Pcd.TokenCNa= me, Pcd.TokenSpaceGuidCName]) + SaveFileOnChange(os.path.join(self.BuildDir, 'PcdTokenNumber'), Pc= dTokenNumber, False) + + # # Get set of workspace metafiles # AllWorkSpaceMetaFiles =3D self._GetMetaFiles(Target, Toolchain, Ar= ch) =20 # @@ -722,10 +735,14 @@ class WorkspaceAutoGen(AutoGen): =20 # add BuildOption metafile # AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'BuildOption= s')) =20 + # add PcdToken Number file for Dynamic/DynamicEx Pcd + # + AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenNum= ber')) + for Arch in self.ArchList: Platform =3D self.BuildDatabase[self.MetaFile, Arch, Target, T= oolchain] PGen =3D PlatformAutoGen(self, self.MetaFile, Target, Toolchai= n, Arch) =20 # diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index bd14e27..fd94ae6 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1,10 +1,10 @@ ## @file # build a platform or a module # # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License # which accompanies this distribution. The full text of the license may = be found at # http://opensource.org/licenses/bsd-license.php @@ -52,11 +52,11 @@ import Common.EdkLogger import Common.GlobalData as GlobalData =20 # Version and Copyright VersionNumber =3D "0.60" + ' ' + gBUILD_VERSION __version__ =3D "%prog Version " + VersionNumber -__copyright__ =3D "Copyright (c) 2007 - 2016, Intel Corporation All right= s reserved." +__copyright__ =3D "Copyright (c) 2007 - 2017, Intel Corporation All right= s reserved." =20 ## standard targets of build command gSupportedTarget =3D ['all', 'genc', 'genmake', 'modules', 'libraries', 'f= ds', 'clean', 'cleanall', 'cleanlib', 'run'] =20 ## build configuration file --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel