U-Boot 'saveenv' command overwriting U-Boot?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

U-Boot 'saveenv' command overwriting U-Boot?

4,468 Views
DonaldR_PooleJr
Contributor I

Hello All,

 

I am running into a problem with u-boot (I'm using u-boot 2011.06).  Every time I issue the 'saveenv' command to write my updated u-boot environment to flash (microSD), u-boot fails to load/start when I reset/power cycle the board.  It's as though the 'saveenv' command is overwriting the u-boot in flash.  I end up having to 'dd' the u-boot image back on the microSD card to get u-boot to start up again (losing my previous u-boot environment of course).  Has anyone else encountered this problem with u-boot?  If so, what do I need to do to resolve this issue?  I'm pulling my hair out trying to find a solution.

 

Donald

Labels (1)
0 Kudos
4 Replies

1,769 Views
DonaldR_PooleJr
Contributor I

Thanks Remi! I think that might resolve my issue.  I will try this and see how things go.

Remi Lorriaux said:

Your U-Boot binary might be too large for some reason. You can change the location where the environment is saved in your configuration file, under u-boot-2009.08/include/configs/mx53_loco.h (assuming you are using the Quick Start Board). The setting is CONFIG_ENV_OFFSET. Make sure you adjust your U-Boot environment and the location where the kernel is to be flashed.

0 Kudos

1,769 Views
rlorriaux
Contributor I

Your U-Boot binary might be too large for some reason. You can change the location where the environment is saved in your configuration file, under u-boot-2009.08/include/configs/mx53_loco.h (assuming you are using the Quick Start Board). The setting is CONFIG_ENV_OFFSET. Make sure you adjust your U-Boot environment and the location where the kernel is to be flashed.

0 Kudos

1,769 Views
DonaldR_PooleJr
Contributor I

I'm not completely certain if u-boot is overwriting itself, but that's my best guess since the bootloader won't startup after I save the environment and power cycle the board.  I'm not sure I where to look to find out where u-boot is saving the environment.  Where would that information be?  But, yes this is my own build of u-boot, version 2011.06.  To make the u-boot iMX image, I followed the direction in the u-boot README doc (README.imximage) found in the 'doc' directory of the u-boot source (http://git.denx.de/u-boot.git/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74239d2ade911b76269b386c...)

0 Kudos

1,769 Views
VladanJovanovic
NXP Employee
NXP Employee

Is it overwriting it? To what location is u-boot trying to save the environment, can you check that?

 

Shouldn't happen with u-boot delivered in binary demo release at least, is this your own build of u-boot?

0 Kudos