2 * (C) Copyright 2002-2008
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
8 /* Pull in the current config to define the default environment */
10 #define __ASSEMBLY__ /* get only #defines from config.h */
18 * To build the utility with the static configuration
19 * comment out the next line.
20 * See included "fw_env.config" sample file
21 * for notes on configuration.
23 #define CONFIG_FILE "/etc/fw_env.config"
26 #define HAVE_REDUND /* For systems with 2 env sectors */
27 #define DEVICE1_NAME "/dev/mtd1"
28 #define DEVICE2_NAME "/dev/mtd2"
29 #define DEVICE1_OFFSET 0x0000
30 #define ENV1_SIZE 0x4000
31 #define DEVICE1_ESIZE 0x4000
32 #define DEVICE1_ENVSECTORS 2
33 #define DEVICE2_OFFSET 0x0000
34 #define ENV2_SIZE 0x4000
35 #define DEVICE2_ESIZE 0x4000
36 #define DEVICE2_ENVSECTORS 2
39 #ifndef CONFIG_BAUDRATE
40 #define CONFIG_BAUDRATE 115200
43 #ifndef CONFIG_BOOTDELAY
44 #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
47 #ifndef CONFIG_BOOTCOMMAND
48 #define CONFIG_BOOTCOMMAND \
50 "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \
51 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
55 extern int fw_printenv(int argc, char *argv[]);
56 extern char *fw_getenv (char *name);
57 extern int fw_setenv (int argc, char *argv[]);
58 extern int fw_parse_script(char *fname);
59 extern int fw_env_open(void);
60 extern int fw_env_write(char *name, char *value);
61 extern int fw_env_close(void);
63 extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned);