diff options
| author | Heinrich Schuchardt <[email protected]> | 2026-04-21 00:03:18 +0200 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-05-01 10:30:03 +0200 |
| commit | 7311130b73a67ece4984cfc2c1fb31b002cf1a48 (patch) | |
| tree | b77d0790166c4acc0f2e01bf64db1b245958343d | |
| parent | c5230a45a7d64357d33ca0fe00080e4a3ea78958 (diff) | |
cmd/bootefi: move efi_init_obj_list() to the start of do_bootefi
None of the bootefi commands can be executed if the EFI sub-system cannot
be initialized.
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
| -rw-r--r-- | cmd/bootefi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 85f41c3b0a0..6dab709e507 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -142,6 +142,14 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 2) return CMD_RET_USAGE; + /* Initialize EFI drivers */ + ret = efi_init_obj_list(); + if (ret != EFI_SUCCESS) { + log_err("Error: Cannot initialize UEFI sub-system, r = %lu\n", + ret & ~EFI_ERROR_MASK); + return CMD_RET_FAILURE; + } + if (argc > 2) { ulong rd_addr = 0; char *end = strchr(argv[2], ':'); @@ -179,14 +187,6 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc, if (IS_ENABLED(CONFIG_CMD_BOOTEFI_SELFTEST) && !strcmp(argv[1], "selftest")) { - /* Initialize EFI drivers */ - ret = efi_init_obj_list(); - if (ret != EFI_SUCCESS) { - log_err("Error: Cannot initialize UEFI sub-system, r = %lu\n", - ret & ~EFI_ERROR_MASK); - return CMD_RET_FAILURE; - } - ret = efi_install_fdt(fdt); if (ret != EFI_SUCCESS) return CMD_RET_FAILURE; |
