Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
| 3 | Environment Variables |
| 4 | ===================== |
| 5 | |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 6 | U-Boot supports user configuration using environment variables which |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 7 | can be made persistent by saving to persistent storage, for example flash |
| 8 | memory. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 9 | |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 10 | Environment variables are set using "env set" (alias "setenv"), printed using |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 11 | "env print" (alias "printenv"), and saved to persistent storage using |
| 12 | "env save" (alias "saveenv"). Using "env set" |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 13 | without a value can be used to delete a variable from the |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 14 | environment. As long as you don't save the environment, you are |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 15 | working with an in-memory copy. In case the Flash area containing the |
| 16 | environment is erased by accident, a default environment is provided. |
| 17 | |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 18 | Some configuration is controlled by Environment Variables, so that setting the |
| 19 | variable can adjust the behaviour of U-Boot (e.g. autoboot delay, autoloading |
| 20 | from tftp). |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 21 | |
Simon Glass | 7327fe7 | 2021-10-21 21:08:46 -0600 | [diff] [blame] | 22 | Text-based Environment |
| 23 | ---------------------- |
| 24 | |
| 25 | The default environment for a board is created using a `.env` environment file |
| 26 | using a simple text format. The base filename for this is defined by |
| 27 | `CONFIG_ENV_SOURCE_FILE`, or `CONFIG_SYS_BOARD` if that is empty. |
| 28 | |
| 29 | The file must be in the board directory and have a .env extension, so |
| 30 | assuming that there is a board vendor, the resulting filename is therefore:: |
| 31 | |
| 32 | board/<vendor>/<board>/<CONFIG_ENV_SOURCE_FILE>.env |
| 33 | |
| 34 | or:: |
| 35 | |
| 36 | board/<vendor>/<board>/<CONFIG_SYS_BOARD>.env |
| 37 | |
| 38 | This is a plain text file where you can type your environment variables in |
| 39 | the form `var=value`. Blank lines and multi-line variables are supported. |
| 40 | The conversion script looks for a line that starts in column 1 with a string |
| 41 | and has an equals sign immediately afterwards. Spaces before the = are not |
| 42 | permitted. It is a good idea to indent your scripts so that only the 'var=' |
| 43 | appears at the start of a line. |
| 44 | |
| 45 | To add additional text to a variable you can use `var+=value`. This text is |
| 46 | merged into the variable during the make process and made available as a |
| 47 | single value to U-Boot. Variables can contain `+` characters but in the unlikely |
| 48 | event that you want to have a variable name ending in plus, put a backslash |
| 49 | before the `+` so that the script knows you are not adding to an existing |
| 50 | variable but assigning to a new one:: |
| 51 | |
| 52 | maximum\+=value |
| 53 | |
| 54 | This file can include C-style comments. Blank lines and multi-line |
| 55 | variables are supported, and you can use normal C preprocessor directives |
| 56 | and CONFIG defines from your board config also. |
| 57 | |
| 58 | For example, for snapper9260 you would create a text file called |
| 59 | `board/bluewater/snapper9260.env` containing the environment text. |
| 60 | |
| 61 | Example:: |
| 62 | |
| 63 | stdout=serial |
| 64 | #ifdef CONFIG_LCD |
| 65 | stdout+=,lcd |
| 66 | #endif |
| 67 | bootcmd= |
| 68 | /* U-Boot script for booting */ |
| 69 | |
| 70 | if [ -z ${tftpserverip} ]; then |
| 71 | echo "Use 'setenv tftpserverip a.b.c.d' to set IP address." |
| 72 | fi |
| 73 | |
| 74 | usb start; setenv autoload n; bootp; |
| 75 | tftpboot ${tftpserverip}: |
| 76 | bootm |
| 77 | failed= |
| 78 | /* Print a message when boot fails */ |
| 79 | echo CONFIG_SYS_BOARD boot failed - please check your image |
| 80 | echo Load address is CONFIG_SYS_LOAD_ADDR |
| 81 | |
| 82 | If CONFIG_ENV_SOURCE_FILE is empty and the default filename is not present, then |
| 83 | the old-style C environment is used instead. See below. |
| 84 | |
| 85 | Old-style C environment |
| 86 | ----------------------- |
| 87 | |
| 88 | Traditionally, the default environment is created in `include/env_default.h`, |
| 89 | and can be augmented by various `CONFIG` defines. See that file for details. In |
| 90 | particular you can define `CONFIG_EXTRA_ENV_SETTINGS` in your board file |
| 91 | to add environment variables. |
| 92 | |
| 93 | Board maintainers are encouraged to migrate to the text-based environment as it |
| 94 | is easier to maintain. The distro-board script still requires the old-style |
| 95 | environment but work is underway to address this. |
| 96 | |
| 97 | |
| 98 | List of environment variables |
| 99 | ----------------------------- |
| 100 | |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 101 | Some device configuration options can be set using environment variables. In |
| 102 | many cases the value in the default environment comes from a CONFIG option - see |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 103 | `include/env_default.h`) for this. |
| 104 | |
Simon Glass | 7327fe7 | 2021-10-21 21:08:46 -0600 | [diff] [blame] | 105 | This is most-likely not complete: |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 106 | |
| 107 | baudrate |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 108 | Used to set the baudrate of the UART - it defaults to CONFIG_BAUDRATE (which |
| 109 | defaults to 115200). |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 110 | |
| 111 | bootdelay |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 112 | Delay before automatically running bootcmd. During this time the user |
| 113 | can choose to enter the shell (or the boot menu if |
| 114 | CONFIG_AUTOBOOT_MENU_SHOW=y): |
| 115 | |
| 116 | - 0 to autoboot with no delay, but you can stop it by key input. |
| 117 | - -1 to disable autoboot. |
| 118 | - -2 to autoboot with no delay and not check for abort |
| 119 | |
| 120 | The default value is defined by CONFIG_BOOTDELAY. |
| 121 | The value of 'bootdelay' is overridden by the /config/bootdelay value in |
| 122 | the device-tree if CONFIG_OF_CONTROL=y. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 123 | |
| 124 | bootcmd |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 125 | The command that is run if the user does not enter the shell during the |
| 126 | boot delay. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 127 | |
| 128 | bootargs |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 129 | Command line arguments passed when booting an operating system or binary |
| 130 | image |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 131 | |
| 132 | bootfile |
| 133 | Name of the image to load with TFTP |
| 134 | |
| 135 | bootm_low |
| 136 | Memory range available for image processing in the bootm |
| 137 | command can be restricted. This variable is given as |
| 138 | a hexadecimal number and defines lowest address allowed |
| 139 | for use by the bootm command. See also "bootm_size" |
| 140 | environment variable. Address defined by "bootm_low" is |
| 141 | also the base of the initial memory mapping for the Linux |
| 142 | kernel -- see the description of CONFIG_SYS_BOOTMAPSZ and |
| 143 | bootm_mapsize. |
| 144 | |
| 145 | bootm_mapsize |
| 146 | Size of the initial memory mapping for the Linux kernel. |
| 147 | This variable is given as a hexadecimal number and it |
| 148 | defines the size of the memory region starting at base |
| 149 | address bootm_low that is accessible by the Linux kernel |
| 150 | during early boot. If unset, CONFIG_SYS_BOOTMAPSZ is used |
| 151 | as the default value if it is defined, and bootm_size is |
| 152 | used otherwise. |
| 153 | |
| 154 | bootm_size |
| 155 | Memory range available for image processing in the bootm |
| 156 | command can be restricted. This variable is given as |
| 157 | a hexadecimal number and defines the size of the region |
| 158 | allowed for use by the bootm command. See also "bootm_low" |
| 159 | environment variable. |
| 160 | |
| 161 | bootstopkeysha256, bootdelaykey, bootstopkey |
| 162 | See README.autoboot |
| 163 | |
| 164 | updatefile |
| 165 | Location of the software update file on a TFTP server, used |
| 166 | by the automatic software update feature. Please refer to |
| 167 | documentation in doc/README.update for more details. |
| 168 | |
| 169 | autoload |
| 170 | if set to "no" (any string beginning with 'n'), |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 171 | "bootp" and "dhcp" will just load perform a lookup of the |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 172 | configuration from the BOOTP server, but not try to |
Simon Glass | d68e165 | 2022-03-11 16:22:39 -0700 | [diff] [blame] | 173 | load any image. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 174 | |
| 175 | autostart |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 176 | if set to "yes", an image loaded using the "bootp", "dhcp", |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 177 | "rarpboot", "tftpboot" or "diskboot" commands will |
| 178 | be automatically started (by internally calling |
| 179 | "bootm") |
| 180 | |
Simon Glass | 46b530a | 2021-10-21 21:08:52 -0600 | [diff] [blame] | 181 | If unset, or set to "1"/"yes"/"true" (case insensitive, just the first |
| 182 | character is enough), a standalone image |
| 183 | passed to the "bootm" command will be copied to the load address |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 184 | (and eventually uncompressed), but NOT be started. |
| 185 | This can be used to load and uncompress arbitrary |
| 186 | data. |
| 187 | |
| 188 | fdt_high |
| 189 | if set this restricts the maximum address that the |
| 190 | flattened device tree will be copied into upon boot. |
| 191 | For example, if you have a system with 1 GB memory |
| 192 | at physical address 0x10000000, while Linux kernel |
| 193 | only recognizes the first 704 MB as low memory, you |
| 194 | may need to set fdt_high as 0x3C000000 to have the |
| 195 | device tree blob be copied to the maximum address |
| 196 | of the 704 MB low memory, so that Linux kernel can |
| 197 | access it during the boot procedure. |
| 198 | |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 199 | If this is set to the special value 0xffffffff (32-bit machines) or |
| 200 | 0xffffffffffffffff (64-bit machines) then |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 201 | the fdt will not be copied at all on boot. For this |
| 202 | to work it must reside in writable memory, have |
| 203 | sufficient padding on the end of it for u-boot to |
| 204 | add the information it needs into it, and the memory |
| 205 | must be accessible by the kernel. |
| 206 | |
| 207 | fdtcontroladdr |
| 208 | if set this is the address of the control flattened |
| 209 | device tree used by U-Boot when CONFIG_OF_CONTROL is |
| 210 | defined. |
| 211 | |
| 212 | initrd_high |
| 213 | restrict positioning of initrd images: |
| 214 | If this variable is not set, initrd images will be |
| 215 | copied to the highest possible address in RAM; this |
| 216 | is usually what you want since it allows for |
| 217 | maximum initrd size. If for some reason you want to |
| 218 | make sure that the initrd image is loaded below the |
| 219 | CONFIG_SYS_BOOTMAPSZ limit, you can set this environment |
| 220 | variable to a value of "no" or "off" or "0". |
| 221 | Alternatively, you can set it to a maximum upper |
| 222 | address to use (U-Boot will still check that it |
| 223 | does not overwrite the U-Boot stack and data). |
| 224 | |
| 225 | For instance, when you have a system with 16 MB |
| 226 | RAM, and want to reserve 4 MB from use by Linux, |
| 227 | you can do this by adding "mem=12M" to the value of |
| 228 | the "bootargs" variable. However, now you must make |
| 229 | sure that the initrd image is placed in the first |
| 230 | 12 MB as well - this can be done with:: |
| 231 | |
| 232 | setenv initrd_high 00c00000 |
| 233 | |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 234 | If you set initrd_high to 0xffffffff (32-bit machines) or |
| 235 | 0xffffffffffffffff (64-bit machines), this is an |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 236 | indication to U-Boot that all addresses are legal |
| 237 | for the Linux kernel, including addresses in flash |
| 238 | memory. In this case U-Boot will NOT COPY the |
| 239 | ramdisk at all. This may be useful to reduce the |
| 240 | boot time on your system, but requires that this |
| 241 | feature is supported by your Linux kernel. |
| 242 | |
| 243 | ipaddr |
| 244 | IP address; needed for tftpboot command |
| 245 | |
| 246 | loadaddr |
| 247 | Default load address for commands like "bootp", |
| 248 | "rarpboot", "tftpboot", "loadb" or "diskboot" |
| 249 | |
| 250 | loads_echo |
| 251 | see CONFIG_LOADS_ECHO |
| 252 | |
| 253 | serverip |
| 254 | TFTP server IP address; needed for tftpboot command |
| 255 | |
| 256 | bootretry |
| 257 | see CONFIG_BOOT_RETRY_TIME |
| 258 | |
| 259 | bootdelaykey |
| 260 | see CONFIG_AUTOBOOT_DELAY_STR |
| 261 | |
| 262 | bootstopkey |
| 263 | see CONFIG_AUTOBOOT_STOP_STR |
| 264 | |
| 265 | ethprime |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 266 | controls which network interface is used first. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 267 | |
| 268 | ethact |
| 269 | controls which interface is currently active. |
| 270 | For example you can do the following:: |
| 271 | |
| 272 | => setenv ethact FEC |
| 273 | => ping 192.168.0.1 # traffic sent on FEC |
| 274 | => setenv ethact SCC |
| 275 | => ping 10.0.0.1 # traffic sent on SCC |
| 276 | |
| 277 | ethrotate |
| 278 | When set to "no" U-Boot does not go through all |
| 279 | available network interfaces. |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 280 | It just stays at the currently selected interface. When unset or set to |
| 281 | anything other than "no", U-Boot does go through all |
| 282 | available network interfaces. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 283 | |
| 284 | netretry |
| 285 | When set to "no" each network operation will |
| 286 | either succeed or fail without retrying. |
| 287 | When set to "once" the network operation will |
| 288 | fail when all the available network interfaces |
| 289 | are tried once without success. |
| 290 | Useful on scripts which control the retry operation |
| 291 | themselves. |
| 292 | |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 293 | silent_linux |
| 294 | If set then Linux will be told to boot silently, by |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 295 | adding 'console=' to its command line. If "yes" it will be |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 296 | made silent. If "no" it will not be made silent. If |
| 297 | unset, then it will be made silent if the U-Boot console |
| 298 | is silent. |
| 299 | |
| 300 | tftpsrcp |
| 301 | If this is set, the value is used for TFTP's |
| 302 | UDP source port. |
| 303 | |
| 304 | tftpdstp |
| 305 | If this is set, the value is used for TFTP's UDP |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 306 | destination port instead of the default port 69. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 307 | |
| 308 | tftpblocksize |
| 309 | Block size to use for TFTP transfers; if not set, |
| 310 | we use the TFTP server's default block size |
| 311 | |
| 312 | tftptimeout |
| 313 | Retransmission timeout for TFTP packets (in milli- |
| 314 | seconds, minimum value is 1000 = 1 second). Defines |
| 315 | when a packet is considered to be lost so it has to |
| 316 | be retransmitted. The default is 5000 = 5 seconds. |
| 317 | Lowering this value may make downloads succeed |
| 318 | faster in networks with high packet loss rates or |
| 319 | with unreliable TFTP servers. |
| 320 | |
| 321 | tftptimeoutcountmax |
| 322 | maximum count of TFTP timeouts (no |
| 323 | unit, minimum value = 0). Defines how many timeouts |
| 324 | can happen during a single file transfer before that |
| 325 | transfer is aborted. The default is 10, and 0 means |
| 326 | 'no timeouts allowed'. Increasing this value may help |
| 327 | downloads succeed with high packet loss rates, or with |
| 328 | unreliable TFTP servers or client hardware. |
| 329 | |
| 330 | tftpwindowsize |
| 331 | if this is set, the value is used for TFTP's |
| 332 | window size as described by RFC 7440. |
| 333 | This means the count of blocks we can receive before |
| 334 | sending ack to server. |
| 335 | |
| 336 | vlan |
| 337 | When set to a value < 4095 the traffic over |
| 338 | Ethernet is encapsulated/received over 802.1q |
| 339 | VLAN tagged frames. |
| 340 | |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 341 | Note: This appears not to be used in U-Boot. See `README.VLAN`. |
| 342 | |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 343 | bootpretryperiod |
| 344 | Period during which BOOTP/DHCP sends retries. |
| 345 | Unsigned value, in milliseconds. If not set, the period will |
| 346 | be either the default (28000), or a value based on |
| 347 | CONFIG_NET_RETRY_COUNT, if defined. This value has |
| 348 | precedence over the valu based on CONFIG_NET_RETRY_COUNT. |
| 349 | |
| 350 | memmatches |
| 351 | Number of matches found by the last 'ms' command, in hex |
| 352 | |
| 353 | memaddr |
| 354 | Address of the last match found by the 'ms' command, in hex, |
| 355 | or 0 if none |
| 356 | |
| 357 | mempos |
| 358 | Index position of the last match found by the 'ms' command, |
| 359 | in units of the size (.b, .w, .l) of the search |
| 360 | |
| 361 | zbootbase |
| 362 | (x86 only) Base address of the bzImage 'setup' block |
| 363 | |
| 364 | zbootaddr |
| 365 | (x86 only) Address of the loaded bzImage, typically |
| 366 | BZIMAGE_LOAD_ADDR which is 0x100000 |
| 367 | |
| 368 | |
| 369 | Image locations |
| 370 | --------------- |
| 371 | |
| 372 | The following image location variables contain the location of images |
| 373 | used in booting. The "Image" column gives the role of the image and is |
| 374 | not an environment variable name. The other columns are environment |
| 375 | variable names. "File Name" gives the name of the file on a TFTP |
| 376 | server, "RAM Address" gives the location in RAM the image will be |
| 377 | loaded to, and "Flash Location" gives the image's address in NOR |
| 378 | flash or offset in NAND flash. |
| 379 | |
| 380 | *Note* - these variables don't have to be defined for all boards, some |
| 381 | boards currently use other variables for these purposes, and some |
| 382 | boards use these variables for other purposes. |
| 383 | |
Simon Glass | 341c7ea | 2021-10-21 21:08:49 -0600 | [diff] [blame] | 384 | Also note that most of these variables are just a commonly used set of variable |
| 385 | names, used in some other variable definitions, but are not hard-coded anywhere |
| 386 | in U-Boot code. |
| 387 | |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 388 | ================= ============== ================ ============== |
| 389 | Image File Name RAM Address Flash Location |
| 390 | ================= ============== ================ ============== |
| 391 | u-boot u-boot u-boot_addr_r u-boot_addr |
| 392 | Linux kernel bootfile kernel_addr_r kernel_addr |
| 393 | device tree blob fdtfile fdt_addr_r fdt_addr |
| 394 | ramdisk ramdiskfile ramdisk_addr_r ramdisk_addr |
| 395 | ================= ============== ================ ============== |
| 396 | |
| 397 | |
| 398 | Automatically updated variables |
| 399 | ------------------------------- |
| 400 | |
| 401 | The following environment variables may be used and automatically |
| 402 | updated by the network boot commands ("bootp" and "rarpboot"), |
| 403 | depending the information provided by your boot server: |
| 404 | |
| 405 | ========= =================================================== |
| 406 | Variable Notes |
| 407 | ========= =================================================== |
| 408 | bootfile see above |
| 409 | dnsip IP address of your Domain Name Server |
| 410 | dnsip2 IP address of your secondary Domain Name Server |
| 411 | gatewayip IP address of the Gateway (Router) to use |
| 412 | hostname Target hostname |
| 413 | ipaddr See above |
| 414 | netmask Subnet Mask |
| 415 | rootpath Pathname of the root filesystem on the NFS server |
| 416 | serverip see above |
| 417 | ========= =================================================== |
| 418 | |
| 419 | |
| 420 | Special environment variables |
| 421 | ----------------------------- |
| 422 | |
| 423 | There are two special Environment Variables: |
| 424 | |
| 425 | serial# |
| 426 | contains hardware identification information such as type string and/or |
| 427 | serial number |
| 428 | ethaddr |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 429 | Ethernet address. If CONFIG_REGEX=y, also eth*addr (where * is an integer). |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 430 | |
| 431 | These variables can be set only once (usually during manufacturing of |
| 432 | the board). U-Boot refuses to delete or overwrite these variables |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 433 | once they have been set, unless CONFIG_ENV_OVERWRITE is enabled in the board |
| 434 | configuration. |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 435 | |
| 436 | Also: |
| 437 | |
| 438 | ver |
| 439 | Contains the U-Boot version string as printed |
| 440 | with the "version" command. This variable is |
| 441 | readonly (see CONFIG_VERSION_VARIABLE). |
| 442 | |
| 443 | Please note that changes to some configuration parameters may take |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 444 | only effect after the next boot (yes, that's just like Windows). |
Simon Glass | aef523a | 2021-10-21 21:08:45 -0600 | [diff] [blame] | 445 | |
Simon Glass | 9f3a7bf | 2021-10-21 21:08:48 -0600 | [diff] [blame] | 446 | |
| 447 | External environment file |
| 448 | ------------------------- |
| 449 | |
| 450 | The `CONFIG_USE_DEFAULT_ENV_FILE` option provides a way to bypass the |
| 451 | environment generation in U-Boot. If enabled, then `CONFIG_DEFAULT_ENV_FILE` |
| 452 | provides the name of a file which is converted into the environment, |
| 453 | completely bypassing the standard environment variables in `env_default.h`. |
| 454 | |
| 455 | The format is the same as accepted by the mkenvimage tool, with lines containing |
| 456 | key=value pairs. Blank lines and lines beginning with # are ignored. |
| 457 | |
| 458 | Future work may unify this feature with the text-based environment, perhaps |
| 459 | moving the contents of `env_default.h` to a text file. |
Simon Glass | 420febd | 2021-10-21 21:08:50 -0600 | [diff] [blame] | 460 | |
| 461 | Implementation |
| 462 | -------------- |
| 463 | |
| 464 | See :doc:`../develop/environment` for internal development details. |