Skip to contentSkip to conversation

Write ENV to File and flash it with openocd (problem) !!!

U-Boot Franz Skale 1 participant 1 message Aug 9, 2012

lore
Share & tools
lore
#0 lore raw

Hi,
i hope this is the place to solve my problem.

Shortdesc:
I am using opencd and fw_setenv (2008) from the sheeva plug installer to flash uboot and the env.
The boards/sheevaplug.cfg is reflecting two functions for flashing uboot and the env.
The sheevapluginstaller version is patched to use the file uboot-env.bin to write the env to a file and flash it.
With the uboot version 2012.04.1 i am able to flash the uboot loader but not the env.
There's no error but the env is default.
Could it be, that the Offset in the file of the patched sheevapluginstaller for a flat file is wrong ?

The fw_env.h of the patched sheevapluginstaller (20080520)

#undef HAVE_REDUND /* For systems with 2 env sectors */

#define DEVICE1_NAME      "uboot-env.bin"
#define DEVICE2_NAME      "/dev/mtd2"
#define DEVICE1_OFFSET    0x0000
#define ENV1_SIZE         0x00020000 /* 64 KB */
#define DEVICE1_ESIZE     0x00020000 /* 64 KB */

The 2012 version:

#define HAVE_REDUND /* For systems with 2 env sectors */

#define DEVICE1_NAME      "/dev/mtd1"
#define DEVICE2_NAME      "/dev/mtd2"
#define DEVICE1_OFFSET    0x0000
#define ENV1_SIZE         0x4000
#define DEVICE1_ESIZE     0x4000

#define DEVICE1_ENVSECTORS 2

What has to be done, that the flash to the NAND via openocd will wor properly ?
I must be able to write to an env file which should work with the openocd command reflash_env.

I am running out of ideas yet.

Thanks in advance

Franz