[U-Boot] [PATCH v4 9/9] cmd: env: add "-e" option for handling UEFI variables

Alexander Graf agraf at suse.de
Tue Jan 15 13:26:39 UTC 2019


On 01/15/2019 03:55 AM, AKASHI Takahiro wrote:
> "env [print|set] -e" allows for handling uefi variables without
> knowing details about mapping to corresponding u-boot variables.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> ---
>   cmd/nvedit.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 59 insertions(+), 2 deletions(-)
>
> diff --git a/cmd/nvedit.c b/cmd/nvedit.c
> index ce746bbf1b3e..44f6c3759253 100644
> --- a/cmd/nvedit.c
> +++ b/cmd/nvedit.c
> @@ -27,6 +27,8 @@
>   #include <cli.h>
>   #include <command.h>
>   #include <console.h>
> +#include <efi.h>
> +#include <efi_loader.h>
>   #include <environment.h>
>   #include <search.h>
>   #include <errno.h>
> @@ -119,6 +121,25 @@ static int do_env_print(cmd_tbl_t *cmdtp, int flag, int argc,
>   	int rcode = 0;
>   	int env_flag = H_HIDE_DOT;
>   
> +#if defined(CONFIG_CMD_EFITOOL)

This needs to be available without your EFITOOL (which really is a DEBUG 
command). So this needs to be accessible using only CONFIG_EFI_LOADER I 
think. Maybe we can add a CONFIG_CMD_EFI_SUBCMD or so that these bits 
are guarded by if you think that someone really wants to live without.


Alex



More information about the U-Boot mailing list