From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 E0314211069FA for ; Wed, 29 Aug 2018 01:48:16 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Aug 2018 01:48:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,301,1531810800"; d="scan'208";a="66832342" Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.110]) by fmsmga008.fm.intel.com with ESMTP; 29 Aug 2018 01:48:03 -0700 From: BobCF To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Wed, 29 Aug 2018 16:47:59 +0800 Message-Id: <20180829084759.1032-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [Patch] BaseTools: Dynamic Pcd value override from command line. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2018 08:48:17 -0000 Fixed the pcd value override issue when Dynamic Pcd is from command line but is not list in Dsc file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Source/Python/Workspace/DscBuildData.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 748452623f..d553536961 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1268,13 +1268,18 @@ class DscBuildData(PlatformBuildClassObject): PcdInDec = self.DecPcds.get((Name, Guid)) if PcdInDec: PcdInDec.PcdValueFromComm = NoFiledValues[(Guid, Name)][0] if PcdInDec.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_FIXED_AT_BUILD], self._PCD_TYPE_STRING_[MODEL_PCD_PATCHABLE_IN_MODULE], - self._PCD_TYPE_STRING_[MODEL_PCD_FEATURE_FLAG]]: + self._PCD_TYPE_STRING_[MODEL_PCD_FEATURE_FLAG], + self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC], + self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX]]: self.Pcds[Name, Guid] = copy.deepcopy(PcdInDec) self.Pcds[Name, Guid].DefaultValue = NoFiledValues[( Guid, Name)][0] + if PcdInDec.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC], + self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX]]: + self.Pcds[Name, Guid].SkuInfoList = {TAB_DEFAULT:SkuInfoClass(TAB_DEFAULT, self.SkuIds[TAB_DEFAULT][0], '', '', '', '', '', NoFiledValues[( Guid, Name)][0])} return AllPcds def OverrideByFdfOverAll(self,AllPcds): if GlobalData.gFdfParser is None: -- 2.16.2.windows.1