]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd/load: support uploading EFI binary via UART
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 19 Mar 2021 02:50:57 +0000 (02:50 +0000)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 19 Mar 2021 19:54:55 +0000 (20:54 +0100)
When uploading an EFI binary via the UART we have to call
efi_set_bootdev() or we won't be able to execute it.

Put the includes into alphabetic order.

Fixes: 5f59518a7b1a ("efi_loader: setting boot device")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/load.c

index 5bbc39baeadd585185fc90ed6606b6f19a3f477f..b7894d7db02a73bbbbf7b7719f626e44cc9f8e20 100644 (file)
 #include <command.h>
 #include <console.h>
 #include <cpu_func.h>
+#include <efi_loader.h>
 #include <env.h>
+#include <exports.h>
 #include <flash.h>
 #include <image.h>
-#include <s_record.h>
+#include <mapmem.h>
 #include <net.h>
-#include <exports.h>
+#include <s_record.h>
 #include <serial.h>
 #include <xyzModem.h>
 #include <asm/cache.h>
@@ -996,6 +998,10 @@ static ulong load_serial_ymodem(ulong offset, int mode)
                        }
 
                }
+               if (IS_ENABLED(CONFIG_CMD_BOOTEFI))
+                       efi_set_bootdev("Uart", "", "",
+                                       map_sysmem(offset, 0), size);
+
        } else {
                printf("%s\n", xyzModem_error(err));
        }