[U-Boot] U-boot Saveenv question --> final tested solution

Suresh Bhaskaran Suresh.Bhaskaran at magnumsemi.com
Tue Oct 7 02:57:21 CEST 2008



-----Original Message-----
From: Jerry Van Baren [mailto:gerald.vanbaren at ge.com] 
Sent: Monday, October 06, 2008 10:07 AM
To: Suresh Bhaskaran
Cc: Andrejs Cainikovs; u-boot at lists.denx.de
Subject: Re: [U-Boot] U-boot Saveenv question

Suresh Bhaskaran wrote:
> 1.  I verified flash contents using the md.w command in u-boot
> 2.  I've already verified correct flash r/w operation using the cp.w
> command
> 3.  Yes, the CONFIG_ENV_OVERWRITE flag is defined in my boardfile
> 4.  Flinfo shows the correct flash configuration (sectors, etc) of the
> flash
> 
> I can see the new env variable (e.g. set serverip 10.0.0.1) at the end
> of the saveenv area in flash (after I do a saveenv).  (the original
> entry is removed from the list in flash, and the new updated entry is
> added to the end of the list in flash).
> 
> Still, when I reboot u-boot, I don't get the new environment variable
> updated from flash.
> 
> What am I missing?
> 
> Thanks.
> Suresh

Please don't top post.

Are you using DHCP (BOOTP)?  If you are, serverip is probably being sent

by your DHCP server and overriding the value you have set in your env.

I'm assuming you are *not* getting env CRC failure warnings on boot.

If neither of the above guesses solve the problem, please copy what is 
printed to the console on start up.  Without more information, we're 
just guessing.

Best regards,
gvb

-------------------------------------------------------------

Thanks for help:

I've got it working:

Final answer:

1.  If *only* CONFIG_ENV_OVERWRITE is turned on in board file, then crc
is not written to flash [don't know if it's bug, or if I am setting
incorrect flags]

2.  But if CFG_ENV_ADDR_REDUND is also set, then it sets CRC to flash,
and it works correctly.

In any case, setup 2. works for me.

Thanks for all the help.

Suresh


More information about the U-Boot mailing list