Re: [PATCH v6 7/8] mkeficapsule: Remove raw and FIT GUID types

2022-04-13 Thread AKASHI Takahiro
On Wed, Apr 13, 2022 at 12:00:44PM +0530, Sughosh Ganu wrote:
> On Wed, 13 Apr 2022 at 11:53, AKASHI Takahiro
>  wrote:
> >
> > On Wed, Apr 13, 2022 at 11:44:18AM +0530, Sughosh Ganu wrote:
> > > On Wed, 13 Apr 2022 at 11:35, AKASHI Takahiro
> > >  wrote:
> > > >
> > > > On Tue, Apr 12, 2022 at 06:34:46PM +0530, Sughosh Ganu wrote:
> > > > > While building a capsule, the GUID value of that specific image is to
> > > > > be passed through the --guid command option to the mkeficapsule
> > > > > tool. This renders the EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID and
> > > > > EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID values superfluous. Remove the
> > > >
> > > > superfluous? I don't think it is the reason for removing guids for 
> > > > FIT/RAW.
> > >
> > > The reason for using that word is that these GUID values would not be
> > > used any longer. Do you prefer some other phrasing of the sentence?
> >
> > They are not used not because we have "--guid" option, which I added later
> > than "--fit" or "--raw" in order to handle extra cases, but because you 
> > changed
> > the semantics of FIT/RAW drivers.
> 
> That is what I have mentioned above. With the passing of the GUID
> value through the --guid option, the raw and FIT GUIDs are no longer
> needed.

"--guid" could also be used as an alternative of "--fit" or "--raw"
even without your patch applied.
The point is that you have "changed the semantics".
"This renders" doesn't explain it.

-Takahiro Akashi

> -sughosh
> 
> >
> > -Takahiro Akashi
> >
> > > >
> > > > > --raw and --fit command line options as well.
> > > >
> > > > Please update doc/mkeficapsule.1 as well.
> > >
> > > Will do.
> > >
> > > -sughosh
> > >
> > > >
> > > > -Takahiro Akashi
> > > >
> > > > > Signed-off-by: Sughosh Ganu 
> > > > > Acked-by: Ilias Apalodimas 
> > > > > ---
> > > > >
> > > > > Changes since V5: None
> > > > >
> > > > >  tools/eficapsule.h   |  8 
> > > > >  tools/mkeficapsule.c | 26 +-
> > > > >  2 files changed, 1 insertion(+), 33 deletions(-)
> > > > >
> > > > > diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> > > > > index 69c9c58c2f..d63b831443 100644
> > > > > --- a/tools/eficapsule.h
> > > > > +++ b/tools/eficapsule.h
> > > > > @@ -37,14 +37,6 @@ typedef struct {
> > > > >   EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \
> > > > >0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a)
> > > > >
> > > > > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID \
> > > > > - EFI_GUID(0xae13ff2d, 0x9ad4, 0x4e25, 0x9a, 0xc8, \
> > > > > -  0x6d, 0x80, 0xb3, 0xb2, 0x21, 0x47)
> > > > > -
> > > > > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID \
> > > > > - EFI_GUID(0xe2bb9c06, 0x70e9, 0x4b14, 0x97, 0xa3, \
> > > > > -  0x5a, 0x79, 0x13, 0x17, 0x6e, 0x3f)
> > > > > -
> > > > >  #define EFI_CERT_TYPE_PKCS7_GUID \
> > > > >   EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 0x8a, 0xa9, \
> > > > >0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7)
> > > > > diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
> > > > > index c118335b93..5f74d23b9e 100644
> > > > > --- a/tools/mkeficapsule.c
> > > > > +++ b/tools/mkeficapsule.c
> > > > > @@ -27,17 +27,11 @@
> > > > >  static const char *tool_name = "mkeficapsule";
> > > > >
> > > > >  efi_guid_t efi_guid_fm_capsule = 
> > > > > EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
> > > > > -efi_guid_t efi_guid_image_type_uboot_fit =
> > > > > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
> > > > > -efi_guid_t efi_guid_image_type_uboot_raw =
> > > > > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
> > > > >  efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
> > > > >
> > > > > -static const char *opts_short = "frg:i:I:v:p:c:m:dh";
> > > > > +static const char *opts_short = "g:i:I:v:p:c:m:dh";
> > > > >
> > > > >  static struct option options[] = {
> > > > > - {"fit", no_argument, NULL, 'f'},
> > > > > - {"raw", no_argument, NULL, 'r'},
> > > > >   {"guid", required_argument, NULL, 'g'},
> > > > >   {"index", required_argument, NULL, 'i'},
> > > > >   {"instance", required_argument, NULL, 'I'},
> > > > > @@ -54,8 +48,6 @@ static void print_usage(void)
> > > > >   fprintf(stderr, "Usage: %s [options]   > > > > file>\n"
> > > > >   "Options:\n"
> > > > >
> > > > > - "\t-f, --fit   FIT image type\n"
> > > > > - "\t-r, --raw   raw image type\n"
> > > > >   "\t-g, --guid guid for image blob 
> > > > > type\n"
> > > > >   "\t-i, --index  update image index\n"
> > > > >   "\t-I, --instanceupdate hardware 
> > > > > instance\n"
> > > > > @@ -606,22 +598,6 @@ int main(int argc, char **argv)
> > > > >   break;
> > > > >
> > > > >   switch (c) {
> > > > > - case 'f':
> > > > > - if (guid) {
> > > > > - fprintf(stderr,
> > > > > -

Re: [PATCH v6 7/8] mkeficapsule: Remove raw and FIT GUID types

2022-04-13 Thread Sughosh Ganu
On Wed, 13 Apr 2022 at 11:53, AKASHI Takahiro
 wrote:
>
> On Wed, Apr 13, 2022 at 11:44:18AM +0530, Sughosh Ganu wrote:
> > On Wed, 13 Apr 2022 at 11:35, AKASHI Takahiro
> >  wrote:
> > >
> > > On Tue, Apr 12, 2022 at 06:34:46PM +0530, Sughosh Ganu wrote:
> > > > While building a capsule, the GUID value of that specific image is to
> > > > be passed through the --guid command option to the mkeficapsule
> > > > tool. This renders the EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID and
> > > > EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID values superfluous. Remove the
> > >
> > > superfluous? I don't think it is the reason for removing guids for 
> > > FIT/RAW.
> >
> > The reason for using that word is that these GUID values would not be
> > used any longer. Do you prefer some other phrasing of the sentence?
>
> They are not used not because we have "--guid" option, which I added later
> than "--fit" or "--raw" in order to handle extra cases, but because you 
> changed
> the semantics of FIT/RAW drivers.

That is what I have mentioned above. With the passing of the GUID
value through the --guid option, the raw and FIT GUIDs are no longer
needed.

-sughosh

>
> -Takahiro Akashi
>
> > >
> > > > --raw and --fit command line options as well.
> > >
> > > Please update doc/mkeficapsule.1 as well.
> >
> > Will do.
> >
> > -sughosh
> >
> > >
> > > -Takahiro Akashi
> > >
> > > > Signed-off-by: Sughosh Ganu 
> > > > Acked-by: Ilias Apalodimas 
> > > > ---
> > > >
> > > > Changes since V5: None
> > > >
> > > >  tools/eficapsule.h   |  8 
> > > >  tools/mkeficapsule.c | 26 +-
> > > >  2 files changed, 1 insertion(+), 33 deletions(-)
> > > >
> > > > diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> > > > index 69c9c58c2f..d63b831443 100644
> > > > --- a/tools/eficapsule.h
> > > > +++ b/tools/eficapsule.h
> > > > @@ -37,14 +37,6 @@ typedef struct {
> > > >   EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \
> > > >0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a)
> > > >
> > > > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID \
> > > > - EFI_GUID(0xae13ff2d, 0x9ad4, 0x4e25, 0x9a, 0xc8, \
> > > > -  0x6d, 0x80, 0xb3, 0xb2, 0x21, 0x47)
> > > > -
> > > > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID \
> > > > - EFI_GUID(0xe2bb9c06, 0x70e9, 0x4b14, 0x97, 0xa3, \
> > > > -  0x5a, 0x79, 0x13, 0x17, 0x6e, 0x3f)
> > > > -
> > > >  #define EFI_CERT_TYPE_PKCS7_GUID \
> > > >   EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 0x8a, 0xa9, \
> > > >0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7)
> > > > diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
> > > > index c118335b93..5f74d23b9e 100644
> > > > --- a/tools/mkeficapsule.c
> > > > +++ b/tools/mkeficapsule.c
> > > > @@ -27,17 +27,11 @@
> > > >  static const char *tool_name = "mkeficapsule";
> > > >
> > > >  efi_guid_t efi_guid_fm_capsule = 
> > > > EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
> > > > -efi_guid_t efi_guid_image_type_uboot_fit =
> > > > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
> > > > -efi_guid_t efi_guid_image_type_uboot_raw =
> > > > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
> > > >  efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
> > > >
> > > > -static const char *opts_short = "frg:i:I:v:p:c:m:dh";
> > > > +static const char *opts_short = "g:i:I:v:p:c:m:dh";
> > > >
> > > >  static struct option options[] = {
> > > > - {"fit", no_argument, NULL, 'f'},
> > > > - {"raw", no_argument, NULL, 'r'},
> > > >   {"guid", required_argument, NULL, 'g'},
> > > >   {"index", required_argument, NULL, 'i'},
> > > >   {"instance", required_argument, NULL, 'I'},
> > > > @@ -54,8 +48,6 @@ static void print_usage(void)
> > > >   fprintf(stderr, "Usage: %s [options]  \n"
> > > >   "Options:\n"
> > > >
> > > > - "\t-f, --fit   FIT image type\n"
> > > > - "\t-r, --raw   raw image type\n"
> > > >   "\t-g, --guid guid for image blob type\n"
> > > >   "\t-i, --index  update image index\n"
> > > >   "\t-I, --instanceupdate hardware instance\n"
> > > > @@ -606,22 +598,6 @@ int main(int argc, char **argv)
> > > >   break;
> > > >
> > > >   switch (c) {
> > > > - case 'f':
> > > > - if (guid) {
> > > > - fprintf(stderr,
> > > > - "Image type already specified\n");
> > > > - exit(EXIT_FAILURE);
> > > > - }
> > > > - guid = _guid_image_type_uboot_fit;
> > > > - break;
> > > > - case 'r':
> > > > - if (guid) {
> > > > - fprintf(stderr,
> > > > - "Image type already specified\n");
> > > > - exit(EXIT_FAILURE);
> > > 

Re: [PATCH v6 7/8] mkeficapsule: Remove raw and FIT GUID types

2022-04-13 Thread AKASHI Takahiro
On Wed, Apr 13, 2022 at 11:44:18AM +0530, Sughosh Ganu wrote:
> On Wed, 13 Apr 2022 at 11:35, AKASHI Takahiro
>  wrote:
> >
> > On Tue, Apr 12, 2022 at 06:34:46PM +0530, Sughosh Ganu wrote:
> > > While building a capsule, the GUID value of that specific image is to
> > > be passed through the --guid command option to the mkeficapsule
> > > tool. This renders the EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID and
> > > EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID values superfluous. Remove the
> >
> > superfluous? I don't think it is the reason for removing guids for FIT/RAW.
> 
> The reason for using that word is that these GUID values would not be
> used any longer. Do you prefer some other phrasing of the sentence?

They are not used not because we have "--guid" option, which I added later
than "--fit" or "--raw" in order to handle extra cases, but because you changed
the semantics of FIT/RAW drivers.

-Takahiro Akashi

> >
> > > --raw and --fit command line options as well.
> >
> > Please update doc/mkeficapsule.1 as well.
> 
> Will do.
> 
> -sughosh
> 
> >
> > -Takahiro Akashi
> >
> > > Signed-off-by: Sughosh Ganu 
> > > Acked-by: Ilias Apalodimas 
> > > ---
> > >
> > > Changes since V5: None
> > >
> > >  tools/eficapsule.h   |  8 
> > >  tools/mkeficapsule.c | 26 +-
> > >  2 files changed, 1 insertion(+), 33 deletions(-)
> > >
> > > diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> > > index 69c9c58c2f..d63b831443 100644
> > > --- a/tools/eficapsule.h
> > > +++ b/tools/eficapsule.h
> > > @@ -37,14 +37,6 @@ typedef struct {
> > >   EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \
> > >0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a)
> > >
> > > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID \
> > > - EFI_GUID(0xae13ff2d, 0x9ad4, 0x4e25, 0x9a, 0xc8, \
> > > -  0x6d, 0x80, 0xb3, 0xb2, 0x21, 0x47)
> > > -
> > > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID \
> > > - EFI_GUID(0xe2bb9c06, 0x70e9, 0x4b14, 0x97, 0xa3, \
> > > -  0x5a, 0x79, 0x13, 0x17, 0x6e, 0x3f)
> > > -
> > >  #define EFI_CERT_TYPE_PKCS7_GUID \
> > >   EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 0x8a, 0xa9, \
> > >0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7)
> > > diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
> > > index c118335b93..5f74d23b9e 100644
> > > --- a/tools/mkeficapsule.c
> > > +++ b/tools/mkeficapsule.c
> > > @@ -27,17 +27,11 @@
> > >  static const char *tool_name = "mkeficapsule";
> > >
> > >  efi_guid_t efi_guid_fm_capsule = EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
> > > -efi_guid_t efi_guid_image_type_uboot_fit =
> > > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
> > > -efi_guid_t efi_guid_image_type_uboot_raw =
> > > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
> > >  efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
> > >
> > > -static const char *opts_short = "frg:i:I:v:p:c:m:dh";
> > > +static const char *opts_short = "g:i:I:v:p:c:m:dh";
> > >
> > >  static struct option options[] = {
> > > - {"fit", no_argument, NULL, 'f'},
> > > - {"raw", no_argument, NULL, 'r'},
> > >   {"guid", required_argument, NULL, 'g'},
> > >   {"index", required_argument, NULL, 'i'},
> > >   {"instance", required_argument, NULL, 'I'},
> > > @@ -54,8 +48,6 @@ static void print_usage(void)
> > >   fprintf(stderr, "Usage: %s [options]  \n"
> > >   "Options:\n"
> > >
> > > - "\t-f, --fit   FIT image type\n"
> > > - "\t-r, --raw   raw image type\n"
> > >   "\t-g, --guid guid for image blob type\n"
> > >   "\t-i, --index  update image index\n"
> > >   "\t-I, --instanceupdate hardware instance\n"
> > > @@ -606,22 +598,6 @@ int main(int argc, char **argv)
> > >   break;
> > >
> > >   switch (c) {
> > > - case 'f':
> > > - if (guid) {
> > > - fprintf(stderr,
> > > - "Image type already specified\n");
> > > - exit(EXIT_FAILURE);
> > > - }
> > > - guid = _guid_image_type_uboot_fit;
> > > - break;
> > > - case 'r':
> > > - if (guid) {
> > > - fprintf(stderr,
> > > - "Image type already specified\n");
> > > - exit(EXIT_FAILURE);
> > > - }
> > > - guid = _guid_image_type_uboot_raw;
> > > - break;
> > >   case 'g':
> > >   if (guid) {
> > >   fprintf(stderr,
> > > --
> > > 2.25.1
> > >


Re: [PATCH v6 7/8] mkeficapsule: Remove raw and FIT GUID types

2022-04-13 Thread Sughosh Ganu
On Wed, 13 Apr 2022 at 11:35, AKASHI Takahiro
 wrote:
>
> On Tue, Apr 12, 2022 at 06:34:46PM +0530, Sughosh Ganu wrote:
> > While building a capsule, the GUID value of that specific image is to
> > be passed through the --guid command option to the mkeficapsule
> > tool. This renders the EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID and
> > EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID values superfluous. Remove the
>
> superfluous? I don't think it is the reason for removing guids for FIT/RAW.

The reason for using that word is that these GUID values would not be
used any longer. Do you prefer some other phrasing of the sentence?

>
> > --raw and --fit command line options as well.
>
> Please update doc/mkeficapsule.1 as well.

Will do.

-sughosh

>
> -Takahiro Akashi
>
> > Signed-off-by: Sughosh Ganu 
> > Acked-by: Ilias Apalodimas 
> > ---
> >
> > Changes since V5: None
> >
> >  tools/eficapsule.h   |  8 
> >  tools/mkeficapsule.c | 26 +-
> >  2 files changed, 1 insertion(+), 33 deletions(-)
> >
> > diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> > index 69c9c58c2f..d63b831443 100644
> > --- a/tools/eficapsule.h
> > +++ b/tools/eficapsule.h
> > @@ -37,14 +37,6 @@ typedef struct {
> >   EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \
> >0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a)
> >
> > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID \
> > - EFI_GUID(0xae13ff2d, 0x9ad4, 0x4e25, 0x9a, 0xc8, \
> > -  0x6d, 0x80, 0xb3, 0xb2, 0x21, 0x47)
> > -
> > -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID \
> > - EFI_GUID(0xe2bb9c06, 0x70e9, 0x4b14, 0x97, 0xa3, \
> > -  0x5a, 0x79, 0x13, 0x17, 0x6e, 0x3f)
> > -
> >  #define EFI_CERT_TYPE_PKCS7_GUID \
> >   EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 0x8a, 0xa9, \
> >0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7)
> > diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
> > index c118335b93..5f74d23b9e 100644
> > --- a/tools/mkeficapsule.c
> > +++ b/tools/mkeficapsule.c
> > @@ -27,17 +27,11 @@
> >  static const char *tool_name = "mkeficapsule";
> >
> >  efi_guid_t efi_guid_fm_capsule = EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
> > -efi_guid_t efi_guid_image_type_uboot_fit =
> > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
> > -efi_guid_t efi_guid_image_type_uboot_raw =
> > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
> >  efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
> >
> > -static const char *opts_short = "frg:i:I:v:p:c:m:dh";
> > +static const char *opts_short = "g:i:I:v:p:c:m:dh";
> >
> >  static struct option options[] = {
> > - {"fit", no_argument, NULL, 'f'},
> > - {"raw", no_argument, NULL, 'r'},
> >   {"guid", required_argument, NULL, 'g'},
> >   {"index", required_argument, NULL, 'i'},
> >   {"instance", required_argument, NULL, 'I'},
> > @@ -54,8 +48,6 @@ static void print_usage(void)
> >   fprintf(stderr, "Usage: %s [options]  \n"
> >   "Options:\n"
> >
> > - "\t-f, --fit   FIT image type\n"
> > - "\t-r, --raw   raw image type\n"
> >   "\t-g, --guid guid for image blob type\n"
> >   "\t-i, --index  update image index\n"
> >   "\t-I, --instanceupdate hardware instance\n"
> > @@ -606,22 +598,6 @@ int main(int argc, char **argv)
> >   break;
> >
> >   switch (c) {
> > - case 'f':
> > - if (guid) {
> > - fprintf(stderr,
> > - "Image type already specified\n");
> > - exit(EXIT_FAILURE);
> > - }
> > - guid = _guid_image_type_uboot_fit;
> > - break;
> > - case 'r':
> > - if (guid) {
> > - fprintf(stderr,
> > - "Image type already specified\n");
> > - exit(EXIT_FAILURE);
> > - }
> > - guid = _guid_image_type_uboot_raw;
> > - break;
> >   case 'g':
> >   if (guid) {
> >   fprintf(stderr,
> > --
> > 2.25.1
> >


Re: [PATCH v6 7/8] mkeficapsule: Remove raw and FIT GUID types

2022-04-13 Thread AKASHI Takahiro
On Tue, Apr 12, 2022 at 06:34:46PM +0530, Sughosh Ganu wrote:
> While building a capsule, the GUID value of that specific image is to
> be passed through the --guid command option to the mkeficapsule
> tool. This renders the EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID and
> EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID values superfluous. Remove the

superfluous? I don't think it is the reason for removing guids for FIT/RAW.

> --raw and --fit command line options as well.

Please update doc/mkeficapsule.1 as well.

-Takahiro Akashi

> Signed-off-by: Sughosh Ganu 
> Acked-by: Ilias Apalodimas 
> ---
> 
> Changes since V5: None
> 
>  tools/eficapsule.h   |  8 
>  tools/mkeficapsule.c | 26 +-
>  2 files changed, 1 insertion(+), 33 deletions(-)
> 
> diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> index 69c9c58c2f..d63b831443 100644
> --- a/tools/eficapsule.h
> +++ b/tools/eficapsule.h
> @@ -37,14 +37,6 @@ typedef struct {
>   EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \
>0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a)
>  
> -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID \
> - EFI_GUID(0xae13ff2d, 0x9ad4, 0x4e25, 0x9a, 0xc8, \
> -  0x6d, 0x80, 0xb3, 0xb2, 0x21, 0x47)
> -
> -#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID \
> - EFI_GUID(0xe2bb9c06, 0x70e9, 0x4b14, 0x97, 0xa3, \
> -  0x5a, 0x79, 0x13, 0x17, 0x6e, 0x3f)
> -
>  #define EFI_CERT_TYPE_PKCS7_GUID \
>   EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 0x8a, 0xa9, \
>0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7)
> diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
> index c118335b93..5f74d23b9e 100644
> --- a/tools/mkeficapsule.c
> +++ b/tools/mkeficapsule.c
> @@ -27,17 +27,11 @@
>  static const char *tool_name = "mkeficapsule";
>  
>  efi_guid_t efi_guid_fm_capsule = EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
> -efi_guid_t efi_guid_image_type_uboot_fit =
> - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
> -efi_guid_t efi_guid_image_type_uboot_raw =
> - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
>  efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
>  
> -static const char *opts_short = "frg:i:I:v:p:c:m:dh";
> +static const char *opts_short = "g:i:I:v:p:c:m:dh";
>  
>  static struct option options[] = {
> - {"fit", no_argument, NULL, 'f'},
> - {"raw", no_argument, NULL, 'r'},
>   {"guid", required_argument, NULL, 'g'},
>   {"index", required_argument, NULL, 'i'},
>   {"instance", required_argument, NULL, 'I'},
> @@ -54,8 +48,6 @@ static void print_usage(void)
>   fprintf(stderr, "Usage: %s [options]  \n"
>   "Options:\n"
>  
> - "\t-f, --fit   FIT image type\n"
> - "\t-r, --raw   raw image type\n"
>   "\t-g, --guid guid for image blob type\n"
>   "\t-i, --index  update image index\n"
>   "\t-I, --instanceupdate hardware instance\n"
> @@ -606,22 +598,6 @@ int main(int argc, char **argv)
>   break;
>  
>   switch (c) {
> - case 'f':
> - if (guid) {
> - fprintf(stderr,
> - "Image type already specified\n");
> - exit(EXIT_FAILURE);
> - }
> - guid = _guid_image_type_uboot_fit;
> - break;
> - case 'r':
> - if (guid) {
> - fprintf(stderr,
> - "Image type already specified\n");
> - exit(EXIT_FAILURE);
> - }
> - guid = _guid_image_type_uboot_raw;
> - break;
>   case 'g':
>   if (guid) {
>   fprintf(stderr,
> -- 
> 2.25.1
> 


[PATCH v6 7/8] mkeficapsule: Remove raw and FIT GUID types

2022-04-12 Thread Sughosh Ganu
While building a capsule, the GUID value of that specific image is to
be passed through the --guid command option to the mkeficapsule
tool. This renders the EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID and
EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID values superfluous. Remove the
--raw and --fit command line options as well.

Signed-off-by: Sughosh Ganu 
Acked-by: Ilias Apalodimas 
---

Changes since V5: None

 tools/eficapsule.h   |  8 
 tools/mkeficapsule.c | 26 +-
 2 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/tools/eficapsule.h b/tools/eficapsule.h
index 69c9c58c2f..d63b831443 100644
--- a/tools/eficapsule.h
+++ b/tools/eficapsule.h
@@ -37,14 +37,6 @@ typedef struct {
EFI_GUID(0x6dcbd5ed, 0xe82d, 0x4c44, 0xbd, 0xa1, \
 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a)
 
-#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID \
-   EFI_GUID(0xae13ff2d, 0x9ad4, 0x4e25, 0x9a, 0xc8, \
-0x6d, 0x80, 0xb3, 0xb2, 0x21, 0x47)
-
-#define EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID \
-   EFI_GUID(0xe2bb9c06, 0x70e9, 0x4b14, 0x97, 0xa3, \
-0x5a, 0x79, 0x13, 0x17, 0x6e, 0x3f)
-
 #define EFI_CERT_TYPE_PKCS7_GUID \
EFI_GUID(0x4aafd29d, 0x68df, 0x49ee, 0x8a, 0xa9, \
 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7)
diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
index c118335b93..5f74d23b9e 100644
--- a/tools/mkeficapsule.c
+++ b/tools/mkeficapsule.c
@@ -27,17 +27,11 @@
 static const char *tool_name = "mkeficapsule";
 
 efi_guid_t efi_guid_fm_capsule = EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID;
-efi_guid_t efi_guid_image_type_uboot_fit =
-   EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID;
-efi_guid_t efi_guid_image_type_uboot_raw =
-   EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID;
 efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
 
-static const char *opts_short = "frg:i:I:v:p:c:m:dh";
+static const char *opts_short = "g:i:I:v:p:c:m:dh";
 
 static struct option options[] = {
-   {"fit", no_argument, NULL, 'f'},
-   {"raw", no_argument, NULL, 'r'},
{"guid", required_argument, NULL, 'g'},
{"index", required_argument, NULL, 'i'},
{"instance", required_argument, NULL, 'I'},
@@ -54,8 +48,6 @@ static void print_usage(void)
fprintf(stderr, "Usage: %s [options]  \n"
"Options:\n"
 
-   "\t-f, --fit   FIT image type\n"
-   "\t-r, --raw   raw image type\n"
"\t-g, --guid guid for image blob type\n"
"\t-i, --index  update image index\n"
"\t-I, --instanceupdate hardware instance\n"
@@ -606,22 +598,6 @@ int main(int argc, char **argv)
break;
 
switch (c) {
-   case 'f':
-   if (guid) {
-   fprintf(stderr,
-   "Image type already specified\n");
-   exit(EXIT_FAILURE);
-   }
-   guid = _guid_image_type_uboot_fit;
-   break;
-   case 'r':
-   if (guid) {
-   fprintf(stderr,
-   "Image type already specified\n");
-   exit(EXIT_FAILURE);
-   }
-   guid = _guid_image_type_uboot_raw;
-   break;
case 'g':
if (guid) {
fprintf(stderr,
-- 
2.25.1