From mboxrd@z Thu Jan 1 00:00:00 1970 From: rudresh Date: Mon, 23 Feb 2009 03:40:41 -0800 (PST) Subject: [U-Boot] saveenv command erases flash u-boot In-Reply-To: References: <22156928.post@talk.nabble.com> Message-ID: <22159964.post@talk.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Details are as follows .. the flash size 16Mbyte Nor flash.. NAND flash 256MB. /* * Environment */ #if defined(CONFIG_NAND_U_BOOT) #define CFG_ENV_IS_IN_NAND 1 #define CFG_ENV_SIZE CFG_NAND_BLOCK_SIZE #define CFG_ENV_OFFSET ((1024<<10) - (CFG_NAND_BLOCK_SIZE<<1)) #elif !defined(CFG_RAMBOOT) #define CFG_ENV_IS_IN_FLASH 1 #define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000) //Daniel Change #define CFG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ //Daniel Change #define CFG_ENV_SIZE 0x2000 /* * FLASH on the Local Bus */ #define CFG_FLASH_CFI /* use the Common Flash Interface */ #define CFG_FLASH_CFI_DRIVER /* use the CFI driver */ #define CFG_FLASH_BASE 0xFE000000 /* start of FLASH */ #define CFG_FLASH_SIZE 16 /* flash size in MB */ #define CFG_FLASH_EMPTY_INFO /* display empty sectors */ #define CFG_FLASH_USE_BUFFER_WRITE /* buffer up multiple bytes */ #define CFG_FLASH_BR_PRELIM (CFG_FLASH_BASE | /* flash Base address */ \ (2< > 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. > > -- > Regards, > Michael > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > -- View this message in context: http://www.nabble.com/saveenv-command-erases-flash-u-boot-tp22156928p22159964.html Sent from the Uboot - Users mailing list archive at Nabble.com.