Patchwork [U-Boot] hush saveenv problem

login
register
mail settings
Submitter Alex Zeffertt
Date Feb. 7, 2012, 4:12 p.m.
Message ID <CANNiwJ++r-SN2ertwbYwsmZNzYDE4Z_FqaGPGj0R=1ePg5N-9A@mail.gmail.com>
Download mbox | patch
Permalink /patch/139963/
State Not Applicable
Headers show

Comments

Alex Zeffertt - Feb. 7, 2012, 4:12 p.m.
Hi list,

I've enabled hush on my openrd based board because I need the "test"
command to choose how to boot (see patch below).

When I start u-boot for the first time I get the expected

          "*** Warning - bad CRC, using default environment"

output, and everything works fine.  However, if I run "saveenv" and
then power cycle the board it hangs with no output.
I have checked that "saveenv" does create a default environment at
0x60000 exactly as expected (i.e. it places a 4 byte CRC followed by a
load of ASCII characters.)
I have also checked that no u-boot code between 0x0 and 0x60000 gets altered.

I have no idea why hush + saveenv causes the board to hang at the next
power cycle.  This problem only occurs when the hush shell is
configured.

Thanks in advance for any help,

Alex Zeffertt


----------------------------------------------------------
 #define        CONFIG_SYS_PBSIZE       (CONFIG_SYS_CBSIZE \
Simon Glass - Feb. 7, 2012, 8:50 p.m.
Hi,

On Tue, Feb 7, 2012 at 8:12 AM, Alex Zeffertt
<azeffertt@cambridgesys.com> wrote:
> Hi list,
>
> I've enabled hush on my openrd based board because I need the "test"
> command to choose how to boot (see patch below).
>
> When I start u-boot for the first time I get the expected
>
>          "*** Warning - bad CRC, using default environment"
>
> output, and everything works fine.  However, if I run "saveenv" and
> then power cycle the board it hangs with no output.
> I have checked that "saveenv" does create a default environment at
> 0x60000 exactly as expected (i.e. it places a 4 byte CRC followed by a
> load of ASCII characters.)
> I have also checked that no u-boot code between 0x0 and 0x60000 gets altered.
>
> I have no idea why hush + saveenv causes the board to hang at the next
> power cycle.  This problem only occurs when the hush shell is
> configured.
>
> Thanks in advance for any help,

Just a thought - hush does increase the size of U-Boot. Perhaps you
are going beyond available space?

Regards,
Simon

>
> Alex Zeffertt
>
>
> ----------------------------------------------------------
> diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
> index 3f5fcc6..c859744 100644
> --- a/include/configs/mv-common.h
> +++ b/include/configs/mv-common.h
> @@ -84,6 +84,8 @@
>  #define CONFIG_INITRD_TAG      1       /* enable INITRD tag */
>  #define CONFIG_SETUP_MEMORY_TAGS 1     /* enable memory tag */
>
> +#define CONFIG_SYS_HUSH_PARSER 1               /* use "hush" command
> parser    */
> +#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
>  #define        CONFIG_SYS_PROMPT       "Marvell>> "    /* Command Prompt */
>  #define        CONFIG_SYS_CBSIZE       1024    /* Console I/O Buff Size */
>  #define        CONFIG_SYS_PBSIZE       (CONFIG_SYS_CBSIZE \
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Patch

diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 3f5fcc6..c859744 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -84,6 +84,8 @@ 
 #define CONFIG_INITRD_TAG      1       /* enable INITRD tag */
 #define CONFIG_SETUP_MEMORY_TAGS 1     /* enable memory tag */

+#define CONFIG_SYS_HUSH_PARSER 1               /* use "hush" command
parser    */
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
 #define        CONFIG_SYS_PROMPT       "Marvell>> "    /* Command Prompt */
 #define        CONFIG_SYS_CBSIZE       1024    /* Console I/O Buff Size */