]> git.ipfire.org Git - people/ms/u-boot.git/blob - tools/env/fw_env.h
Merge branch 'buildman' of git://git.denx.de/u-boot-x86
[people/ms/u-boot.git] / tools / env / fw_env.h
1 /*
2 * (C) Copyright 2002-2008
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
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
17 /*
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.
22 */
23 #define CONFIG_FILE "/etc/fw_env.config"
24
25 #ifndef CONFIG_FILE
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
37 #endif
38
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
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);
62
63 extern unsigned long crc32 (unsigned long, const unsigned char *, unsigned);