From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.56144.1606717914577773245 for ; Sun, 29 Nov 2020 22:31:54 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: yuwei.chen@intel.com) IronPort-SDR: GWA3qwsWVKF2Bw843CvLxRLMWNTJny8N5o29C4yTp5g96UQYY0ENybCHTVCCDhe0sPQPv+xaUu vc1DXQvWELFg== X-IronPort-AV: E=McAfee;i="6000,8403,9820"; a="257296072" X-IronPort-AV: E=Sophos;i="5.78,379,1599548400"; d="scan'208";a="257296072" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2020 22:31:52 -0800 IronPort-SDR: GuzOSTzOPpehMLrMQAbnP7kXFgAS6gDouuAo/ZnbdamoAZrIlQmO69hnYBTraIHu9MQKzbUqox WhVcpsyxtkNg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,379,1599548400"; d="scan'208";a="334545889" Received: from yuweipc.ccr.corp.intel.com ([10.239.158.34]) by orsmga006.jf.intel.com with ESMTP; 29 Nov 2020 22:31:50 -0800 From: "Yuwei Chen" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files. Date: Mon, 30 Nov 2020 14:31:49 +0800 Message-Id: <20201130063149.216-1-yuwei.chen@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently the generated StructurePcd.dsc file does not have the commits wrote in VFR files, which is not convenient for developer to modify. To solve this problem, The commits will be added after the Pcd values in StructurePcd.dsc file. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Yuwei Chen --- BaseTools/Scripts/ConvertFceToStructurePcd.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/BaseTools/Scripts/ConvertFceToStructurePcd.py b/BaseTools/Scripts/ConvertFceToStructurePcd.py index aeda3ff26dfe..45762f579b83 100644 --- a/BaseTools/Scripts/ConvertFceToStructurePcd.py +++ b/BaseTools/Scripts/ConvertFceToStructurePcd.py @@ -278,6 +278,7 @@ class Config(object): part = [] for x in section[1:]: line=x.split('\n')[0] + commit = value_re.findall(line) # the string \\... in "Q...." line line=value_re.sub('',line) #delete \\... in "Q...." line list1=line.split(' ') value=self.value_parser(list1) @@ -289,7 +290,7 @@ class Config(object): if attribute[0] in ['0x3','0x7']: offset = int(offset[0], 16) #help = help_re.findall(x) - text = offset, name[0], guid[0], value, attribute[0] + text = offset, name[0], guid[0], value, attribute[0], commit[0] part.append(text) return(part) @@ -479,10 +480,10 @@ class mainprocess(object): tmp_id=[id_key] #['0_0',[(struct,[name...]),(struct,[name...])]] tmp_info={} #{name:struct} for section in config_dict[id_key]: - c_offset,c_name,c_guid,c_value,c_attribute = section + c_offset,c_name,c_guid,c_value,c_attribute,c_commit = section if c_name in efi_dict: struct = efi_dict[c_name] - title='%s%s|L"%s"|%s|0x00||%s\n'%(PCD_NAME,c_name,c_name,self.guid.guid_parser(c_guid),self.attribute_dict[c_attribute]) + title='%s%s|L"%s"|%s|0x00||%s #%s\n'%(PCD_NAME,c_name,c_name,self.guid.guid_parser(c_guid),self.attribute_dict[c_attribute],c_commit) if struct in all_struct: lstfile = stru_lst[struct] struct_dict=all_struct[struct] @@ -498,7 +499,7 @@ class mainprocess(object): ERRORMSG.append("ERROR: Struct %s can't found in lst file" %struct) if c_offset in struct_dict: offset_name=struct_dict[c_offset] - info = "%s%s.%s|%s\n"%(PCD_NAME,c_name,offset_name,c_value) + info = "%s%s.%s|%s #%s\n"%(PCD_NAME,c_name,offset_name,c_value,c_commit) inf = "%s%s\n"%(PCD_NAME,c_name) inf_list.append(inf) tmp_info[info]=title -- 2.27.0.windows.1