]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/env_default.h
env: Add support for callbacks to environment vars
[people/ms/u-boot.git] / include / env_default.h
1 /*
2 * (C) Copyright 2000-2010
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 *
5 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
6 * Andreas Heppel <aheppel@sysgo.de>
7 *
8 * See file CREDITS for list of people who contributed to this
9 * project.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 * MA 02111-1307 USA
25 */
26
27 #include <env_callback.h>
28
29 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
30 env_t environment __PPCENV__ = {
31 ENV_CRC, /* CRC Sum */
32 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
33 1, /* Flags: valid */
34 #endif
35 {
36 #elif defined(DEFAULT_ENV_INSTANCE_STATIC)
37 static char default_environment[] = {
38 #else
39 const uchar default_environment[] = {
40 #endif
41 #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
42 ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
43 #endif
44 #ifdef CONFIG_BOOTARGS
45 "bootargs=" CONFIG_BOOTARGS "\0"
46 #endif
47 #ifdef CONFIG_BOOTCOMMAND
48 "bootcmd=" CONFIG_BOOTCOMMAND "\0"
49 #endif
50 #ifdef CONFIG_RAMBOOTCOMMAND
51 "ramboot=" CONFIG_RAMBOOTCOMMAND "\0"
52 #endif
53 #ifdef CONFIG_NFSBOOTCOMMAND
54 "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0"
55 #endif
56 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
57 "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0"
58 #endif
59 #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
60 "baudrate=" __stringify(CONFIG_BAUDRATE) "\0"
61 #endif
62 #ifdef CONFIG_LOADS_ECHO
63 "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0"
64 #endif
65 #ifdef CONFIG_ETHADDR
66 "ethaddr=" __stringify(CONFIG_ETHADDR) "\0"
67 #endif
68 #ifdef CONFIG_ETH1ADDR
69 "eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0"
70 #endif
71 #ifdef CONFIG_ETH2ADDR
72 "eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0"
73 #endif
74 #ifdef CONFIG_ETH3ADDR
75 "eth3addr=" __stringify(CONFIG_ETH3ADDR) "\0"
76 #endif
77 #ifdef CONFIG_ETH4ADDR
78 "eth4addr=" __stringify(CONFIG_ETH4ADDR) "\0"
79 #endif
80 #ifdef CONFIG_ETH5ADDR
81 "eth5addr=" __stringify(CONFIG_ETH5ADDR) "\0"
82 #endif
83 #ifdef CONFIG_ETHPRIME
84 "ethprime=" CONFIG_ETHPRIME "\0"
85 #endif
86 #ifdef CONFIG_IPADDR
87 "ipaddr=" __stringify(CONFIG_IPADDR) "\0"
88 #endif
89 #ifdef CONFIG_SERVERIP
90 "serverip=" __stringify(CONFIG_SERVERIP) "\0"
91 #endif
92 #ifdef CONFIG_SYS_AUTOLOAD
93 "autoload=" CONFIG_SYS_AUTOLOAD "\0"
94 #endif
95 #ifdef CONFIG_PREBOOT
96 "preboot=" CONFIG_PREBOOT "\0"
97 #endif
98 #ifdef CONFIG_ROOTPATH
99 "rootpath=" CONFIG_ROOTPATH "\0"
100 #endif
101 #ifdef CONFIG_GATEWAYIP
102 "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0"
103 #endif
104 #ifdef CONFIG_NETMASK
105 "netmask=" __stringify(CONFIG_NETMASK) "\0"
106 #endif
107 #ifdef CONFIG_HOSTNAME
108 "hostname=" __stringify(CONFIG_HOSTNAME) "\0"
109 #endif
110 #ifdef CONFIG_BOOTFILE
111 "bootfile=" CONFIG_BOOTFILE "\0"
112 #endif
113 #ifdef CONFIG_LOADADDR
114 "loadaddr=" __stringify(CONFIG_LOADADDR) "\0"
115 #endif
116 #ifdef CONFIG_CLOCKS_IN_MHZ
117 "clocks_in_mhz=1\0"
118 #endif
119 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
120 "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0"
121 #endif
122 #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
123 "arch=" CONFIG_SYS_ARCH "\0"
124 "cpu=" CONFIG_SYS_CPU "\0"
125 "board=" CONFIG_SYS_BOARD "\0"
126 "board_name=" CONFIG_SYS_BOARD "\0"
127 #ifdef CONFIG_SYS_VENDOR
128 "vendor=" CONFIG_SYS_VENDOR "\0"
129 #endif
130 #ifdef CONFIG_SYS_SOC
131 "soc=" CONFIG_SYS_SOC "\0"
132 #endif
133 #endif
134 #ifdef CONFIG_EXTRA_ENV_SETTINGS
135 CONFIG_EXTRA_ENV_SETTINGS
136 #endif
137 "\0"
138 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
139 }
140 #endif
141 };