diff mbox series

[v8,02/12] tools: build mkeficapsule with tools-only_defconfig

Message ID 20211220050253.31163-3-takahiro.akashi@linaro.org
State Superseded
Headers show
Series efi_loader: capsule: improve capsule authentication support | expand

Commit Message

AKASHI Takahiro Dec. 20, 2021, 5:02 a.m. UTC
Add CONFIG_TOOLS_MKEFICAPSULE. Then we want to always build mkeficapsule
if tools-only_defconfig is used.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 configs/tools-only_defconfig | 1 +
 tools/Kconfig                | 8 ++++++++
 tools/Makefile               | 3 +--
 3 files changed, 10 insertions(+), 2 deletions(-)

Comments

Heinrich Schuchardt Jan. 1, 2022, 9:42 p.m. UTC | #1
On 12/20/21 06:02, AKASHI Takahiro wrote:
> Add CONFIG_TOOLS_MKEFICAPSULE. Then we want to always build mkeficapsule
> if tools-only_defconfig is used.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>   configs/tools-only_defconfig | 1 +
>   tools/Kconfig                | 8 ++++++++
>   tools/Makefile               | 3 +--
>   3 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
> index f482c9a1c1b0..5427797dd4c3 100644
> --- a/configs/tools-only_defconfig
> +++ b/configs/tools-only_defconfig
> @@ -31,3 +31,4 @@ CONFIG_I2C_EDID=y
>   # CONFIG_VIRTIO_MMIO is not set
>   # CONFIG_VIRTIO_PCI is not set
>   # CONFIG_VIRTIO_SANDBOX is not set
> +CONFIG_TOOLS_MKEFICAPSULE=y
> diff --git a/tools/Kconfig b/tools/Kconfig
> index 91ce8ae3e516..117c921da3fe 100644
> --- a/tools/Kconfig
> +++ b/tools/Kconfig
> @@ -90,4 +90,12 @@ config TOOLS_SHA512
>   	help
>   	  Enable SHA512 support in the tools builds
>
> +config TOOLS_MKEFICAPSULE
> +	bool "Build efimkcapsule command"
> +	default y if EFI_CAPSULE_ON_DISK

We want to build mkeficapsule for tools-only_defconfig but your patch
fails to do so. This has been discussed before.

Why should we only build mkeficapsule for EFI_CAPSULE_ON_DISK=y and not
for other instances of CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y?

Best regards

Heinrich

> +	help
> +	  This command allows users to create a UEFI capsule file and,
> +	  optionally sign that file. If you want to enable UEFI capsule
> +	  update feature on your target, you certainly need this.
> +
>   endmenu
> diff --git a/tools/Makefile b/tools/Makefile
> index 1763f44cac43..766c0674f4a0 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -238,8 +238,7 @@ hostprogs-$(CONFIG_MIPS) += mips-relocs
>   hostprogs-$(CONFIG_ASN1_COMPILER)	+= asn1_compiler
>   HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
>
> -mkeficapsule-objs	:= mkeficapsule.o $(LIBFDT_OBJS)
> -hostprogs-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += mkeficapsule
> +hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
>
>   # We build some files with extra pedantic flags to try to minimize things
>   # that won't build on some weird host compiler -- though there are lots of
AKASHI Takahiro Jan. 6, 2022, 9:20 a.m. UTC | #2
On Sat, Jan 01, 2022 at 10:42:46PM +0100, Heinrich Schuchardt wrote:
> On 12/20/21 06:02, AKASHI Takahiro wrote:
> > Add CONFIG_TOOLS_MKEFICAPSULE. Then we want to always build mkeficapsule
> > if tools-only_defconfig is used.
> > 
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> >   configs/tools-only_defconfig | 1 +
> >   tools/Kconfig                | 8 ++++++++
> >   tools/Makefile               | 3 +--
> >   3 files changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
> > index f482c9a1c1b0..5427797dd4c3 100644
> > --- a/configs/tools-only_defconfig
> > +++ b/configs/tools-only_defconfig
> > @@ -31,3 +31,4 @@ CONFIG_I2C_EDID=y
> >   # CONFIG_VIRTIO_MMIO is not set
> >   # CONFIG_VIRTIO_PCI is not set
> >   # CONFIG_VIRTIO_SANDBOX is not set
> > +CONFIG_TOOLS_MKEFICAPSULE=y
> > diff --git a/tools/Kconfig b/tools/Kconfig
> > index 91ce8ae3e516..117c921da3fe 100644
> > --- a/tools/Kconfig
> > +++ b/tools/Kconfig
> > @@ -90,4 +90,12 @@ config TOOLS_SHA512
> >   	help
> >   	  Enable SHA512 support in the tools builds
> > 
> > +config TOOLS_MKEFICAPSULE
> > +	bool "Build efimkcapsule command"
> > +	default y if EFI_CAPSULE_ON_DISK
> 
> We want to build mkeficapsule for tools-only_defconfig but your patch
> fails to do so. This has been discussed before.

Yes.
I'm sure that tools-only_defconfig will build mkeficapsule
even though we have "default y if EFI_CAPSULE_ON_DISK"
since we have:
> > +CONFIG_TOOLS_MKEFICAPSULE=y

> Why should we only build mkeficapsule for EFI_CAPSULE_ON_DISK=y and not
> for other instances of CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y?

mkeficapsule deals with capsule files only which are supported
under EFI_CAPSULE_ON_DISK.
Please also note that, under the current implementation,
UpdateCapsule() API is not officially supported.

-Takahiro Akashi


> Best regards
> 
> Heinrich
> 
> > +	help
> > +	  This command allows users to create a UEFI capsule file and,
> > +	  optionally sign that file. If you want to enable UEFI capsule
> > +	  update feature on your target, you certainly need this.
> > +
> >   endmenu
> > diff --git a/tools/Makefile b/tools/Makefile
> > index 1763f44cac43..766c0674f4a0 100644
> > --- a/tools/Makefile
> > +++ b/tools/Makefile
> > @@ -238,8 +238,7 @@ hostprogs-$(CONFIG_MIPS) += mips-relocs
> >   hostprogs-$(CONFIG_ASN1_COMPILER)	+= asn1_compiler
> >   HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
> > 
> > -mkeficapsule-objs	:= mkeficapsule.o $(LIBFDT_OBJS)
> > -hostprogs-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += mkeficapsule
> > +hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
> > 
> >   # We build some files with extra pedantic flags to try to minimize things
> >   # that won't build on some weird host compiler -- though there are lots of
>
Simon Glass Jan. 12, 2022, 8:03 p.m. UTC | #3
On Sun, 19 Dec 2021 at 22:03, AKASHI Takahiro
<takahiro.akashi@linaro.org> wrote:
>
> Add CONFIG_TOOLS_MKEFICAPSULE. Then we want to always build mkeficapsule
> if tools-only_defconfig is used.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>  configs/tools-only_defconfig | 1 +
>  tools/Kconfig                | 8 ++++++++
>  tools/Makefile               | 3 +--
>  3 files changed, 10 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index f482c9a1c1b0..5427797dd4c3 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -31,3 +31,4 @@  CONFIG_I2C_EDID=y
 # CONFIG_VIRTIO_MMIO is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_SANDBOX is not set
+CONFIG_TOOLS_MKEFICAPSULE=y
diff --git a/tools/Kconfig b/tools/Kconfig
index 91ce8ae3e516..117c921da3fe 100644
--- a/tools/Kconfig
+++ b/tools/Kconfig
@@ -90,4 +90,12 @@  config TOOLS_SHA512
 	help
 	  Enable SHA512 support in the tools builds
 
+config TOOLS_MKEFICAPSULE
+	bool "Build efimkcapsule command"
+	default y if EFI_CAPSULE_ON_DISK
+	help
+	  This command allows users to create a UEFI capsule file and,
+	  optionally sign that file. If you want to enable UEFI capsule
+	  update feature on your target, you certainly need this.
+
 endmenu
diff --git a/tools/Makefile b/tools/Makefile
index 1763f44cac43..766c0674f4a0 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -238,8 +238,7 @@  hostprogs-$(CONFIG_MIPS) += mips-relocs
 hostprogs-$(CONFIG_ASN1_COMPILER)	+= asn1_compiler
 HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
 
-mkeficapsule-objs	:= mkeficapsule.o $(LIBFDT_OBJS)
-hostprogs-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += mkeficapsule
+hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
 
 # We build some files with extra pedantic flags to try to minimize things
 # that won't build on some weird host compiler -- though there are lots of