All of lore.kernel.org
 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>,
	trini@konsulko.com, ilias.apalodimas@linaro.org,
	u-boot@lists.denx.de
Subject: Re: [PATCH v3 3/4] net: tftp: remove explicit efi configuration dependency
Date: Wed, 27 Dec 2023 11:38:28 +0900	[thread overview]
Message-ID: <ZYuOJKao6Dij9vvS@octopus> (raw)
In-Reply-To: <CAFLszTi2k3CyfbybPuNCKTFZoVUiZy++Ma0BoUrYTj5dUWFh_w@mail.gmail.com>

Hi Simon,

On Tue, Dec 26, 2023 at 09:47:03AM +0000, Simon Glass wrote:
> Hi Heinrich,
> 
> On Wed, Dec 20, 2023 at 9:17???AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> >
> >
> >
> > Am 20. Dezember 2023 05:46:16 MEZ schrieb Simon Glass <sjg@chromium.org>:
> > >Hi,
> > >
> > >On Mon, 18 Dec 2023 at 17:17, AKASHI Takahiro
> > ><takahiro.akashi@linaro.org> wrote:
> > >>
> > >> 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.
> > >
> > >OK, but we really need to delete this function, so what is the plan
> > >for that? The info that EFI needs should be passed to the bootefi()
> > >function, not set in a global.
> >
> > Hello Simon,
> >
> > Bootstd is not the only way to boot. Please, do not forget the shell.
> >
> > The user loads a file with tftpboot. At some later moment the user executes bootefi.
> >
> > We need a place where we store the device from which the image was loaded.
> 
> Yes, agreed. See my other reply on that.
> 
> >
> > In future we might have a register of loaded files. But that is beyond the scope of this patch series.
> 
> I believe we could just record the device and partition number (which
> is itself a device these days, I suppose). Then for EFI can do the
> translation at the start of the bootm cmd if not using bootstd.

Then, what is the difference between "record the device and partition
number (strictly it's not accurate because we also support tftp and others.)
and "call efi_set_bootdev()"?

The latter does the translation on the fly and saves the info
in bootefi_image_path and bootefi_device_path local variables.

I believe that both are essentially the same.

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

Always thank you for your review.

-Takahiro Akashi

> 
> >
> > Best regards
> >
> > Heinrich
> >
> > >
> > >
> > >>
> > >> -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,
> 
> Regards,
> Simon

  reply	other threads:[~2023-12-27  2:38 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
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 [this message]
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=ZYuOJKao6Dij9vvS@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.