* [U-Boot] *** Warning - bad CRC, using default environment
@ 2010-05-18 7:11 anup behare
2010-05-18 7:55 ` Stefan Roese
2010-05-19 15:24 ` Nick Thompson
0 siblings, 2 replies; 9+ messages in thread
From: anup behare @ 2010-05-18 7:11 UTC (permalink / raw)
To: u-boot
Hi,
While using u-boot for ppc440 based board we are getting "*** Warning - bad
CRC, using default environment" message.
On denx site we came to know that message is printed because the flash
sector or ERPROM containing the environment variables has never been
initialized yet.
Is there any fix to remove this warning message without passing the saveenv
command on u-boot prompt?
~Anup
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-18 7:11 [U-Boot] *** Warning - bad CRC, using default environment anup behare
@ 2010-05-18 7:55 ` Stefan Roese
2010-05-18 9:12 ` anup behare
2010-05-19 15:24 ` Nick Thompson
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2010-05-18 7:55 UTC (permalink / raw)
To: u-boot
On Tuesday 18 May 2010 09:11:16 anup behare wrote:
> While using u-boot for ppc440 based board we are getting "*** Warning - bad
> CRC, using default environment" message.
> On denx site we came to know that message is printed because the flash
> sector or ERPROM containing the environment variables has never been
> initialized yet.
> Is there any fix to remove this warning message without passing the
> saveenv command on u-boot prompt?
No, these is no "fix", since this is not a bug but a desired feature.
Why do you want to change this behaviour? Don't you have any environment
storage area at all? Then you should define CONFIG_ENV_IS_NOWHERE in your
board config header.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-18 7:55 ` Stefan Roese
@ 2010-05-18 9:12 ` anup behare
2010-05-18 9:23 ` Stefan Roese
0 siblings, 1 reply; 9+ messages in thread
From: anup behare @ 2010-05-18 9:12 UTC (permalink / raw)
To: u-boot
Stefan,
I don't want to change the behavior and I can't use
CONFIG_ENV_IS_NOWHERE because we may change the environment variable and
save it.
Here my intention was to remove the warning runtime.
~Anup
On Tue, May 18, 2010 at 1:25 PM, Stefan Roese <sr@denx.de> wrote:
> On Tuesday 18 May 2010 09:11:16 anup behare wrote:
> > While using u-boot for ppc440 based board we are getting "*** Warning -
> bad
> > CRC, using default environment" message.
> > On denx site we came to know that message is printed because the flash
> > sector or ERPROM containing the environment variables has never been
> > initialized yet.
> > Is there any fix to remove this warning message without passing the
> > saveenv command on u-boot prompt?
>
> No, these is no "fix", since this is not a bug but a desired feature.
>
> Why do you want to change this behaviour? Don't you have any environment
> storage area at all? Then you should define CONFIG_ENV_IS_NOWHERE in your
> board config header.
>
> Cheers,
> Stefan
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-18 9:12 ` anup behare
@ 2010-05-18 9:23 ` Stefan Roese
2010-05-18 9:28 ` anup behare
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2010-05-18 9:23 UTC (permalink / raw)
To: u-boot
On Tuesday 18 May 2010 11:12:26 anup behare wrote:
> I don't want to change the behavior and I can't use
> CONFIG_ENV_IS_NOWHERE because we may change the environment variable and
> save it.
And this usually happens upon board bring-up and/or factory testing. So in the
"normal" use-case this warning will not be seen.
> Here my intention was to remove the warning runtime.
Why?
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-18 9:23 ` Stefan Roese
@ 2010-05-18 9:28 ` anup behare
0 siblings, 0 replies; 9+ messages in thread
From: anup behare @ 2010-05-18 9:28 UTC (permalink / raw)
To: u-boot
I removing the console warning and this is one of the warning.
On Tue, May 18, 2010 at 2:53 PM, Stefan Roese <sr@denx.de> wrote:
> On Tuesday 18 May 2010 11:12:26 anup behare wrote:
> > I don't want to change the behavior and I can't use
> > CONFIG_ENV_IS_NOWHERE because we may change the environment variable and
> > save it.
>
> And this usually happens upon board bring-up and/or factory testing. So in
> the
> "normal" use-case this warning will not be seen.
>
> > Here my intention was to remove the warning runtime.
>
> Why?
>
> Cheers,
> Stefan
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-18 7:11 [U-Boot] *** Warning - bad CRC, using default environment anup behare
2010-05-18 7:55 ` Stefan Roese
@ 2010-05-19 15:24 ` Nick Thompson
2010-05-20 3:43 ` anup behare
1 sibling, 1 reply; 9+ messages in thread
From: Nick Thompson @ 2010-05-19 15:24 UTC (permalink / raw)
To: u-boot
On 18/05/10 08:11, anup behare wrote:
> Hi,
>
> While using u-boot for ppc440 based board we are getting "*** Warning - bad
> CRC, using default environment" message.
> On denx site we came to know that message is printed because the flash
> sector or ERPROM containing the environment variables has never been
> initialized yet.
That is not quite true. It is one reason, true, but it could also occur
if your data has become corrupted and your CRC no longer matches.
In the latter case you will be glad of the warning because either your
H/W is flaking out or you have accidentally overwritten the env area
while writing to FLASH/EEPROM/Whatever. You need to know when these things
happen and that's what the warning is for.
Just do a saveenv and hope you never see the warning again :)
Nick.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-19 15:24 ` Nick Thompson
@ 2010-05-20 3:43 ` anup behare
2010-05-20 8:33 ` Nick Thompson
0 siblings, 1 reply; 9+ messages in thread
From: anup behare @ 2010-05-20 3:43 UTC (permalink / raw)
To: u-boot
Hi Nick,
I observed that when i used saveenv the warning never occurred, but when i
used to erase the flash and burn the u-boot that warning comes again hence I
will have to use saveenv on u-boot command prompt.
~Anup
On Wed, May 19, 2010 at 8:54 PM, Nick Thompson <nick.thompson@ge.com> wrote:
> On 18/05/10 08:11, anup behare wrote:
> > Hi,
> >
> > While using u-boot for ppc440 based board we are getting "*** Warning -
> bad
> > CRC, using default environment" message.
> > On denx site we came to know that message is printed because the flash
> > sector or ERPROM containing the environment variables has never been
> > initialized yet.
>
> That is not quite true. It is one reason, true, but it could also occur
> if your data has become corrupted and your CRC no longer matches.
>
> In the latter case you will be glad of the warning because either your
> H/W is flaking out or you have accidentally overwritten the env area
> while writing to FLASH/EEPROM/Whatever. You need to know when these things
> happen and that's what the warning is for.
>
> Just do a saveenv and hope you never see the warning again :)
>
> Nick.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-20 3:43 ` anup behare
@ 2010-05-20 8:33 ` Nick Thompson
2010-05-20 13:04 ` Detlev Zundel
0 siblings, 1 reply; 9+ messages in thread
From: Nick Thompson @ 2010-05-20 8:33 UTC (permalink / raw)
To: u-boot
On 20/05/10 04:43, anup behare wrote:
> Hi Nick,
>
>
> I observed that when i used saveenv the warning never occurred, but when i
> used to erase the flash and burn the u-boot that warning comes again hence I
> will have to use saveenv on u-boot command prompt.
>
>
> ~Anup
Yes, indeed! The warning was trying to let you know that your work flow is
wrong. Flash can be eased in sectors. The env should be in a sector(s) on
it's own. There is no need to erase that sector(s) to re-flash U-Boot.
Erase only U-Boot before re-flashing U-Boot. This will keep all you env
data (which is valuable) intact and the warning will not reappear. If it
does reappear you've done /something/ wrong and the warning will catch
that for you again.
It's a good warning, honestly. Hang on to it. Learn to love it.
Nick.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] *** Warning - bad CRC, using default environment
2010-05-20 8:33 ` Nick Thompson
@ 2010-05-20 13:04 ` Detlev Zundel
0 siblings, 0 replies; 9+ messages in thread
From: Detlev Zundel @ 2010-05-20 13:04 UTC (permalink / raw)
To: u-boot
Hi Nick,
> Yes, indeed! The warning was trying to let you know that your work flow is
> wrong. Flash can be eased in sectors. The env should be in a sector(s) on
> it's own. There is no need to erase that sector(s) to re-flash U-Boot.
>
> Erase only U-Boot before re-flashing U-Boot. This will keep all you env
> data (which is valuable) intact and the warning will not reappear. If it
> does reappear you've done /something/ wrong and the warning will catch
> that for you again.
Just for completeness, let me mention that we have configurations where
the environment is embedded into the U-Boot image, so there you have to
erase the env in flash to reprogram U-Boot. Furtunately one usually
updates U-Boot out of a running copy of it, so after the reflash a
"saveenv" solves this specific problem nicely ;)
Cheers
Detlev
--
Narren sind alle, die es scheinen, und die Haelfte derer, die es nicht
scheinen .. Jedoch ist der groesste Narr, wer es nicht zu sein glaubt
und alle andern dafuer erklaert.
--- Baltasar Gracian
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-05-20 13:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-18 7:11 [U-Boot] *** Warning - bad CRC, using default environment anup behare
2010-05-18 7:55 ` Stefan Roese
2010-05-18 9:12 ` anup behare
2010-05-18 9:23 ` Stefan Roese
2010-05-18 9:28 ` anup behare
2010-05-19 15:24 ` Nick Thompson
2010-05-20 3:43 ` anup behare
2010-05-20 8:33 ` Nick Thompson
2010-05-20 13:04 ` Detlev Zundel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox