Skip to content
Snippets Groups Projects
Commit 60f7da1f authored by Heiko Schocher's avatar Heiko Schocher Committed by Wolfgang Denk
Browse files

env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined


commit ea882baf introduces
a command_sub_table for the "env" command. On arm, avr32, m68k,
mips and sparc architectures, relocation needs manual fixups,
so add these fixups for this sub command table too.

Tested on arm/qong board.
          mips board (Ben NanoNote) from Xiangfu Liu
          arm/AT91 board from Reinhard Meyer

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>

cc: Wolfgang Denk <wd@denx.de>
cc: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
cc: Xiangfu Liu <xiangfu@openmobilefree.net>
cc: Reinhard Meyer <u-boot@emk-elektronik.de>
cc: sshtylyov@mvista.com
parent a7d54346
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment