[U-Boot] A command to discard saved environments?

James Chargin jimccrown at gmail.com
Wed Aug 3 16:23:07 CEST 2016


I know my non-volatile copy of the environment is in NOR flash so I use 
the command

protect all off;erase <saved env address> +1

But, of course this is specific to NOR flash.

I'm not aware of a way to do this in the general case, independent of NV 
environment storage media and redundancy.

I'd be supportive of having a way to do this.

Jim

On 08/02/2016 08:31 PM, Masahiro Yamada wrote:
> Hi.
>
>
> I am looking for a command
> that discards the saved environments,
> and takes me back to the
> "*** Warning - bad CRC, using default environment" state.
>
>
> In my case, the environment data is saved
> at sector 0x400 of the MMC device on my board.
>
>
> So, I can just do
>
>  > mmc erase 400 10
>
>
> But, beforehand, I need to know
>
> CONFIG_ENV_IS_IN_MMC
> CONFIG_ENV_OFFSET     0x80000
>
> in order to confirm if the above command is doing the right thing.
> (If I make a mistake in calculating the offset value,
> other data would be damaged.)
>
>
>
> Is there a nice command to do that?
>
>
>

-- 
Jim Chargin
AJA Video Systems                       jimc at aja.com
(530) 271-3334                          http://www.aja.com


More information about the U-Boot mailing list