From: Wolfgang Denk Date: Sat, 24 Apr 2004 18:20:10 +0200 Subject: [U-Boot-Users] Setting up environment variables under linux In-Reply-To: Your message of "Sat, 24 Apr 2004 17:40:54 +0200." <29790.1082821254@www52.gmx.net> Message-ID: <20040424162015.9328EC109F@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de No one may kill a man. Not for any purpose. It cannot be condoned. -- Kirk, "Spock's Brain", stardate 5431.6