env_default.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. #include <env_callback.h>
  27. #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
  28. env_t environment __PPCENV__ = {
  29. ENV_CRC, /* CRC Sum */
  30. #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
  31. 1, /* Flags: valid */
  32. #endif
  33. {
  34. #elif defined(DEFAULT_ENV_INSTANCE_STATIC)
  35. static char default_environment[] = {
  36. #else
  37. const uchar default_environment[] = {
  38. #endif
  39. #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
  40. ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
  41. #endif
  42. #ifdef CONFIG_ENV_FLAGS_LIST_DEFAULT
  43. ENV_FLAGS_VAR "=" CONFIG_ENV_FLAGS_LIST_DEFAULT "\0"
  44. #endif
  45. #ifdef CONFIG_BOOTARGS
  46. "bootargs=" CONFIG_BOOTARGS "\0"
  47. #endif
  48. #ifdef CONFIG_BOOTCOMMAND
  49. "bootcmd=" CONFIG_BOOTCOMMAND "\0"
  50. #endif
  51. #ifdef CONFIG_RAMBOOTCOMMAND
  52. "ramboot=" CONFIG_RAMBOOTCOMMAND "\0"
  53. #endif
  54. #ifdef CONFIG_NFSBOOTCOMMAND
  55. "nfsboot=" CONFIG_NFSBOOTCOMMAND "\0"
  56. #endif
  57. #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
  58. "bootdelay=" __stringify(CONFIG_BOOTDELAY) "\0"
  59. #endif
  60. #if defined(CONFIG_BAUDRATE) && (CONFIG_BAUDRATE >= 0)
  61. "baudrate=" __stringify(CONFIG_BAUDRATE) "\0"
  62. #endif
  63. #ifdef CONFIG_LOADS_ECHO
  64. "loads_echo=" __stringify(CONFIG_LOADS_ECHO) "\0"
  65. #endif
  66. #ifdef CONFIG_ETHADDR
  67. "ethaddr=" __stringify(CONFIG_ETHADDR) "\0"
  68. #endif
  69. #ifdef CONFIG_ETH1ADDR
  70. "eth1addr=" __stringify(CONFIG_ETH1ADDR) "\0"
  71. #endif
  72. #ifdef CONFIG_ETH2ADDR
  73. "eth2addr=" __stringify(CONFIG_ETH2ADDR) "\0"
  74. #endif
  75. #ifdef CONFIG_ETH3ADDR
  76. "eth3addr=" __stringify(CONFIG_ETH3ADDR) "\0"
  77. #endif
  78. #ifdef CONFIG_ETH4ADDR
  79. "eth4addr=" __stringify(CONFIG_ETH4ADDR) "\0"
  80. #endif
  81. #ifdef CONFIG_ETH5ADDR
  82. "eth5addr=" __stringify(CONFIG_ETH5ADDR) "\0"
  83. #endif
  84. #ifdef CONFIG_ETHPRIME
  85. "ethprime=" CONFIG_ETHPRIME "\0"
  86. #endif
  87. #ifdef CONFIG_IPADDR
  88. "ipaddr=" __stringify(CONFIG_IPADDR) "\0"
  89. #endif
  90. #ifdef CONFIG_SERVERIP
  91. "serverip=" __stringify(CONFIG_SERVERIP) "\0"
  92. #endif
  93. #ifdef CONFIG_SYS_AUTOLOAD
  94. "autoload=" CONFIG_SYS_AUTOLOAD "\0"
  95. #endif
  96. #ifdef CONFIG_PREBOOT
  97. "preboot=" CONFIG_PREBOOT "\0"
  98. #endif
  99. #ifdef CONFIG_ROOTPATH
  100. "rootpath=" CONFIG_ROOTPATH "\0"
  101. #endif
  102. #ifdef CONFIG_GATEWAYIP
  103. "gatewayip=" __stringify(CONFIG_GATEWAYIP) "\0"
  104. #endif
  105. #ifdef CONFIG_NETMASK
  106. "netmask=" __stringify(CONFIG_NETMASK) "\0"
  107. #endif
  108. #ifdef CONFIG_HOSTNAME
  109. "hostname=" __stringify(CONFIG_HOSTNAME) "\0"
  110. #endif
  111. #ifdef CONFIG_BOOTFILE
  112. "bootfile=" CONFIG_BOOTFILE "\0"
  113. #endif
  114. #ifdef CONFIG_LOADADDR
  115. "loadaddr=" __stringify(CONFIG_LOADADDR) "\0"
  116. #endif
  117. #ifdef CONFIG_CLOCKS_IN_MHZ
  118. "clocks_in_mhz=1\0"
  119. #endif
  120. #if defined(CONFIG_PCI_BOOTDELAY) && (CONFIG_PCI_BOOTDELAY > 0)
  121. "pcidelay=" __stringify(CONFIG_PCI_BOOTDELAY)"\0"
  122. #endif
  123. #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
  124. "arch=" CONFIG_SYS_ARCH "\0"
  125. "cpu=" CONFIG_SYS_CPU "\0"
  126. "board=" CONFIG_SYS_BOARD "\0"
  127. "board_name=" CONFIG_SYS_BOARD "\0"
  128. #ifdef CONFIG_SYS_VENDOR
  129. "vendor=" CONFIG_SYS_VENDOR "\0"
  130. #endif
  131. #ifdef CONFIG_SYS_SOC
  132. "soc=" CONFIG_SYS_SOC "\0"
  133. #endif
  134. #endif
  135. #ifdef CONFIG_EXTRA_ENV_SETTINGS
  136. CONFIG_EXTRA_ENV_SETTINGS
  137. #endif
  138. "\0"
  139. #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
  140. }
  141. #endif
  142. };