1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2000-2010
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Andreas Heppel <aheppel@sysgo.de>
10 #include <env_callback.h>
11 #include <linux/stringify.h>
13 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
14 env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
15 ENV_CRC, /* CRC Sum */
16 #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
20 #elif defined(DEFAULT_ENV_INSTANCE_STATIC)
21 static char default_environment[] = {
22 #elif defined(DEFAULT_ENV_IS_RW)
23 uchar default_environment[] = {
25 const uchar default_environment[] = {
27 #ifndef CONFIG_USE_DEFAULT_ENV_FILE
28 #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
29 ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
31 #ifdef CONFIG_ENV_FLAGS_LIST_DEFAULT
32 ENV_FLAGS_VAR "=" CONFIG_ENV_FLAGS_LIST_DEFAULT "\0"
34 #ifdef CONFIG_USE_BOOTARGS
35 "bootargs=" CONFIG_BOOTARGS "\0"
37 #ifdef CONFIG_BOOTCOMMAND
38 "bootcmd=" CONFIG_BOOTCOMMAND "\0"
40 #ifdef CONFIG_RAMBOOTCOMMAND
41 "ramboot=" CONFIG_RAMBOOTCOMMAND "\0"
43 #ifdef CONFIG_NFSBOOTCOMMAND
44 "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0"
46 #if defined(CONFIG_BOOTDELAY)
47 "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0"
49 #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
50 "baudrate=" __stringify(CONFIG_BAUDRATE) "\0"
52 #ifdef CONFIG_LOADS_ECHO
53 "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0"
55 #ifdef CONFIG_ETHPRIME
56 "ethprime=" CONFIG_ETHPRIME "\0"
59 "ipaddr=" __stringify(CONFIG_IPADDR) "\0"
61 #ifdef CONFIG_SERVERIP
62 "serverip=" __stringify(CONFIG_SERVERIP) "\0"
64 #ifdef CONFIG_SYS_AUTOLOAD
65 "autoload=" CONFIG_SYS_AUTOLOAD "\0"
68 "preboot=" CONFIG_PREBOOT "\0"
70 #ifdef CONFIG_ROOTPATH
71 "rootpath=" CONFIG_ROOTPATH "\0"
73 #ifdef CONFIG_GATEWAYIP
74 "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0"
77 "netmask=" __stringify(CONFIG_NETMASK) "\0"
79 #ifdef CONFIG_HOSTNAME
80 "hostname=" CONFIG_HOSTNAME "\0"
82 #ifdef CONFIG_BOOTFILE
83 "bootfile=" CONFIG_BOOTFILE "\0"
85 #ifdef CONFIG_LOADADDR
86 "loadaddr=" __stringify(CONFIG_LOADADDR) "\0"
88 #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
89 "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0"
91 #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
92 "arch=" CONFIG_SYS_ARCH "\0"
94 "cpu=" CONFIG_SYS_CPU "\0"
96 #ifdef CONFIG_SYS_BOARD
97 "board=" CONFIG_SYS_BOARD "\0"
98 "board_name=" CONFIG_SYS_BOARD "\0"
100 #ifdef CONFIG_SYS_VENDOR
101 "vendor=" CONFIG_SYS_VENDOR "\0"
103 #ifdef CONFIG_SYS_SOC
104 "soc=" CONFIG_SYS_SOC "\0"
106 #ifdef CONFIG_ENV_IMPORT_FDT
107 "env_fdt_path=" CONFIG_ENV_FDT_PATH "\0"
110 #if defined(CONFIG_BOOTCOUNT_BOOTLIMIT) && (CONFIG_BOOTCOUNT_BOOTLIMIT > 0)
111 "bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0"
113 #ifdef CONFIG_EXTRA_ENV_SETTINGS
114 CONFIG_EXTRA_ENV_SETTINGS
117 #else /* CONFIG_USE_DEFAULT_ENV_FILE */
118 #include "generated/defaultenv_autogenerated.h"
120 #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED