[U-Boot] [PATCH 3/4] cmd: efishell: make Boot####/BootOrder variable non-volatile

AKASHI Takahiro takahiro.akashi at linaro.org
Wed Nov 28 06:00:58 UTC 2018


See UEFI specification v2.7a, section 3.3 for details attributes.

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 cmd/efishell.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmd/efishell.c b/cmd/efishell.c
index 7cdff757b06c..a594278a04fe 100644
--- a/cmd/efishell.c
+++ b/cmd/efishell.c
@@ -641,6 +641,7 @@ static int do_efi_boot_add(int argc, char * const argv[])
 	}
 
 	ret = efi_set_variable(var_name16, &guid,
+			       EFI_VARIABLE_NON_VOLATILE |
 			       EFI_VARIABLE_BOOTSERVICE_ACCESS |
 			       EFI_VARIABLE_RUNTIME_ACCESS, size, data);
 	ret = (ret == EFI_SUCCESS ? CMD_RET_SUCCESS : CMD_RET_FAILURE);
@@ -676,6 +677,7 @@ static int do_efi_boot_rm(int argc, char * const argv[])
 		utf8_utf16_strncpy((u16 **)&var_name16, var_name, 9);
 
 		ret = efi_set_variable(var_name16, &guid,
+				       EFI_VARIABLE_NON_VOLATILE |
 				       EFI_VARIABLE_BOOTSERVICE_ACCESS |
 				       EFI_VARIABLE_RUNTIME_ACCESS, 0, NULL);
 		if (ret) {
@@ -898,6 +900,7 @@ static int do_efi_boot_order(int argc, char * const argv[])
 
 	guid = efi_global_variable_guid;
 	ret = efi_set_variable(L"BootOrder", &guid,
+			       EFI_VARIABLE_NON_VOLATILE |
 			       EFI_VARIABLE_BOOTSERVICE_ACCESS |
 			       EFI_VARIABLE_RUNTIME_ACCESS, size, bootorder);
 	ret = (ret == EFI_SUCCESS ? CMD_RET_SUCCESS : CMD_RET_FAILURE);
-- 
2.19.1



More information about the U-Boot mailing list