public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
@ 2010-10-05  5:41 Heiko Schocher
  2010-10-05 10:19 ` Sergei Shtylyov
  2010-10-05 12:17 ` [U-Boot] [PATCH v2] " Heiko Schocher
  0 siblings, 2 replies; 4+ messages in thread
From: Heiko Schocher @ 2010-10-05  5:41 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Heiko 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>
---
 common/cmd_nvedit.c |    6 ++++++
 common/env_common.c |    5 +++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index c3d63b8..16f5fb0 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -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;
diff --git a/common/env_common.c b/common/env_common.c
index a415ef8..88f068c 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);
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
  2010-10-05  5:41 [U-Boot] [PATCH] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined Heiko Schocher
@ 2010-10-05 10:19 ` Sergei Shtylyov
  2010-10-05 12:17 ` [U-Boot] [PATCH v2] " Heiko Schocher
  1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2010-10-05 10:19 UTC (permalink / raw)
  To: u-boot

Hello.

On 05-10-2010 9:41, Heiko Schocher wrote:

> 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

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

[...]

> diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
> index c3d63b8..16f5fb0 100644
> --- a/common/cmd_nvedit.c
> +++ b/common/cmd_nvedit.c
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
  2010-10-05  5:41 [U-Boot] [PATCH] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined Heiko Schocher
  2010-10-05 10:19 ` Sergei Shtylyov
@ 2010-10-05 12:17 ` Heiko Schocher
  2010-10-06 20:35   ` Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Heiko Schocher @ 2010-10-05 12:17 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Heiko 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 at mvista.com
---
- 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(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index c3d63b8..3d30c32 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 a415ef8..88f068c 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);
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined
  2010-10-05 12:17 ` [U-Boot] [PATCH v2] " Heiko Schocher
@ 2010-10-06 20:35   ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-10-06 20:35 UTC (permalink / raw)
  To: u-boot

Dear Heiko Schocher,

In message <1286281020-21895-1-git-send-email-hs@denx.de> you wrote:
> 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
> 
> Signed-off-by: Heiko 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 at mvista.com
> ---
> - 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(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-06 20:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05  5:41 [U-Boot] [PATCH] env: fix cmd_env_sub fct pointers if CONFIG_RELOC_FIXUP_WORKS is not defined Heiko Schocher
2010-10-05 10:19 ` Sergei Shtylyov
2010-10-05 12:17 ` [U-Boot] [PATCH v2] " Heiko Schocher
2010-10-06 20:35   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox