summaryrefslogtreecommitdiff
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-12 17:44:08 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-13 02:38:00 +0100
commitbb33c79e47e6ae4b538702b8f3d9a8ffc4b637ea (patch)
treed297cb8a04274b50b758dd2c96f7eee663ffb6a6 /cmd/bootefi.c
parent4961ceefbf4e7c572537a752c6d36103520d5f19 (diff)
downloadu-boot-bb33c79e47e6ae4b538702b8f3d9a8ffc4b637ea.tar.gz
u-boot-bb33c79e47e6ae4b538702b8f3d9a8ffc4b637ea.tar.bz2
u-boot-bb33c79e47e6ae4b538702b8f3d9a8ffc4b637ea.zip
efi_loader: simplify running helloworld.efi
Currently when executing 'bootefi hello' we copy helloworld.efi to the address identified by environment variable loadaddr. This is unexected behavior for a user. There is no need to copy helloworld.efi before executing it after relocation. Remove the copy action. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index fdf909f8da..c82a5bacf6 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -403,19 +403,9 @@ static int do_bootefi_image(const char *image_opt)
#ifdef CONFIG_CMD_BOOTEFI_HELLO
if (!strcmp(image_opt, "hello")) {
- char *saddr;
-
- saddr = env_get("loadaddr");
+ image_buf = __efi_helloworld_begin;
size = __efi_helloworld_end - __efi_helloworld_begin;
- if (saddr)
- addr = simple_strtoul(saddr, NULL, 16);
- else
- addr = CONFIG_SYS_LOAD_ADDR;
-
- image_buf = map_sysmem(addr, size);
- memcpy(image_buf, __efi_helloworld_begin, size);
-
efi_free_pool(bootefi_device_path);
efi_free_pool(bootefi_image_path);
bootefi_device_path = NULL;