public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org,
	masami.hiramatsu@linaro.org, mark.kettenis@xs4all.nl,
	u-boot@lists.denx.de, Tom Rini <trini@konsulko.com>,
	agraf@csgraf.de, sjg@chromium.org
Subject: Re: [PATCH v9 03/11] tools: build mkeficapsule with tools-only_defconfig
Date: Thu, 20 Jan 2022 10:39:03 +0900	[thread overview]
Message-ID: <20220120013903.GA42867@laputa> (raw)
In-Reply-To: <a534363d-a267-b4c9-b032-984017b7996e@gmx.de>

Heinrich,

On Wed, Jan 19, 2022 at 05:08:14PM +0100, Heinrich Schuchardt wrote:
> On 1/18/22 05:39, 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>
> > Reviewed-by: Simon Glass <sjg@chromium.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 discussed this with Tom before. Building of tools should not depend
> on board options. Can we make this 'default y'?

No.
I think we have different opinions here.

I think that any of *board* configs should build only all the binaries
that are need to run U-Boot on that board.
For distros' case that you have mentioned before, we should
encourage them to use tools-only_defconfig for packaging U-Boot
host tools rather than using any particular *board* config.

# In either case, the resulting binary, as far as mkeficapsule is
concerned, is the exact same without any dependency of target configs.

> I wonder if a dependency are missing:
> 
> With CONFIG_FIT=n './mkeficapsule' shows the usage with:
> 
>    -f, --fit <fit image>       new FIT image file
> 
> I guess the tool should select:
> 
> CONFIG_FIT
> CONFIG_FIT_SIGNATURE
> 
> And #ifdef CONFIG_FIT_SIGNATURE should be removed in the code.

I'm not sure what your point is.

I believe that what you and Simon demand in building any host tool
is that the binary be the same whatever target configs are enabled
(or disabled).
So showing "-f, --fit <fit image>       new FIT image file" unconditionally
is a natural consequence.

It doesn't make sense that CONFIG_TOOLS_MKEFICAPSULE selects
any of target configs explicitly.

Furthermore, I don't have "#ifdef CONFIG_FIT_SIGNATURE" in mkeficapsule.c.
# there is some trick around CONFIG_FIT_SIGNATURE in tools/Kconfig, though.

-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
> 

  reply	other threads:[~2022-01-20  1:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18  4:39 [PATCH v9 00/11] efi_loader: capsule: improve capsule authentication support AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 01/11] tools: mkeficapsule: output messages to stderr instead of stdout AKASHI Takahiro
2022-01-19 15:41   ` Heinrich Schuchardt
2022-01-20  5:58     ` AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 02/11] tools: mkeficapsule: rework the code a little bit AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 03/11] tools: build mkeficapsule with tools-only_defconfig AKASHI Takahiro
2022-01-19 16:08   ` Heinrich Schuchardt
2022-01-20  1:39     ` AKASHI Takahiro [this message]
2022-01-20 15:06       ` Tom Rini
2022-01-18  4:39 ` [PATCH v9 04/11] tools: mkeficapsule: add firmware image signing AKASHI Takahiro
2022-01-20 19:09   ` Heinrich Schuchardt
2022-01-18  4:39 ` [PATCH v9 05/11] tools: mkeficapsule: add man page AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 06/11] doc: update UEFI document for usage of mkeficapsule AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 07/11] test/py: efi_capsule: add image authentication test AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 08/11] tools: mkeficapsule: allow for specifying GUID explicitly AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 09/11] test/py: efi_capsule: align with the syntax change of mkeficapsule AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 10/11] test/py: efi_capsule: add a test for "--guid" option AKASHI Takahiro
2022-01-18  4:39 ` [PATCH v9 11/11] test/py: efi_capsule: check the results in case of CAPSULE_AUTHENTICATE AKASHI Takahiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220120013903.GA42867@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=agraf@csgraf.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=masami.hiramatsu@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox