Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2000-2010 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | * |
| 6 | * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
| 7 | * Andreas Heppel <aheppel@sysgo.de> |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
Joe Hershberger | 60fd3ad | 2012-12-11 22:16:24 -0600 | [diff] [blame] | 10 | #include <env_callback.h> |
| 11 | |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 12 | #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED |
Christophe Leroy | 29524f2 | 2018-03-16 17:20:53 +0100 | [diff] [blame] | 13 | env_t environment __UBOOT_ENV_SECTION__(environment) = { |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 14 | ENV_CRC, /* CRC Sum */ |
| 15 | #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT |
| 16 | 1, /* Flags: valid */ |
| 17 | #endif |
| 18 | { |
| 19 | #elif defined(DEFAULT_ENV_INSTANCE_STATIC) |
| 20 | static char default_environment[] = { |
| 21 | #else |
| 22 | const uchar default_environment[] = { |
| 23 | #endif |
Rasmus Villemoes | 14c7114 | 2018-03-20 11:38:45 +0100 | [diff] [blame] | 24 | #ifndef CONFIG_USE_DEFAULT_ENV_FILE |
Joe Hershberger | 60fd3ad | 2012-12-11 22:16:24 -0600 | [diff] [blame] | 25 | #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT |
| 26 | ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0" |
| 27 | #endif |
Joe Hershberger | 71497d0 | 2012-12-11 22:16:31 -0600 | [diff] [blame] | 28 | #ifdef CONFIG_ENV_FLAGS_LIST_DEFAULT |
| 29 | ENV_FLAGS_VAR "=" CONFIG_ENV_FLAGS_LIST_DEFAULT "\0" |
| 30 | #endif |
Sam Protsenko | bd7bffe | 2017-08-14 20:22:17 +0300 | [diff] [blame] | 31 | #ifdef CONFIG_USE_BOOTARGS |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 32 | "bootargs=" CONFIG_BOOTARGS "\0" |
| 33 | #endif |
| 34 | #ifdef CONFIG_BOOTCOMMAND |
| 35 | "bootcmd=" CONFIG_BOOTCOMMAND "\0" |
| 36 | #endif |
| 37 | #ifdef CONFIG_RAMBOOTCOMMAND |
| 38 | "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" |
| 39 | #endif |
| 40 | #ifdef CONFIG_NFSBOOTCOMMAND |
| 41 | "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0" |
| 42 | #endif |
Alex Kiernan | 685ead2 | 2018-07-05 12:38:15 +0000 | [diff] [blame] | 43 | #if defined(CONFIG_BOOTDELAY) |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 44 | "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0" |
| 45 | #endif |
| 46 | #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0) |
| 47 | "baudrate=" __stringify(CONFIG_BAUDRATE) "\0" |
| 48 | #endif |
| 49 | #ifdef CONFIG_LOADS_ECHO |
| 50 | "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0" |
| 51 | #endif |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 52 | #ifdef CONFIG_ETHPRIME |
| 53 | "ethprime=" CONFIG_ETHPRIME "\0" |
| 54 | #endif |
| 55 | #ifdef CONFIG_IPADDR |
| 56 | "ipaddr=" __stringify(CONFIG_IPADDR) "\0" |
| 57 | #endif |
| 58 | #ifdef CONFIG_SERVERIP |
| 59 | "serverip=" __stringify(CONFIG_SERVERIP) "\0" |
| 60 | #endif |
| 61 | #ifdef CONFIG_SYS_AUTOLOAD |
| 62 | "autoload=" CONFIG_SYS_AUTOLOAD "\0" |
| 63 | #endif |
| 64 | #ifdef CONFIG_PREBOOT |
| 65 | "preboot=" CONFIG_PREBOOT "\0" |
| 66 | #endif |
| 67 | #ifdef CONFIG_ROOTPATH |
| 68 | "rootpath=" CONFIG_ROOTPATH "\0" |
| 69 | #endif |
| 70 | #ifdef CONFIG_GATEWAYIP |
| 71 | "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0" |
| 72 | #endif |
| 73 | #ifdef CONFIG_NETMASK |
| 74 | "netmask=" __stringify(CONFIG_NETMASK) "\0" |
| 75 | #endif |
| 76 | #ifdef CONFIG_HOSTNAME |
Mario Six | 790d844 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 77 | "hostname=" CONFIG_HOSTNAME "\0" |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 78 | #endif |
| 79 | #ifdef CONFIG_BOOTFILE |
| 80 | "bootfile=" CONFIG_BOOTFILE "\0" |
| 81 | #endif |
| 82 | #ifdef CONFIG_LOADADDR |
| 83 | "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" |
| 84 | #endif |
| 85 | #ifdef CONFIG_CLOCKS_IN_MHZ |
| 86 | "clocks_in_mhz=1\0" |
| 87 | #endif |
| 88 | #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0) |
| 89 | "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0" |
| 90 | #endif |
| 91 | #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG |
| 92 | "arch=" CONFIG_SYS_ARCH "\0" |
Masahiro Yamada | dcc0473 | 2016-06-17 14:24:07 +0900 | [diff] [blame] | 93 | #ifdef CONFIG_SYS_CPU |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 94 | "cpu=" CONFIG_SYS_CPU "\0" |
Masahiro Yamada | dcc0473 | 2016-06-17 14:24:07 +0900 | [diff] [blame] | 95 | #endif |
| 96 | #ifdef CONFIG_SYS_BOARD |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 97 | "board=" CONFIG_SYS_BOARD "\0" |
Stephen Warren | fc52305 | 2012-10-31 11:17:28 +0000 | [diff] [blame] | 98 | "board_name=" CONFIG_SYS_BOARD "\0" |
Masahiro Yamada | dcc0473 | 2016-06-17 14:24:07 +0900 | [diff] [blame] | 99 | #endif |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 100 | #ifdef CONFIG_SYS_VENDOR |
| 101 | "vendor=" CONFIG_SYS_VENDOR "\0" |
| 102 | #endif |
| 103 | #ifdef CONFIG_SYS_SOC |
| 104 | "soc=" CONFIG_SYS_SOC "\0" |
| 105 | #endif |
| 106 | #endif |
| 107 | #ifdef CONFIG_EXTRA_ENV_SETTINGS |
| 108 | CONFIG_EXTRA_ENV_SETTINGS |
| 109 | #endif |
| 110 | "\0" |
Rasmus Villemoes | 14c7114 | 2018-03-20 11:38:45 +0100 | [diff] [blame] | 111 | #else /* CONFIG_USE_DEFAULT_ENV_FILE */ |
| 112 | #include "generated/defaultenv_autogenerated.h" |
| 113 | #endif |
Joe Hershberger | 8132114 | 2012-10-12 08:48:51 +0000 | [diff] [blame] | 114 | #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED |
| 115 | } |
| 116 | #endif |
| 117 | }; |