[U-Boot-Users] Setting up environment variables under linux

Hi, I mapped the environment 'partition' to /dev/mtd2. Using cat /dev/mtd2, I am able to read all the environment variables. Now, I tried to use the fw_printenv tool to get a specific variable, but this led to a crc-error (Warning: Bad CRC, using default environment)
My mtd2 partition is on 0x8000 - 0xc000, so I configured fw_env.h: DEVICE1_OFFSET 0x0000 DEVICE1_ESIZE 0x4000 ENV1_SIZE 0x4000
Does anybody know where the problem could be? Regards Juergen

In message 29790.1082821254@www52.gmx.net you wrote:
I mapped the environment 'partition' to /dev/mtd2. Using cat /dev/mtd2, I am able to read all the environment variables. Now, I tried to use the fw_printenv tool to get a specific variable, but this led to a crc-error (Warning: Bad CRC, using default environment)
My mtd2 partition is on 0x8000 - 0xc000, so I configured fw_env.h:
What EXACTLY did you configure?
Did you keep the setting of HAVE_REDUND? And is does your system really use redundand flash sectors?
Did you keep the definition of CONFIG_FILE? and what does your config file contain?
DEVICE1_OFFSET 0x0000 DEVICE1_ESIZE 0x4000 ENV1_SIZE 0x4000
Does anybody know where the problem could be?
Misconfiguration. I think you left the "#define HAVE_REDUND" in the header file but use only a simple (non-redundand) flash sector; or you forgot to remove the CONFIG_FILE or to adapt your config file.
Best regards,
Wolfgang Denk
participants (2)
-
Juergen Oberhofer
-
Wolfgang Denk