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

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Dec 11 19:05:13 UTC 2018


On 11/28/18 7:00 AM, AKASHI Takahiro wrote:
> See UEFI specification v2.7a, section 3.3 for details attributes.

I cannot find file cmd/efishell.c in U-Boot. And I cannot find it in
https://patchwork.ozlabs.org/project/uboot/list/?submitter=61166

So I have no clue what this patch is based on.

Best regards

Heinrich

> 
> 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);
> 



More information about the U-Boot mailing list