[U-Boot-Users] still got "*** Warning - bad CRC, using default environment" after saveenv is sucessfully done

Wayne Lee wnlee at cad.csie.ncku.edu.tw
Mon May 2 09:21:39 CEST 2005


Hi, u-boot users,

I have written hardware-dependent flash functions for my EVB u-boot support.
Hence, "saveenv" works and I can see the env data in the configured env
sector by "md" command.

However, I still get the warning messages, "*** Warning - bad CRC, using
default environment", after press reset button.

Should any CONFIG/CFG need to be added in board configuration file?

I use u-boot 1.1.2 and the followings are part of board configurations.

/*-----------------------------------------------------------------------
 * Physical Memory Map
 */
#define CONFIG_NR_DRAM_BANKS	1	   /* we have 1 bank of DRAM */
#define PHYS_SDRAM_1		0x00000000 /* SDRAM Bank #1 */
#define PHYS_SDRAM_1_SIZE	0x04000000 /* 64 MB */
#define PHYS_FLASH_1		0xFF800000 /* Flash Bank #1 */
#define CFG_FLASH_BASE		PHYS_FLASH_1

/*-----------------------------------------------------------------------
 * FLASH and environment organization
 */
#define CFG_MAX_FLASH_BANKS	1	/* max number of memory banks */
#define PHYS_FLASH_SIZE	0x00400000	/* 4MB */
#define CFG_MAX_FLASH_SECT	(71)	/* max number of sectors on one chip
*/
/* addr of environment */
#define CFG_FLASH_CFI				/* The flash is CFI
compatible  */

#define CFG_ENV_IS_IN_FLASH	1
#define CFG_ENV_SIZE		0x2000	/* Total Size of Environment Sector
*/
#define CFG_ENV_SECT_SIZE	0x2000
#define CFG_ENV_OFFSET		0x3F8000	/* environment starts here
*/
#define CFG_ENV_ADDR		(CFG_FLASH_BASE + CFG_ENV_OFFSET)

Thanks.
Wayne










More information about the U-Boot mailing list