Merge tag 'efi-next-2022-09-14' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request for efi next UEFI: Implement a command eficonfig to maintain Load Options and boot order via menus.
This commit is contained in:
@@ -1928,6 +1928,13 @@ config CMD_EFIDEBUG
|
||||
particularly for managing boot parameters as well as examining
|
||||
various EFI status for debugging.
|
||||
|
||||
config CMD_EFICONFIG
|
||||
bool "eficonfig - provide menu-driven uefi variables maintenance interface"
|
||||
depends on CMD_BOOTEFI_BOOTMGR
|
||||
help
|
||||
Enable the 'eficonfig' command which provides the menu-driven UEFI
|
||||
variable maintenance interface.
|
||||
|
||||
config CMD_EXCEPTION
|
||||
bool "exception - raise exception"
|
||||
depends on ARM || RISCV || SANDBOX || X86
|
||||
|
@@ -64,6 +64,7 @@ obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
|
||||
obj-$(CONFIG_CMD_EEPROM) += eeprom.o
|
||||
obj-$(CONFIG_EFI) += efi.o
|
||||
obj-$(CONFIG_CMD_EFIDEBUG) += efidebug.o
|
||||
obj-$(CONFIG_CMD_EFICONFIG) += eficonfig.o
|
||||
obj-$(CONFIG_CMD_ELF) += elf.o
|
||||
obj-$(CONFIG_CMD_EROFS) += erofs.o
|
||||
obj-$(CONFIG_HUSH_PARSER) += exit.o
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <ansi.h>
|
||||
#include <efi_loader.h>
|
||||
#include <efi_config.h>
|
||||
#include <efi_variable.h>
|
||||
#include <env.h>
|
||||
#include <log.h>
|
||||
@@ -220,7 +220,7 @@ static int prepare_bootmenu_entry(struct bootmenu_data *menu,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR))
|
||||
#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
|
||||
/**
|
||||
* prepare_uefi_bootorder_entry() - generate the uefi bootmenu entries
|
||||
*
|
||||
@@ -340,11 +340,21 @@ static struct bootmenu_data *bootmenu_create(int delay)
|
||||
if (ret < 0)
|
||||
goto cleanup;
|
||||
|
||||
#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR))
|
||||
#if (CONFIG_IS_ENABLED(CMD_BOOTEFI_BOOTMGR)) && (CONFIG_IS_ENABLED(CMD_EFICONFIG))
|
||||
if (i < MAX_COUNT - 1) {
|
||||
ret = prepare_uefi_bootorder_entry(menu, &iter, &i);
|
||||
if (ret < 0 && ret != -ENOENT)
|
||||
goto cleanup;
|
||||
efi_status_t efi_ret;
|
||||
|
||||
/*
|
||||
* UEFI specification requires booting from removal media using
|
||||
* a architecture-specific default image name such as BOOTAA64.EFI.
|
||||
*/
|
||||
efi_ret = eficonfig_generate_media_device_boot_option();
|
||||
if (efi_ret != EFI_SUCCESS && efi_ret != EFI_NOT_FOUND)
|
||||
goto cleanup;
|
||||
|
||||
ret = prepare_uefi_bootorder_entry(menu, &iter, &i);
|
||||
if (ret < 0 && ret != -ENOENT)
|
||||
goto cleanup;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
2502
cmd/eficonfig.c
Normal file
2502
cmd/eficonfig.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user