U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: trini@konsulko.com, xypron.glpk@gmx.de,
	ilias.apalodimas@linaro.org, u-boot@lists.denx.de
Subject: Re: [PATCH v3 3/4] net: tftp: remove explicit efi configuration dependency
Date: Tue, 19 Dec 2023 09:17:14 +0900	[thread overview]
Message-ID: <ZYDhClYupQxNJ++a@octopus> (raw)
In-Reply-To: <CAPnjgZ0qw7j3TCMN+xH6ONaWvUyRvkWpsZJd2PQWHYBhZkTD6g@mail.gmail.com>

Hi Simon,

On Mon, Dec 18, 2023 at 08:01:46AM -0700, Simon Glass wrote:
> Hi AKASHI,
> 
> On Sun, 17 Dec 2023 at 19:39, AKASHI Takahiro
> <takahiro.akashi@linaro.org> wrote:
> >
> > Now it is clear that the feature actually depends on efi interfaces,
> > not "bootefi" command. efi_set_bootdev() will automatically be nullified
> > if necessary efi component is disabled.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> >  net/tftp.c | 10 ++++------
> >  1 file changed, 4 insertions(+), 6 deletions(-)
> >
> 
> I have the same comment here as the 'fs' patch.
> 
> > diff --git a/net/tftp.c b/net/tftp.c
> > index 88e71e67de35..2e335413492b 100644
> > --- a/net/tftp.c
> > +++ b/net/tftp.c
> > @@ -302,12 +302,10 @@ static void tftp_complete(void)
> >                         time_start * 1000, "/s");
> >         }
> >         puts("\ndone\n");
> > -       if (IS_ENABLED(CONFIG_CMD_BOOTEFI)) {
> 
> Shouldn't this depend on your new CONFIG? What happens if EFI_LOADER
> is not enabled?

The trick is in efi_loader.h.
If EFI_LOADER (more specifically CONFIG_EFI_BINARY_EXEC) is not defined,
this function gets voided.  See patch#1 in this version.

I took this approach in order not to make users much worried about
what config be used as they are not familiar with UEFI implementation.

-Takahiro Akashi

> > -               if (!tftp_put_active)
> > -                       efi_set_bootdev("Net", "", tftp_filename,
> > -                                       map_sysmem(tftp_load_addr, 0),
> > -                                       net_boot_file_size);
> > -       }
> > +       if (!tftp_put_active)
> > +               efi_set_bootdev("Net", "", tftp_filename,
> > +                               map_sysmem(tftp_load_addr, 0),
> > +                               net_boot_file_size);
> >         net_set_state(NETLOOP_SUCCESS);
> >  }
> >
> > --
> > 2.34.1
> >
> 
> Regards,
> Simon

  reply	other threads:[~2023-12-19  0:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18  2:38 [PATCH v3 0/4] cmd: bootefi: refactor the code for bootmgr AKASHI Takahiro
2023-12-18  2:38 ` [PATCH v3 1/4] efi_loader: split unrelated code from efi_bootmgr.c AKASHI Takahiro
2023-12-18 15:01   ` Simon Glass
2023-12-19  0:39     ` AKASHI Takahiro
2023-12-25  9:17   ` Heinrich Schuchardt
2023-12-27  1:23     ` AKASHI Takahiro
2023-12-18  2:38 ` [PATCH v3 2/4] efi_loader: rename BOOTEFI_BOOTMGR to EFI_BOOTMGR AKASHI Takahiro
2023-12-18 15:01   ` Simon Glass
2023-12-18  2:38 ` [PATCH v3 3/4] net: tftp: remove explicit efi configuration dependency AKASHI Takahiro
2023-12-18 13:53   ` Ramon Fried
2023-12-18 15:01   ` Simon Glass
2023-12-19  0:17     ` AKASHI Takahiro [this message]
2023-12-20  4:46       ` Simon Glass
2023-12-20  9:17         ` Heinrich Schuchardt
2023-12-26  9:47           ` Simon Glass
2023-12-27  2:38             ` AKASHI Takahiro
2023-12-25  9:23   ` Heinrich Schuchardt
2023-12-25 12:28     ` Tom Rini
2023-12-18  2:38 ` [PATCH v3 4/4] fs: " AKASHI Takahiro
2023-12-18 15:01   ` Simon Glass
2023-12-18 22:15     ` Heinrich Schuchardt
2023-12-20  4:46       ` Simon Glass
2023-12-20  9:07         ` Heinrich Schuchardt
2023-12-20 13:25         ` Tom Rini
2023-12-26  9:46           ` Simon Glass
2023-12-26 14:32             ` Tom Rini
2023-12-18 15:01 ` [PATCH v3 0/4] cmd: bootefi: refactor the code for bootmgr Simon Glass

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=ZYDhClYupQxNJ++a@octopus \
    --to=takahiro.akashi@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=sjg@chromium.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