summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2024-09-11 11:58:22 +0200
committerTom Rini <trini@konsulko.com>2024-09-24 13:41:21 -0600
commit0ebbed66b07cd3acd08a072b225c738c986d35a9 (patch)
treecd318759e2ba8a2e05768334e2b840b0564d1326
parent620c02eee120a9d40307beee94d788df6dbdd1a9 (diff)
net: wget: allow EFI boot
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@linaro.org> Reviewed-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--net/wget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wget.c b/net/wget.c
index 6ebf9bca0d8..c8cce554c5e 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>
@@ -425,6 +426,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;
}
}