]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
efi_loader: simplify running helloworld.efi
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 12 Jan 2021 16:44:08 +0000 (17:44 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 1 Jun 2021 11:38:23 +0000 (13:38 +0200)
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>
State: upstream (bb33c79e47e6ae4b538702b8f3d9a8ffc4b637ea)

cmd/bootefi.c

index fdf909f8da2ca332f4a5dfa009afe8b6dbb45dda..c82a5bacf632b8004b62a34097210b066ce9e8af 100644 (file)
@@ -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;