2 * (C) Copyright 2000-2010
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
6 * Andreas Heppel <aheppel@sysgo.de>
8 * See file CREDITS for list of people who contributed to this
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.
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.
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,
27 #include <env_callback.h>
29 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
30 env_t environment __PPCENV__ = {
31 ENV_CRC, /* CRC Sum */
32 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
36 #elif defined(DEFAULT_ENV_INSTANCE_STATIC)
37 static char default_environment[] = {
39 const uchar default_environment[] = {
41 #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
42 ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
44 #ifdef CONFIG_ENV_FLAGS_LIST_DEFAULT
45 ENV_FLAGS_VAR "=" CONFIG_ENV_FLAGS_LIST_DEFAULT "\0"
47 #ifdef CONFIG_BOOTARGS
48 "bootargs=" CONFIG_BOOTARGS "\0"
50 #ifdef CONFIG_BOOTCOMMAND
51 "bootcmd=" CONFIG_BOOTCOMMAND "\0"
53 #ifdef CONFIG_RAMBOOTCOMMAND
54 "ramboot=" CONFIG_RAMBOOTCOMMAND "\0"
56 #ifdef CONFIG_NFSBOOTCOMMAND
57 "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0"
59 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
60 "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0"
62 #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
63 "baudrate=" __stringify(CONFIG_BAUDRATE) "\0"
65 #ifdef CONFIG_LOADS_ECHO
66 "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0"
69 "ethaddr=" __stringify(CONFIG_ETHADDR) "\0"
71 #ifdef CONFIG_ETH1ADDR
72 "eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0"
74 #ifdef CONFIG_ETH2ADDR
75 "eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0"
77 #ifdef CONFIG_ETH3ADDR
78 "eth3addr=" __stringify(CONFIG_ETH3ADDR) "\0"
80 #ifdef CONFIG_ETH4ADDR
81 "eth4addr=" __stringify(CONFIG_ETH4ADDR) "\0"
83 #ifdef CONFIG_ETH5ADDR
84 "eth5addr=" __stringify(CONFIG_ETH5ADDR) "\0"
86 #ifdef CONFIG_ETHPRIME
87 "ethprime=" CONFIG_ETHPRIME "\0"
90 "ipaddr=" __stringify(CONFIG_IPADDR) "\0"
92 #ifdef CONFIG_SERVERIP
93 "serverip=" __stringify(CONFIG_SERVERIP) "\0"
95 #ifdef CONFIG_SYS_AUTOLOAD
96 "autoload=" CONFIG_SYS_AUTOLOAD "\0"
99 "preboot=" CONFIG_PREBOOT "\0"
101 #ifdef CONFIG_ROOTPATH
102 "rootpath=" CONFIG_ROOTPATH "\0"
104 #ifdef CONFIG_GATEWAYIP
105 "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0"
107 #ifdef CONFIG_NETMASK
108 "netmask=" __stringify(CONFIG_NETMASK) "\0"
110 #ifdef CONFIG_HOSTNAME
111 "hostname=" __stringify(CONFIG_HOSTNAME) "\0"
113 #ifdef CONFIG_BOOTFILE
114 "bootfile=" CONFIG_BOOTFILE "\0"
116 #ifdef CONFIG_LOADADDR
117 "loadaddr=" __stringify(CONFIG_LOADADDR) "\0"
119 #ifdef CONFIG_CLOCKS_IN_MHZ
122 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
123 "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0"
125 #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
126 "arch=" CONFIG_SYS_ARCH "\0"
127 "cpu=" CONFIG_SYS_CPU "\0"
128 "board=" CONFIG_SYS_BOARD "\0"
129 "board_name=" CONFIG_SYS_BOARD "\0"
130 #ifdef CONFIG_SYS_VENDOR
131 "vendor=" CONFIG_SYS_VENDOR "\0"
133 #ifdef CONFIG_SYS_SOC
134 "soc=" CONFIG_SYS_SOC "\0"
137 #ifdef CONFIG_EXTRA_ENV_SETTINGS
138 CONFIG_EXTRA_ENV_SETTINGS
141 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED