public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Alex Graf <agraf@csgraf.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Sughosh Ganu <sughosh.ganu@linaro.org>,
	Masami Hiramatsu <masami.hiramatsu@linaro.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v4 04/11] tools: add fdtsig.sh
Date: Mon, 25 Oct 2021 12:06:39 +0900	[thread overview]
Message-ID: <20211025030639.GA44989@laputa> (raw)
In-Reply-To: <CAPnjgZ1JuS59F-tJbRfa7Hs1NyW0e_O_Kv1tWxDwqXCMQ8pUcw@mail.gmail.com>

Simon,

On Thu, Oct 14, 2021 at 06:40:24PM -0600, Simon Glass wrote:
> Hi Takahiro,
> 
> On Mon, 11 Oct 2021 at 19:42, AKASHI Takahiro
> <takahiro.akashi@linaro.org> wrote:
> >
> > Simon,
> >
> > On Mon, Oct 11, 2021 at 08:54:09AM -0600, Simon Glass wrote:
> > > Hi Takahiro,
> > >
> > > On Thu, 7 Oct 2021 at 00:25, AKASHI Takahiro <takahiro.akashi@linaro.org> wrote:
> > > >
> > > > With this script, a public key is added to a device tree blob
> > > > as the default efi_get_public_key_data() expects.
> > > >
> > > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > > > ---
> > > >  MAINTAINERS     |  1 +
> > > >  tools/fdtsig.sh | 40 ++++++++++++++++++++++++++++++++++++++++
> > > >  2 files changed, 41 insertions(+)
> > > >  create mode 100755 tools/fdtsig.sh
> > >
> > > Instead of an ad-hoc script with no tests,
> >
> > Basically I intended to provide fdtsig.sh as a *sample* script so that
> > people may want to integrate the logic into their own build rule/systems.
> > But I could use this script in my 'capsule authentication' test
> > that is also added in patch#22.
> >
> > > could we use binman for
> > > putting the image together and inserting it?
> >
> > First, as you can see, the script is quite simple and secondly,
> > the purpose of binman, IIUC, is to help handle/manipulate U-Boot
> > image binaries.
> > So I'm not sure whether it is really useful to add such a feature to binman.
> 
> I'm not sure. The script seems very ad-hoc to me, for a feature that
> Linaro is pushing so hard.

To be honest, I've never used binman :) So I'm not sure whether binman
is the best place to add this feature. For example, README under tools/binman
says, "It seems better to use the mkimage tool to generate binaries and avoid
blurring the boundaries between building input files (mkimage) and packaging
then into a final image (binman)."
Obviously, dtb is not the final image.

> I don't see where the script is used in the tests or even mentioned in
> the documentation. Am I missing something?

Due to the history of submissions of this series, the current pytest
scenario doesn't use the script, but you can see the exact same
sequence of commands at test/py/tests/test_efi_capsule/conftest.py:
---8<---
        # Update dtb adding capsule certificate
        check_call('cd %s; cp %s/test/py/tests/test_efi_capsule/signature.dts .'
                   % (data_dir, u_boot_config.source_dir), shell=True)
        check_call('cd %s; dtc -@ -I dts -O dtb -o signature.dtbo signature.dts; fdtoverlay -i %s/arch/sandbox/dts/test.dtb -o test_sig.dtb signature.dtbo'
                   % (data_dir, u_boot_config.build_dir), shell=True)
--->8---
(Please see my patch#11.)

What I meant is that we can directly use fdtsig.sh here if your concern
is that the script is *not exercised* anywhere.

-Takahiro Akashi

> Regards,
> Simon

  reply	other threads:[~2021-10-25  3:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07  6:23 [PATCH v4 00/11] efi_loader: capsule: improve capsule authentication support AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 01/11] Revert "Revert "mkeficapsule: Remove dtb related options"" AKASHI Takahiro
2021-10-08 15:38   ` Simon Glass
2021-10-08 19:11     ` Ilias Apalodimas
2021-10-11  0:29       ` AKASHI Takahiro
2021-10-11 14:54         ` Simon Glass
2021-10-12  1:15           ` AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 02/11] Revert "Revert "doc: Update CapsuleUpdate READMEs"" AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 03/11] efi_loader: capsule: add back efi_get_public_key_data() AKASHI Takahiro
2021-10-08 19:25   ` Ilias Apalodimas
2021-10-15  0:40   ` Simon Glass
2021-10-20  8:18     ` Masami Hiramatsu
2021-10-20  9:08       ` François Ozog
2021-10-20 13:39       ` Simon Glass
2021-10-25  5:14         ` AKASHI Takahiro
2021-10-25  6:28           ` François Ozog
2021-10-25  7:04             ` Masami Hiramatsu
2021-10-25  7:14               ` François Ozog
2021-10-25 15:18                 ` Simon Glass
2021-10-07  6:23 ` [PATCH v4 04/11] tools: add fdtsig.sh AKASHI Takahiro
2021-10-11 14:54   ` Simon Glass
2021-10-12  1:42     ` AKASHI Takahiro
2021-10-15  0:40       ` Simon Glass
2021-10-25  3:06         ` AKASHI Takahiro [this message]
2021-10-26  6:00           ` AKASHI Takahiro
2021-10-27 14:05             ` Simon Glass
2021-10-07  6:23 ` [PATCH v4 05/11] tools: mkeficapsule: add firmwware image signing AKASHI Takahiro
2021-10-20  8:17   ` Masami Hiramatsu
2021-10-25  3:12     ` AKASHI Takahiro
2021-10-25  5:40       ` Masami Hiramatsu
2021-10-25  6:09         ` AKASHI Takahiro
2021-10-25  7:04           ` Masami Hiramatsu
2021-10-25  9:58         ` Sughosh Ganu
2021-10-25 12:46           ` Masami Hiramatsu
2021-10-07  6:23 ` [PATCH v4 06/11] tools: mkeficapsule: add man page AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 07/11] doc: update UEFI document for usage of mkeficapsule AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 08/11] tools: mkeficapsule: allow for specifying GUID explicitly AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 09/11] test/py: efi_capsule: align with the syntax change of mkeficapsule AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 10/11] test/py: efi_capsule: add a test for "--guid" option AKASHI Takahiro
2021-10-07  6:23 ` [PATCH v4 11/11] test/py: efi_capsule: add image authentication test 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=20211025030639.GA44989@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=agraf@csgraf.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=masami.hiramatsu@linaro.org \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@linaro.org \
    --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