[U-Boot] fw_printenv - Bad CRC, using default environment

John Tobias jtobias at viaas.com
Mon Apr 27 20:43:31 CEST 2009


Hi All,

I have a u-boot version for Davinci 6446 and would like to access r/w the
u-boot environment from linux userpace.
I set the /etc/fw_env.config to /dev/mtd0               0
0x4000          0x200

When I execute fw_printenv, I got these error:
Warning: Bad CRC, using default environment

But, when I commented out the memcpy on the condition below, I could be able
to display my uboot environment.
Although, there were few enviroment variables where the values are corrupted
or missing few characters.

if (!crc1_ok) {
   fprintf (stderr,
    "Warning: Bad CRC, using default environment\n");
     /*memcpy(environment.data, default_environment, sizeof
default_environment);*/
  }

Any one can give me a hints on how to fix it?

Thanks,

John


More information about the U-Boot mailing list