From nobody Sun May 5 17:27:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68417+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68417+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1607393774; cv=none; d=zohomail.com; s=zohoarc; b=X5ev0YOlLaLuymWn2+jF8XsXgaQESWbchGzGEtaF+Wb2wjXq8xqSBCiie3G1ejihDOdTDhYpNeNM2x1OTfYWKq39EWv6aMIO+N+A3APJw9M9CO294qMWtOd5riEFATuIoelOB411ng7jXKVcIIp4ql+Kd3cQw+FwmMfTGlB/tBo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607393774; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=GaHdITDKI/1UcWCB70eI9DbxB2L8gbN1Ss9974dUxm8=; b=SofhKmUKMZrhQdiWPrjnfyA0L+DDdKuuSBLSBFaZ4o6UY6zFZqYWxtmWiqTvJC3SQwRXfFbXfrWDrblqcqo7YLY18/4LFbaLbEshkyvIGHVSP3kRhfArmIIjkeAOtW3ah+9xTRa3q6SQpgFaOnvhWHHAnDc+f3VokE5iHL7KyUM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68417+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1607393774345982.1530333606352; Mon, 7 Dec 2020 18:16:14 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id NYd3YY1788612xoVhiTrzlwm; Mon, 07 Dec 2020 18:16:13 -0800 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.2639.1607393773495345014 for ; Mon, 07 Dec 2020 18:16:13 -0800 IronPort-SDR: h3u3wxGkkcf5phrJigKu2CIAtfBDqz6LKQ85nA1vnFzahVD4seOFkeogioEiY4zJCMuQqiOplY SVkBfXD7qyKA== X-IronPort-AV: E=McAfee;i="6000,8403,9828"; a="173962845" X-IronPort-AV: E=Sophos;i="5.78,401,1599548400"; d="scan'208";a="173962845" X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2020 18:16:13 -0800 IronPort-SDR: bmrHGyN87yTHPCkDjwNGl8jOQl66J/d/9DO89BQq4G+LklQSLVQXosPZ4LJPFsJXKEeioNKBT0 l1m/9lO9gA2w== X-IronPort-AV: E=Sophos;i="5.78,401,1599548400"; d="scan'208";a="483453440" X-Received: from cchiu4-mobl.gar.corp.intel.com ([10.252.187.92]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2020 18:16:11 -0800 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Chasel Chiu , Maurice Ma , Nate DeSimone , Star Zeng Subject: [edk2-devel] [PATCH] IntelFsp2Pkg/GenCfgOpt.py: Incremental build with UPD in sub DSC. Date: Tue, 8 Dec 2020 10:15:53 +0800 Message-Id: <20201208021553.1348-1-chasel.chiu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,chasel.chiu@intel.com X-Gm-Message-State: EX6PNoAlDbiIdQ5EmPoP0cuHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1607393773; bh=QeOmFWmWojWs9Nvz+1tKQ0ZhRpQXE089R+Y8rI9izgA=; h=Cc:Date:From:Reply-To:Subject:To; b=GXLiM3fEtaaHr1q/r+iyZtNhl46aI0QsgG4IGWteGqm8qXfUqOUaLkWwJwkho92mMXi oI/5AgjDzE1EmkIPut0IRO+yvyGXAVK6QlS2j+nHAR9HZxsBLM38c70LQ70uS9Kc7MgQw zDQyKAxPbN7q4UHp+Yh0WuItjJN0Bx4rCKA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3107 Current script only compares main DSC and output file datetime to determine if re-generation required or not. When UPD defined in sub DSC and was modified current script cannot detect and will not re-generate output files which caused incremental build issue. Since UPD can be defined in any sub DSC the script has been updated to compare all DSC datetime with output files to determine re-generation is needed or not. Cc: Maurice Ma Cc: Nate DeSimone Cc: Star Zeng Signed-off-by: Chasel Chiu Reviewed-by: Nate DeSimone Reviewed-by: Star Zeng Reviewed-by: Yuwei Chen Tested-by: Yuwei Chen --- IntelFsp2Pkg/Tools/GenCfgOpt.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt= .py index af7e14a10a..a0b8bba81e 100644 --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py @@ -313,6 +313,7 @@ EndList self._DscFile =3D '' self._FvDir =3D '' self._MapVer =3D 0 + self._DscTime =3D 0 =20 def ParseMacros (self, MacroDefStr): # ['-DABC=3D1', '-D', 'CFG_DEBUG=3D1', '-D', 'CFG_OUTDIR=3DBuild'] @@ -423,6 +424,9 @@ EndList self._DscFile =3D DscFile self._FvDir =3D FvDir =20 + # Initial DSC time is parent DSC time. + self._DscTime =3D os.path.getmtime(DscFile) + IsDefSect =3D False IsPcdSect =3D False IsUpdSect =3D False @@ -530,6 +534,12 @@ EndList if IncludeDsc =3D=3D None: print("ERROR: Cannot open file= '%s'" % IncludeFilePath) raise SystemExit + + # Update DscTime when newer DSC ti= me found. + CurrentDscTime =3D os.path.getmtim= e(os.path.realpath(IncludeDsc.name)) + if CurrentDscTime > self._DscTime: + self._DscTime =3D CurrentDscTi= me + NewDscLines =3D IncludeDsc.readlin= es() IncludeDsc.close() DscLines =3D NewDscLines + DscLines @@ -815,9 +825,8 @@ EndList if not os.path.exists(OutPutFile): NoFileChange =3D False else: - DscTime =3D os.path.getmtime(self._DscFile) OutputTime =3D os.path.getmtime(OutPutFile) - if DscTime > OutputTime: + if self._DscTime > OutputTime: NoFileChange =3D False return NoFileChange =20 --=20 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68417): https://edk2.groups.io/g/devel/message/68417 Mute This Topic: https://groups.io/mt/78794912/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-