]>
Commit | Line | Data |
---|---|---|
6aff3115 | 1 | /* |
bc11756d | 2 | * (C) Copyright 2002-2008 |
6aff3115 WD |
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
6aff3115 WD |
6 | */ |
7 | ||
e3c52f2b TR |
8 | /* Pull in the current config to define the default environment */ |
9 | #ifndef __ASSEMBLY__ | |
10 | #define __ASSEMBLY__ /* get only #defines from config.h */ | |
11 | #include <config.h> | |
12 | #undef __ASSEMBLY__ | |
13 | #else | |
14 | #include <config.h> | |
15 | #endif | |
16 | ||
8bde7f77 | 17 | /* |
9cbfee6d FM |
18 | * To build the utility with the static configuration |
19 | * comment out the next line. | |
566e5cf4 | 20 | * See included "fw_env.config" sample file |
d0fb80c3 WD |
21 | * for notes on configuration. |
22 | */ | |
d791b1dc | 23 | #define CONFIG_FILE "/etc/fw_env.config" |
d0fb80c3 | 24 | |
497f2053 | 25 | #ifndef CONFIG_FILE |
6aff3115 WD |
26 | #define HAVE_REDUND /* For systems with 2 env sectors */ |
27 | #define DEVICE1_NAME "/dev/mtd1" | |
28 | #define DEVICE2_NAME "/dev/mtd2" | |
d0fb80c3 | 29 | #define DEVICE1_OFFSET 0x0000 |
6aff3115 | 30 | #define ENV1_SIZE 0x4000 |
5d5cc384 FM |
31 | #define DEVICE1_ESIZE 0x4000 |
32 | #define DEVICE1_ENVSECTORS 2 | |
d0fb80c3 | 33 | #define DEVICE2_OFFSET 0x0000 |
6aff3115 | 34 | #define ENV2_SIZE 0x4000 |
5d5cc384 FM |
35 | #define DEVICE2_ESIZE 0x4000 |
36 | #define DEVICE2_ENVSECTORS 2 | |
497f2053 | 37 | #endif |
6aff3115 | 38 | |
e3c52f2b TR |
39 | #ifndef CONFIG_BAUDRATE |
40 | #define CONFIG_BAUDRATE 115200 | |
41 | #endif | |
42 | ||
43 | #ifndef CONFIG_BOOTDELAY | |
44 | #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ | |
45 | #endif | |
46 | ||
47 | #ifndef CONFIG_BOOTCOMMAND | |
48 | #define CONFIG_BOOTCOMMAND \ | |
49 | "bootp; " \ | |
50 | "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \ | |
51 | "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ | |
52 | "bootm" | |
53 | #endif | |
54 | ||
bc11756d | 55 | extern int fw_printenv(int argc, char *argv[]); |
6de66b35 MK |
56 | extern char *fw_getenv (char *name); |
57 | extern int fw_setenv (int argc, char *argv[]); | |
bd7b26f8 SB |
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); | |
6aff3115 WD |
62 | |
63 | extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned); |