[U-Boot-Users] still got "*** Warning - bad CRC, using default environment" after saveenv is sucessfully done
Wolfgang Denk
wd at denx.de
Mon May 2 10:37:57 CEST 2005
In message <200505020725.j427P98R014633 at ismp.csie.ncku.edu.tw> you wrote:
>
> 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.
This means that U-Boot does not find a valid environment in flash.
> Should any CONFIG/CFG need to be added in board configuration file?
Added or fixed - how should we know? We don't know your hardware...
> 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 */
You shouldn't do that., You should use auto-sizing instead.
> #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)
This looks ok to me. I just wonder why you provide redundant
definitions - one of either CFG_ENV_OFFSET or CFG_ENV_ADDR is
sufficient.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A man is not complete until he is married -- then he is finished.
More information about the U-Boot
mailing list