env: add board env set api
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ib8f2b18349cf4f99b182dbdb409c6a2f7820a028
This commit is contained in:
parent
c6f0e81965
commit
14569d2673
|
@ -107,6 +107,22 @@ int set_default_vars(int nvars, char * const vars[])
|
||||||
H_NOCLEAR | H_INTERACTIVE, 0, nvars, vars);
|
H_NOCLEAR | H_INTERACTIVE, 0, nvars, vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int set_board_env(const char *vars, int size, int flags, bool ready)
|
||||||
|
{
|
||||||
|
if (himport_r(&env_htab, (char *)vars, size, '\0',
|
||||||
|
flags, 0, 0, NULL) == 0) {
|
||||||
|
pr_err("Environment import failed\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ready) {
|
||||||
|
gd->flags |= GD_FLG_ENV_READY;
|
||||||
|
gd->flags |= GD_FLG_ENV_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENV_AES
|
#ifdef CONFIG_ENV_AES
|
||||||
#include <uboot_aes.h>
|
#include <uboot_aes.h>
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -289,6 +289,9 @@ char *env_get_default(const char *name);
|
||||||
/* [re]set to the default environment */
|
/* [re]set to the default environment */
|
||||||
void set_default_env(const char *s);
|
void set_default_env(const char *s);
|
||||||
|
|
||||||
|
/* [re]set to the board environment */
|
||||||
|
int set_board_env(const char *vars, int size, int flags, bool ready);
|
||||||
|
|
||||||
/* [re]set individual variables to their value in the default environment */
|
/* [re]set individual variables to their value in the default environment */
|
||||||
int set_default_vars(int nvars, char * const vars[]);
|
int set_default_vars(int nvars, char * const vars[]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue