env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
PATCH 1/1 env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
commit ea882baf9c17cd142c99e3ff640d3ab01daa5cec 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
--- common/cmd_nvedit.c | 6 ++++++ common/env_common.c | 5 +++++ 2 files changed, 11 insertions(+), 0 deletions(-)
common/cmd_nvedit.c +6 -0
@@ -837,6 +837,12 @@ 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;
common/env_common.c +5 -0
@@ -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 );
Signature · 1 line
1.7.2.3
PATCH 1/1 env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
Hello.
Quoted 10 lines · Heiko Schocher
commit
ea882baf9c17cd142c99e3ff640d3ab01daa5cecintroduces acommand_sub_tablefor 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 MeyerSigned-off-by Heiko Schocher<[email protected]>
[...]
common/cmd_nvedit.c static cmd_tbl_t cmd_env_sub[] = { · line 841
Quoted 10 lines
common/cmd_nvedit.c +2
-0@@ -837,6 +837,12 @@ 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 ) {
{ should be on a separate line.
WBR, Sergei
PATCH v2 1/1 env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
In reply to Heiko Schochercommit ea882baf9c17cd142c99e3ff640d3ab01daa5cec 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
---
- changes since v1:
fix Coding Style issue, suggested by Sergei Shtylyov
common/cmd_nvedit.c | 7 +++++++ common/env_common.c | 5 +++++ 2 files changed, 12 insertions(+), 0 deletions(-)
common/cmd_nvedit.c +7 -0
@@ -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;
common/env_common.c +5 -0
@@ -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 );
Signature · 1 line
1.7.2.3
Wolfgang Denk
AppliedPATCH v2 1/1 env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
Dear Heiko Schocher,
Quoted 16 lines · In message <[email protected]> you wrote:
commit
ea882baf9c17cd142c99e3ff640d3ab01daa5cecintroduces acommand_sub_tablefor 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 MeyerSigned-off-by Heiko Schocher <[email protected]>cc Wolfgang Denk <[email protected]>cc Shinya Kuribayashi <[email protected]>cc Xiangfu Liu <[email protected]>cc Reinhard Meyer <[email protected]>cc sshtylyov at mvista.com
Quoted 7 lines
---
- changes since v1:
fix Coding Style issue, suggested by Sergei Shtylyovcommon/cmd_nvedit.c | 7 +++++++ common/env_common.c | 5 +++++ 2 files changed, 12 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I dislike companies that have a we-are-the-high-priests-of-hardware- so-you'll-like-what-we-give-you attitude. I like commodity markets in which iron-and-silicon hawkers know that they exist to provide fast toys for software types like me to play with..." - Eric S. Raymond