[U-Boot-Users] HELP! can't save environment variables

Hello there,
I ported u-boot to my customized s3c2410 board. My board uses NOR flash SST39xF1601(2MB). Everything seems to be ok except it can't save environment variables using saveenv command. Would you tell me how to solve that issue? Thanks.
I defined smdk2410.h about flash as belows:
#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x020000)) #define CFG_ENV_IS_IN_FLASH 1 #define CFG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */ #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ #define PHYS_FLASH_SIZE 0x00200000 /* 2MB */ #define CFG_MAX_FLASH_SECT (32) /* max number of sectors on one chip */
I also enable CFG_CMD_ENV and CFG_CMD_FLASH for CONFIG_COMMANDS. I noticed if I defined CFG_MONITOR_BASE = CFG_FLASH_BASE, then a message *** Warning - bad CRC, using default environment won't be displayed on screen.
Best regards, Joe.

In message 67a3f13e0603170124s1e39282erdc802cc18e50e01@mail.gmail.com you wrote:
I ported u-boot to my customized s3c2410 board. My board uses NOR flash SST39xF1601(2MB). Everything seems to be ok except it can't save environment variables using saveenv command.
Then your flash configuration does not match your hardware.
Would you tell me how to solve that issue? Thanks.
Fix your configuration.
I defined smdk2410.h about flash as belows:
This is not enough to make any statements, especially sinc we know nothing about your hardware.
#define CFG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */
One formal comment: Your comment is wrong here. What you #define is the toal size of the environment, not the size of an environment sector. These *might* be the identical, but would be pure chance.
Best regards,
Wolfgang Denk

On 3/17/06, Wolfgang Denk wrote:
In message you wrote:
I ported u-boot to my customized s3c2410 board. My board uses NOR flash SST39xF1601(2MB). Everything seems to be ok except it can't save environment variables using saveenv command.
Then your flash configuration does not match your hardware.
Would you tell me how to solve that issue? Thanks.
Fix your configuration.
Thank you for your quick reply. As you mentioned, you mean I should modify board/smdk2410/flash.c for my s3c2410 customized board? I guess my include/configs/smdk2410.h with no problem...
Thanks again, Joe.

In message 67a3f13e0603170549s3ec9c117ib7121cd4a5d5850b@mail.gmail.com you wrote:
Fix your configuration.
Thank you for your quick reply. As you mentioned, you mean I should modify board/smdk2410/flash.c for my s3c2410 customized board? I guess my include/configs/smdk2410.h with no problem...
You misunderstand. I wrote "fix your configuration", which means config settings in your baord config file. It seems they do not match your code and/or your hardware.
And do NOT, I repeat DO NOT mess with include/configs/smdk2410.h or board/smdk2410/flash.c because these are for the SMDK2410 board and NOT for your hardware. Play by the rules and create your own board configuration. Add only things you completely understand.
Best regards,
Wolfgang Denk
participants (2)
-
Joe Culler
-
Wolfgang Denk