blob: 2b54adf76bd265d36fa23e12bb4aae90ffcc20c8 [file] [log] [blame]
wdenk34b613e2002-12-17 01:51:00 +00001
2This is a demo implementation of a Linux command line tool to access
3the U-Boot's environment variables.
4
5Configuration is done via #defines in the fw_env.h file. The
6following lines are relevant:
7
8#define HAVE_REDUND /* For systems with 2 env sectors */
9#define DEVICE1_NAME "/dev/mtd1"
10#define DEVICE2_NAME "/dev/mtd2"
11#define ENV1_SIZE 0x4000
12#define DEVICE1_ESIZE 0x4000
13#define ENV2_SIZE 0x4000
14#define DEVICE2_ESIZE 0x4000
15
16Current configuration matches the environment layout of the TRAB
17board.
18
19Un-define HAVE_REDUND, if you want to use the utlities on a system
20that does not have support for redundant environment enabled. The
21DEVICEx_NAME constants define which MTD character device(s) is (are)
22to be used to access the environment. If HAVE_REDUND is undefined,
23DEVICE2_NAME is ignored, as is ENV2_SIZE and DEVICE2_ESIZE. ENVx_SIZE
24defines the size in bytes taken by the environment, which may be less
25then flash sector size, if the environment takes less then 1 sector.
26DEVICEx_ESIZE defines the size of the first sector in the flash
27partition where the environment resides. It is assumed that the
28environment is located in the first ENVx_SIZE bytes of the device
29DEVICEx_NAME.