env: solve compilation error in SPL
Solve compilation issue when cli_simple.o is used in SPL and CONFIG_SPL_ENV_SUPPORT is not defined. env/built-in.o:(.data.env_htab+0xc): undefined reference to `env_flags_validate' u-boot/scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed make[2]: *** [spl/u-boot-spl] Error 1 u-boot/Makefile:1649: recipe for target 'spl/u-boot-spl' failed make[1]: *** [spl/u-boot-spl] Error 2 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
c3e828bff2
commit
7d4776545b
5
env/common.c
vendored
5
env/common.c
vendored
@ -23,7 +23,10 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
#include <env_default.h>
|
#include <env_default.h>
|
||||||
|
|
||||||
struct hsearch_data env_htab = {
|
struct hsearch_data env_htab = {
|
||||||
|
#if CONFIG_IS_ENABLED(ENV_SUPPORT)
|
||||||
|
/* defined in flags.c, only compile with ENV_SUPPORT */
|
||||||
.change_ok = env_flags_validate,
|
.change_ok = env_flags_validate,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -225,6 +228,8 @@ void env_relocate(void)
|
|||||||
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
|
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
|
||||||
env_reloc();
|
env_reloc();
|
||||||
env_fix_drivers();
|
env_fix_drivers();
|
||||||
|
|
||||||
|
if (env_htab.change_ok)
|
||||||
env_htab.change_ok += gd->reloc_off;
|
env_htab.change_ok += gd->reloc_off;
|
||||||
#endif
|
#endif
|
||||||
if (gd->env_valid == ENV_INVALID) {
|
if (gd->env_valid == ENV_INVALID) {
|
||||||
|
Loading…
Reference in New Issue
Block a user