public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] BaseTools: Support COMPAT16 section generation
@ 2022-08-30 10:19 Konstantin Aladyshev
  2022-08-31  1:41 ` 回复: [edk2-devel] " gaoliming
  2022-10-02  2:13 ` Bob Feng
  0 siblings, 2 replies; 5+ messages in thread
From: Konstantin Aladyshev @ 2022-08-30 10:19 UTC (permalink / raw)
  To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, Konstantin Aladyshev

Currently COMPAT16 section type is not recognized and GenSec is called
without the "-s [SectionType]" argument.
Add COMPAT16 type to the SectionType dictionary to fix the issue.

Now this syntax works correctly:
```
FILE FREEFORM = <GUID>  {
  SECTION COMPAT16 = <FILE>
}
```

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
 BaseTools/Source/Python/GenFds/Section.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 447828c8e5..859db7230a 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -28,6 +28,7 @@ class Section (SectionClassObject):
         BINARY_FILE_TYPE_PIC       : 'EFI_SECTION_PIC',
         BINARY_FILE_TYPE_TE        : 'EFI_SECTION_TE',
         'FV_IMAGE'  : 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE',
+        'COMPAT16'  : 'EFI_SECTION_COMPATIBILITY16',
         BINARY_FILE_TYPE_DXE_DEPEX : 'EFI_SECTION_DXE_DEPEX',
         BINARY_FILE_TYPE_PEI_DEPEX : 'EFI_SECTION_PEI_DEPEX',
         'GUIDED'    : 'EFI_SECTION_GUID_DEFINED',
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* 回复: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section generation
  2022-08-30 10:19 [PATCH v2] BaseTools: Support COMPAT16 section generation Konstantin Aladyshev
@ 2022-08-31  1:41 ` gaoliming
  2022-08-31  7:28   ` Konstantin Aladyshev
  2022-10-02  2:13 ` Bob Feng
  1 sibling, 1 reply; 5+ messages in thread
From: gaoliming @ 2022-08-31  1:41 UTC (permalink / raw)
  To: devel, aladyshev22; +Cc: bob.c.feng, yuwei.chen

Aladyshev: 
  The change is good. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
  
  Besides, how do you find this issue? Have you such test case or usage?

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Konstantin
> Aladyshev
> 发送时间: 2022年8月30日 18:20
> 收件人: devel@edk2.groups.io
> 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
> yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@gmail.com>
> 主题: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section
> generation
> 
> Currently COMPAT16 section type is not recognized and GenSec is called
> without the "-s [SectionType]" argument.
> Add COMPAT16 type to the SectionType dictionary to fix the issue.
> 
> Now this syntax works correctly:
> ```
> FILE FREEFORM = <GUID>  {
>   SECTION COMPAT16 = <FILE>
> }
> ```
> 
> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
> ---
>  BaseTools/Source/Python/GenFds/Section.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/BaseTools/Source/Python/GenFds/Section.py
> b/BaseTools/Source/Python/GenFds/Section.py
> index 447828c8e5..859db7230a 100644
> --- a/BaseTools/Source/Python/GenFds/Section.py
> +++ b/BaseTools/Source/Python/GenFds/Section.py
> @@ -28,6 +28,7 @@ class Section (SectionClassObject):
>          BINARY_FILE_TYPE_PIC       : 'EFI_SECTION_PIC',
> 
>          BINARY_FILE_TYPE_TE        : 'EFI_SECTION_TE',
> 
>          'FV_IMAGE'  : 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE',
> 
> +        'COMPAT16'  : 'EFI_SECTION_COMPATIBILITY16',
> 
>          BINARY_FILE_TYPE_DXE_DEPEX : 'EFI_SECTION_DXE_DEPEX',
> 
>          BINARY_FILE_TYPE_PEI_DEPEX : 'EFI_SECTION_PEI_DEPEX',
> 
>          'GUIDED'    : 'EFI_SECTION_GUID_DEFINED',
> 
> --
> 2.25.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#92976): https://edk2.groups.io/g/devel/message/92976
> Mute This Topic: https://groups.io/mt/93345713/4905953
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn]
> -=-=-=-=-=-=
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section generation
  2022-08-31  1:41 ` 回复: [edk2-devel] " gaoliming
@ 2022-08-31  7:28   ` Konstantin Aladyshev
  2022-09-02  8:22     ` 回复: " gaoliming
  0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Aladyshev @ 2022-08-31  7:28 UTC (permalink / raw)
  To: gaoliming; +Cc: devel, Feng, Bob C, Chen, Christine

In my free time I learn UEFI/edk2. I've noticed that there are not
many lessons about edk2 programming, so I've decided to write my own:
https://github.com/Kostr/UEFI-Lessons
I've found this issue while I was writing a lesson about file
sections. I've just tried to work with every possible section type and
have noticed problems with some cases, including COMPAT16.
Just in case the draft for this lesson is here
https://github.com/Kostr/UEFI-Lessons/blob/master/Lessons_uncategorized/Lesson_FDF_FV_3/README.md

On Wed, Aug 31, 2022 at 4:42 AM gaoliming <gaoliming@byosoft.com.cn> wrote:
>
> Aladyshev:
>   The change is good. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
>   Besides, how do you find this issue? Have you such test case or usage?
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Konstantin
> > Aladyshev
> > 发送时间: 2022年8月30日 18:20
> > 收件人: devel@edk2.groups.io
> > 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
> > yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@gmail.com>
> > 主题: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section
> > generation
> >
> > Currently COMPAT16 section type is not recognized and GenSec is called
> > without the "-s [SectionType]" argument.
> > Add COMPAT16 type to the SectionType dictionary to fix the issue.
> >
> > Now this syntax works correctly:
> > ```
> > FILE FREEFORM = <GUID>  {
> >   SECTION COMPAT16 = <FILE>
> > }
> > ```
> >
> > Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
> > ---
> >  BaseTools/Source/Python/GenFds/Section.py | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/BaseTools/Source/Python/GenFds/Section.py
> > b/BaseTools/Source/Python/GenFds/Section.py
> > index 447828c8e5..859db7230a 100644
> > --- a/BaseTools/Source/Python/GenFds/Section.py
> > +++ b/BaseTools/Source/Python/GenFds/Section.py
> > @@ -28,6 +28,7 @@ class Section (SectionClassObject):
> >          BINARY_FILE_TYPE_PIC       : 'EFI_SECTION_PIC',
> >
> >          BINARY_FILE_TYPE_TE        : 'EFI_SECTION_TE',
> >
> >          'FV_IMAGE'  : 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE',
> >
> > +        'COMPAT16'  : 'EFI_SECTION_COMPATIBILITY16',
> >
> >          BINARY_FILE_TYPE_DXE_DEPEX : 'EFI_SECTION_DXE_DEPEX',
> >
> >          BINARY_FILE_TYPE_PEI_DEPEX : 'EFI_SECTION_PEI_DEPEX',
> >
> >          'GUIDED'    : 'EFI_SECTION_GUID_DEFINED',
> >
> > --
> > 2.25.1
> >
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> > View/Reply Online (#92976): https://edk2.groups.io/g/devel/message/92976
> > Mute This Topic: https://groups.io/mt/93345713/4905953
> > Group Owner: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub
> > [gaoliming@byosoft.com.cn]
> > -=-=-=-=-=-=
> >
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 回复: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section generation
  2022-08-31  7:28   ` Konstantin Aladyshev
@ 2022-09-02  8:22     ` gaoliming
  0 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2022-09-02  8:22 UTC (permalink / raw)
  To: devel, aladyshev22; +Cc: 'Feng, Bob C', 'Chen, Christine'

Aladyshev:
  Thanks for your sharing. Your UEFI lessons provide the basic information of Edk2. They are useful for new edk2 developer.

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Konstantin
> Aladyshev
> 发送时间: 2022年8月31日 15:29
> 收件人: gaoliming <gaoliming@byosoft.com.cn>
> 抄送: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Chen,
> Christine <yuwei.chen@intel.com>
> 主题: Re: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section
> generation
> 
> In my free time I learn UEFI/edk2. I've noticed that there are not
> many lessons about edk2 programming, so I've decided to write my own:
> https://github.com/Kostr/UEFI-Lessons
> I've found this issue while I was writing a lesson about file
> sections. I've just tried to work with every possible section type and
> have noticed problems with some cases, including COMPAT16.
> Just in case the draft for this lesson is here
> https://github.com/Kostr/UEFI-Lessons/blob/master/Lessons_uncategorized/
> Lesson_FDF_FV_3/README.md
> 
> On Wed, Aug 31, 2022 at 4:42 AM gaoliming <gaoliming@byosoft.com.cn>
> wrote:
> >
> > Aladyshev:
> >   The change is good. Reviewed-by: Liming Gao
> <gaoliming@byosoft.com.cn>
> >
> >   Besides, how do you find this issue? Have you such test case or usage?
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表
> Konstantin
> > > Aladyshev
> > > 发送时间: 2022年8月30日 18:20
> > > 收件人: devel@edk2.groups.io
> > > 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
> > > yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@gmail.com>
> > > 主题: [edk2-devel] [PATCH v2] BaseTools: Support COMPAT16 section
> > > generation
> > >
> > > Currently COMPAT16 section type is not recognized and GenSec is called
> > > without the "-s [SectionType]" argument.
> > > Add COMPAT16 type to the SectionType dictionary to fix the issue.
> > >
> > > Now this syntax works correctly:
> > > ```
> > > FILE FREEFORM = <GUID>  {
> > >   SECTION COMPAT16 = <FILE>
> > > }
> > > ```
> > >
> > > Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
> > > ---
> > >  BaseTools/Source/Python/GenFds/Section.py | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/BaseTools/Source/Python/GenFds/Section.py
> > > b/BaseTools/Source/Python/GenFds/Section.py
> > > index 447828c8e5..859db7230a 100644
> > > --- a/BaseTools/Source/Python/GenFds/Section.py
> > > +++ b/BaseTools/Source/Python/GenFds/Section.py
> > > @@ -28,6 +28,7 @@ class Section (SectionClassObject):
> > >          BINARY_FILE_TYPE_PIC       : 'EFI_SECTION_PIC',
> > >
> > >          BINARY_FILE_TYPE_TE        : 'EFI_SECTION_TE',
> > >
> > >          'FV_IMAGE'  : 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE',
> > >
> > > +        'COMPAT16'  : 'EFI_SECTION_COMPATIBILITY16',
> > >
> > >          BINARY_FILE_TYPE_DXE_DEPEX : 'EFI_SECTION_DXE_DEPEX',
> > >
> > >          BINARY_FILE_TYPE_PEI_DEPEX : 'EFI_SECTION_PEI_DEPEX',
> > >
> > >          'GUIDED'    : 'EFI_SECTION_GUID_DEFINED',
> > >
> > > --
> > > 2.25.1
> > >
> > >
> > >
> > > -=-=-=-=-=-=
> > > Groups.io Links: You receive all messages sent to this group.
> > > View/Reply Online (#92976):
> https://edk2.groups.io/g/devel/message/92976
> > > Mute This Topic: https://groups.io/mt/93345713/4905953
> > > Group Owner: devel+owner@edk2.groups.io
> > > Unsubscribe: https://edk2.groups.io/g/devel/unsub
> > > [gaoliming@byosoft.com.cn]
> > > -=-=-=-=-=-=
> > >
> >
> >
> >
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] BaseTools: Support COMPAT16 section generation
  2022-08-30 10:19 [PATCH v2] BaseTools: Support COMPAT16 section generation Konstantin Aladyshev
  2022-08-31  1:41 ` 回复: [edk2-devel] " gaoliming
@ 2022-10-02  2:13 ` Bob Feng
  1 sibling, 0 replies; 5+ messages in thread
From: Bob Feng @ 2022-10-02  2:13 UTC (permalink / raw)
  To: Konstantin Aladyshev, devel@edk2.groups.io; +Cc: Gao, Liming, Chen, Christine

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: Konstantin Aladyshev <aladyshev22@gmail.com> 
Sent: Tuesday, August 30, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Konstantin Aladyshev <aladyshev22@gmail.com>
Subject: [PATCH v2] BaseTools: Support COMPAT16 section generation

Currently COMPAT16 section type is not recognized and GenSec is called without the "-s [SectionType]" argument.
Add COMPAT16 type to the SectionType dictionary to fix the issue.

Now this syntax works correctly:
```
FILE FREEFORM = <GUID>  {
  SECTION COMPAT16 = <FILE>
}
```

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
 BaseTools/Source/Python/GenFds/Section.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py
index 447828c8e5..859db7230a 100644
--- a/BaseTools/Source/Python/GenFds/Section.py
+++ b/BaseTools/Source/Python/GenFds/Section.py
@@ -28,6 +28,7 @@ class Section (SectionClassObject):
         BINARY_FILE_TYPE_PIC       : 'EFI_SECTION_PIC',         BINARY_FILE_TYPE_TE        : 'EFI_SECTION_TE',         'FV_IMAGE'  : 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE',+        'COMPAT16'  : 'EFI_SECTION_COMPATIBILITY16',         BINARY_FILE_TYPE_DXE_DEPEX : 'EFI_SECTION_DXE_DEPEX',         BINARY_FILE_TYPE_PEI_DEPEX : 'EFI_SECTION_PEI_DEPEX',         'GUIDED'    : 'EFI_SECTION_GUID_DEFINED',-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-02  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-30 10:19 [PATCH v2] BaseTools: Support COMPAT16 section generation Konstantin Aladyshev
2022-08-31  1:41 ` 回复: [edk2-devel] " gaoliming
2022-08-31  7:28   ` Konstantin Aladyshev
2022-09-02  8:22     ` 回复: " gaoliming
2022-10-02  2:13 ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox