From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Lawnick Date: Mon, 23 Feb 2009 13:24:44 +0100 Subject: [U-Boot] saveenv command erases flash u-boot In-Reply-To: <22159964.post@talk.nabble.com> References: <22156928.post@talk.nabble.com> <22159964.post@talk.nabble.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de rudresh said the following: [quoting repaired] > Michael Lawnick wrote: >> >> rudresh said the following: >>> i'm using u-boot -1.3.0 in MPC8313 evaluation board, it having a NAND , >>> NOR >>> Flash , u-boot stored in NOR flash. when i do the saveenv , reset command >>> the u-boot is erased. i'm not able to fix this issue. help me to fix >>> this >>> issue >> >> Sounds U-Boot and environment share a flash sector. >> You'll have to give more info for correct diagnostic: >> Flash size, sector size, u-boot start address and size, position of >> environment data and if applicable of redundancy data. > Details are as follows .. the flash size 16Mbyte Nor flash.. NAND flash > 256MB. > /* > * Environment > */ > > #if defined(CONFIG_NAND_U_BOOT) ... > #elif !defined(CFG_RAMBOOT) ... > #else ... > #endif And now you expect me to guess your boot setting? Assuming neither CONFIG_NAND_U_BOOT nor CFG_RAMBOOT are set: check u-boot image size against 256k, as the offset of environment seems to be set to CFG_MONITOR_BASE + 0x40000 Or is ONFIG_NAND_U_BOOT set (would be the explanation why you mention NAND at all ...)? With u-boot in NOR this indicates a general code/configuration problem in your image. HTH -- Michael