
From: Simon Glass <sjg@chromium.org> This function is used by the EFI loader but we want to avoid it for the app, since it records global state. We don't intend to support running arbitrary EFI apps outside of a bootstd context, so drop this call for the EFI app. Signed-off-by: Simon Glass <sjg@chromium.org> --- fs/fs_legacy.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/fs_legacy.c b/fs/fs_legacy.c index f91b27fa266..34d763b256a 100644 --- a/fs/fs_legacy.c +++ b/fs/fs_legacy.c @@ -902,9 +902,11 @@ int do_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], return 1; } - efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "", - (argc > 4) ? argv[4] : "", map_sysmem(addr, 0), - len_read); + if (IS_ENABLED(CONFIG_EFI_LOADER)) { + efi_set_bootdev(argv[1], (argc > 2) ? argv[2] : "", + (argc > 4) ? argv[4] : "", map_sysmem(addr, 0), + len_read); + } printf("%llu bytes read in %lu ms", len_read, time); if (time > 0) { -- 2.43.0