env_default.h 3.7 KB

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