diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index c3d63b8a4329b11ad113b985772809a9c1b437b9..3d30c321d5bae2a845fa2d00ab3db3ed8d4d3a4c 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -837,6 +837,13 @@ static cmd_tbl_t cmd_env_sub[] = { U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 0, do_env_set, "", ""), }; +#if !defined(CONFIG_RELOC_FIXUP_WORKS) +void env_reloc(void) +{ + fixup_cmdtable(cmd_env_sub, ARRAY_SIZE(cmd_env_sub)); +} +#endif + static int do_env (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *cp; diff --git a/common/env_common.c b/common/env_common.c index a415ef8efe5d9ba19e2eff4b5c1a990cae08f3fb..88f068cc38b8e9785569d87c328ae70034a4d395 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -227,6 +227,11 @@ int env_import(const char *buf, int check) void env_relocate (void) { +#if !defined(CONFIG_RELOC_FIXUP_WORKS) + extern void env_reloc(void); + + env_reloc(); +#endif if (gd->env_valid == 0) { #if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */ set_default_env(NULL);