* [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
@ 2020-11-30 6:31 Yuwei Chen
2020-11-30 7:36 ` 回复: " gaoliming
2020-12-03 4:20 ` Bob Feng
0 siblings, 2 replies; 4+ messages in thread
From: Yuwei Chen @ 2020-11-30 6:31 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao
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 <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* 回复: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
2020-11-30 6:31 [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files Yuwei Chen
@ 2020-11-30 7:36 ` gaoliming
2020-11-30 7:50 ` [edk2-devel] " Yuwei Chen
2020-12-03 4:20 ` Bob Feng
1 sibling, 1 reply; 4+ messages in thread
From: gaoliming @ 2020-11-30 7:36 UTC (permalink / raw)
To: 'Yuwei Chen', devel; +Cc: 'Bob Feng'
Do you mean the comments in VFR?
> -----邮件原件-----
> 发件人: Yuwei Chen <yuwei.chen@intel.com>
> 发送时间: 2020年11月30日 14:32
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> 主题: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
>
> 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 <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
> ---
> 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.attrib
> ute_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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] 回复: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
2020-11-30 7:36 ` 回复: " gaoliming
@ 2020-11-30 7:50 ` Yuwei Chen
0 siblings, 0 replies; 4+ messages in thread
From: Yuwei Chen @ 2020-11-30 7:50 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn
Yes. Sorry for the spelling mistake. I will update a new one.
As there are comments in VFR files, we add them into StructurePcd.dsc file in order to help developer get the physical meaning of Pcd from DSC file.
Thanks,
Yuwei
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Monday, November 30, 2020 3:36 PM
> To: Chen, Christine <yuwei.chen@intel.com>; devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>
> Subject: [edk2-devel] 回复: [PATCH 1/1] BaseTools: Add commits in
> generated StructurePcd files.
>
> Do you mean the comments in VFR?
>
> > -----邮件原件-----
> > 发件人: Yuwei Chen <yuwei.chen@intel.com>
> > 发送时间: 2020年11月30日 14:32
> > 收件人: devel@edk2.groups.io
> > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>
> > 主题: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
> >
> > 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 <bob.c.feng@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
> > ---
> > 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.att
> r
> > ib
> > ute_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
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
2020-11-30 6:31 [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files Yuwei Chen
2020-11-30 7:36 ` 回复: " gaoliming
@ 2020-12-03 4:20 ` Bob Feng
1 sibling, 0 replies; 4+ messages in thread
From: Bob Feng @ 2020-12-03 4:20 UTC (permalink / raw)
To: Chen, Christine, devel@edk2.groups.io; +Cc: Liming Gao
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Chen, Christine <yuwei.chen@intel.com>
Sent: Monday, November 30, 2020 2:32 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files.
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 <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-03 4:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30 6:31 [PATCH 1/1] BaseTools: Add commits in generated StructurePcd files Yuwei Chen
2020-11-30 7:36 ` 回复: " gaoliming
2020-11-30 7:50 ` [edk2-devel] " Yuwei Chen
2020-12-03 4:20 ` Bob Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox