public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Xiangfu Liu <xiangfu@openmobilefree.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] MIPS relocation?
Date: Mon, 04 Oct 2010 23:02:38 +0800	[thread overview]
Message-ID: <4CA9EC8E.9080403@openmobilefree.net> (raw)
In-Reply-To: <4CA9E973.7030802@denx.de>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Heiko

by applied this patch. both works fine. 

On 10/04/2010 10:49 PM, Heiko Schocher wrote:
> Hello Xiangfu,
> 
> Xiangfu Liu wrote:
>> Hi Wolfgang Denk
>>
>> since my board (Ben NanoNote) is mips.
>> so I test the those commands in my board.
>>
>> printenv, saveenv: works fine.
>> env print, evn save: make U-Boot hang. (then I must reset the board)
> 
> as I thought ... can you try following patch:
> 
> From 276bcedbd581b11665a5424b274ae30d07245e1f Mon Sep 17 00:00:00 2001
> From: Heiko Schocher <hs@denx.de>
> Date: Mon, 4 Oct 2010 10:28:58 +0200
> Subject: [PATCH] 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 this for this sub command table too.
> 
> Tested on the qong board.
> 
> Signed-off-by: Heiko Schocher <hs@denx.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);


- -- 
Best Regards
Xiangfu Liu
http://www.openmobilefree.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyp7I4ACgkQRRAEFRxkgLR/RACgmpYBqc74PeMT3DkngPy9zuD6
bAMAoISoyBKy4A1B3aTmLdg0hFsLRYMS
=hr/V
-----END PGP SIGNATURE-----

  reply	other threads:[~2010-10-04 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 13:03 [U-Boot] MIPS relocation? Wolfgang Denk
2010-10-04 14:44 ` Xiangfu Liu
2010-10-04 14:49   ` Heiko Schocher
2010-10-04 15:02     ` Xiangfu Liu [this message]
2010-10-04 17:02       ` Wolfgang Denk
2010-10-05  4:03         ` Shinya Kuribayashi
2010-10-04 15:38     ` [U-Boot] ARM (was: MIPS) relocation? Reinhard Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CA9EC8E.9080403@openmobilefree.net \
    --to=xiangfu@openmobilefree.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox