[PATCH 09/13] net: wget: allow EFI boot
Simon Glass
sjg at chromium.org
Thu Aug 29 16:04:55 CEST 2024
On Thu, 29 Aug 2024 at 01:34, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> On Wed, 28 Aug 2024 at 15:10, Jerome Forissier
> <jerome.forissier at linaro.org> wrote:
> >
> > wget followed by bootefi currently fails as follows:
> >
> > U-Boot> wget 200000 192.168.0.30:helloworld.efi
> > Waiting for Ethernet connection... done.
> > HTTP/1.0 200 OK
> > Packets received 13, Transfer Successful
> > Bytes transferred = 12720 (31b0 hex)
> > U-Boot> bootefi 200000
> > No UEFI binary known at 200000
> > U-Boot>
> >
> > Fix the problem by adding the missing efi_set_bootdev() call.
> >
> > Signed-off-by: Jerome Forissier <jerome.forissier at linaro.org>
> > ---
> > net/wget.c | 4 ++++
> > 1 file changed, 4 insertions(+)
OMG the hack never dies. I hope I will someday create a series to tidy this up.
Reviewed-by: Simon Glass <sjg at chromium.org>
> >
> > diff --git a/net/wget.c b/net/wget.c
> > index 0e4dc5159d..cf7681a4e7 100644
> > --- a/net/wget.c
> > +++ b/net/wget.c
> > @@ -8,6 +8,7 @@
> > #include <command.h>
> > #include <display_options.h>
> > #include <env.h>
> > +#include <efi_loader.h>
> > #include <image.h>
> > #include <lmb.h>
> > #include <mapmem.h>
> > @@ -429,6 +430,9 @@ static void wget_handler(uchar *pkt, u16 dport,
> > case WGET_TRANSFERRED:
> > printf("Packets received %d, Transfer Successful\n", packets);
> > net_set_state(wget_loop_state);
> > + efi_set_bootdev("Net", "", image_url,
> > + map_sysmem(image_load_addr, 0),
> > + net_boot_file_size);
> > break;
> > }
> > }
> > --
> > 2.40.1
> >
>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list