blob: 5329f7585be5c96376e39f4ec296daeea5543c77 [file] [log] [blame]
Simon Glass0649cd02017-08-03 12:21:49 -06001menu "Environment"
2
Rasmus Villemoesc8221682019-12-15 22:29:39 +00003config ENV_SUPPORT
4 def_bool y
5
Simon Glass86b9c3e2021-10-21 21:08:46 -06006config ENV_SOURCE_FILE
7 string "Environment file to use"
8 default ""
9 help
10 This sets the basename to use to generate the default environment.
11 This a text file as described in doc/usage/environment.rst
12
13 The file must be in the board directory and have a .env extension, so
14 the resulting filename is typically
15 board/<vendor>/<board>/<CONFIG_ENV_SOURCE_FILE>.env
16
17 If the file is not present, an error is produced.
18
19 If this CONFIG is empty, U-Boot uses CONFIG SYS_BOARD as a default, if
20 the file board/<vendor>/<board>/<SYS_BOARD>.env exists. Otherwise the
21 environment is assumed to come from the ad-hoc
22 CONFIG_EXTRA_ENV_SETTINGS #define
23
Rasmus Villemoes1d0adee2020-02-19 09:47:39 +000024config SAVEENV
25 def_bool y if CMD_SAVEENV
26
Adam Forde91907a2020-07-03 06:48:56 -050027config ENV_OVERWRITE
28 bool "Enable overwriting environment"
29 help
30 Use this to permit overriding of certain environmental variables
31 like Ethernet and Serial
32
Tom Rini82e0b512022-06-12 20:01:58 -040033config ENV_MIN_ENTRIES
34 int "Minimum number of entries in the environment hashtable"
35 default 64
36 help
37 Minimum number of entries in the hash table that is used internally
38 to store the environment settings.
39
40config ENV_MAX_ENTRIES
41 int "Maximumm number of entries in the environment hashtable"
42 default 512
43 help
44 Maximum number of entries in the hash table that is used internally
45 to store the environment settings. The default setting is supposed to
46 be generous and should work in most cases. This setting can be used
47 to tune behaviour; see lib/hashtable.c for details.
48
Simon Glassc1c3fe22017-08-03 12:21:59 -060049config ENV_IS_NOWHERE
50 bool "Environment is not stored"
Patrice Chotard208bd2b2019-05-07 11:24:02 +020051 default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
52 !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \
53 !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
54 !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
55 !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
56 !ENV_IS_IN_UBI
Simon Glassc1c3fe22017-08-03 12:21:59 -060057 help
58 Define this if you don't want to or can't have an environment stored
Shyam Saini919d25c2018-06-07 19:47:19 +053059 on a storage medium. In this case the environment will still exist
Simon Glassc1c3fe22017-08-03 12:21:59 -060060 while U-Boot is running, but once U-Boot exits it will not be
61 stored. U-Boot will therefore always start up with a default
62 environment.
63
Simon Glass0649cd02017-08-03 12:21:49 -060064config ENV_IS_IN_EEPROM
65 bool "Environment in EEPROM"
66 depends on !CHAIN_OF_TRUST
67 help
68 Use this if you have an EEPROM or similar serial access
69 device and a driver for it.
70
71 - CONFIG_ENV_OFFSET:
72 - CONFIG_ENV_SIZE:
73
74 These two #defines specify the offset and size of the
75 environment area within the total memory of your EEPROM.
76
Simon Glass0649cd02017-08-03 12:21:49 -060077 Note that we consider the length of the address field to
78 still be one byte because the extra address bits are hidden
79 in the chip address.
80
Simon Glass0649cd02017-08-03 12:21:49 -060081 - CONFIG_I2C_ENV_EEPROM_BUS
82 if you have an Environment on an EEPROM reached over
83 I2C muxes, you can define here, how to reach this
84 EEPROM. For example:
85
86 #define CONFIG_I2C_ENV_EEPROM_BUS 1
87
88 EEPROM which holds the environment, is reached over
89 a pca9547 i2c mux with address 0x70, channel 3.
90
91config ENV_IS_IN_FAT
92 bool "Environment is in a FAT filesystem"
93 depends on !CHAIN_OF_TRUST
Maxime Ripardfb694642018-01-23 21:17:01 +010094 default y if ARCH_BCM283X
Maxime Ripard0163c912018-01-23 21:17:04 +010095 default y if ARCH_SUNXI && MMC
Maxime Ripardfb694642018-01-23 21:17:01 +010096 default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
Tuomas Tynkkynen3cd084d2018-01-05 02:45:19 +020097 select FS_FAT
Simon Glass0649cd02017-08-03 12:21:49 -060098 select FAT_WRITE
99 help
Simon Glass91d3aa02017-08-03 12:21:50 -0600100 Define this if you want to use the FAT file system for the environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600101
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100102config ENV_IS_IN_EXT4
103 bool "Environment is in a EXT4 filesystem"
104 depends on !CHAIN_OF_TRUST
Michal Simek07661782020-08-19 10:44:23 +0200105 select FS_EXT4
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100106 select EXT4_WRITE
107 help
108 Define this if you want to use the EXT4 file system for the environment.
109
Simon Glass0649cd02017-08-03 12:21:49 -0600110config ENV_IS_IN_FLASH
111 bool "Environment in flash memory"
112 depends on !CHAIN_OF_TRUST
Maxime Ripardfb694642018-01-23 21:17:01 +0100113 default y if ARCH_CINTEGRATOR
114 default y if ARCH_INTEGRATOR_CP
Tom Rini9b7993b2021-05-14 21:34:10 -0400115 default y if M548x || M547x || M5282
Maxime Ripardfb694642018-01-23 21:17:01 +0100116 default y if MCF532x || MCF52x2
117 default y if MPC86xx || MPC83xx
Tom Rini1c588572021-05-14 21:34:26 -0400118 default y if ARCH_MPC8548
Maxime Ripardfb694642018-01-23 21:17:01 +0100119 default y if SH && !CPU_SH4
Simon Glass0649cd02017-08-03 12:21:49 -0600120 help
121 Define this if you have a flash device which you want to use for the
122 environment.
123
124 a) The environment occupies one whole flash sector, which is
125 "embedded" in the text segment with the U-Boot code. This
126 happens usually with "bottom boot sector" or "top boot
127 sector" type flash chips, which have several smaller
128 sectors at the start or the end. For instance, such a
129 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
130 such a case you would place the environment in one of the
131 4 kB sectors - with U-Boot code before and after it. With
132 "top boot sector" type flash chips, you would put the
133 environment in one of the last sectors, leaving a gap
134 between U-Boot and the environment.
135
136 CONFIG_ENV_OFFSET:
137
138 Offset of environment data (variable area) to the
139 beginning of flash memory; for instance, with bottom boot
140 type flash chips the second sector can be used: the offset
141 for this sector is given here.
142
143 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
144
145 CONFIG_ENV_ADDR:
146
147 This is just another way to specify the start address of
148 the flash sector containing the environment (instead of
149 CONFIG_ENV_OFFSET).
150
151 CONFIG_ENV_SECT_SIZE:
152
153 Size of the sector containing the environment.
154
155
156 b) Sometimes flash chips have few, equal sized, BIG sectors.
157 In such a case you don't want to spend a whole sector for
158 the environment.
159
160 CONFIG_ENV_SIZE:
161
162 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
163 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
164 of this flash sector for the environment. This saves
165 memory for the RAM copy of the environment.
166
167 It may also save flash memory if you decide to use this
168 when your environment is "embedded" within U-Boot code,
169 since then the remainder of the flash sector could be used
170 for U-Boot code. It should be pointed out that this is
171 STRONGLY DISCOURAGED from a robustness point of view:
172 updating the environment in flash makes it always
173 necessary to erase the WHOLE sector. If something goes
174 wrong before the contents has been restored from a copy in
175 RAM, your target system will be dead.
176
177 CONFIG_ENV_ADDR_REDUND
Simon Glass0649cd02017-08-03 12:21:49 -0600178
179 These settings describe a second storage area used to hold
180 a redundant copy of the environment data, so that there is
181 a valid backup copy in case there is a power failure during
182 a "saveenv" operation.
183
184 BE CAREFUL! Any changes to the flash layout, and some changes to the
185 source code will make it necessary to adapt <board>/u-boot.lds*
186 accordingly!
187
188config ENV_IS_IN_MMC
189 bool "Environment in an MMC device"
190 depends on !CHAIN_OF_TRUST
Maxime Ripardd282a1d2018-01-23 21:17:00 +0100191 depends on MMC
Maxime Ripardfb694642018-01-23 21:17:01 +0100192 default y if ARCH_EXYNOS4
193 default y if MX6SX || MX7D
194 default y if TEGRA30 || TEGRA124
195 default y if TEGRA_ARMV8_COMMON
Simon Glass0649cd02017-08-03 12:21:49 -0600196 help
197 Define this if you have an MMC device which you want to use for the
198 environment.
199
200 CONFIG_SYS_MMC_ENV_DEV:
201
202 Specifies which MMC device the environment is stored in.
203
204 CONFIG_SYS_MMC_ENV_PART (optional):
205
206 Specifies which MMC partition the environment is stored in. If not
207 set, defaults to partition 0, the user area. Common values might be
208 1 (first MMC boot partition), 2 (second MMC boot partition).
209
210 CONFIG_ENV_OFFSET:
211 CONFIG_ENV_SIZE:
212
213 These two #defines specify the offset and size of the environment
214 area within the specified MMC device.
215
216 If offset is positive (the usual case), it is treated as relative to
217 the start of the MMC partition. If offset is negative, it is treated
218 as relative to the end of the MMC partition. This can be useful if
219 your board may be fitted with different MMC devices, which have
220 different sizes for the MMC partitions, and you always want the
221 environment placed at the very end of the partition, to leave the
222 maximum possible space before it, to store other data.
223
224 These two values are in units of bytes, but must be aligned to an
225 MMC sector boundary.
226
227 CONFIG_ENV_OFFSET_REDUND (optional):
228
229 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
230 hold a redundant copy of the environment data. This provides a
231 valid backup copy in case the other copy is corrupted, e.g. due
232 to a power failure during a "saveenv" operation.
233
234 This value may also be positive or negative; this is handled in the
235 same way as CONFIG_ENV_OFFSET.
236
Marek Vasutd11d1be2021-10-17 19:23:36 +0200237 In case CONFIG_SYS_MMC_ENV_PART is 1 (i.e. environment in eMMC boot
238 partition) then setting CONFIG_ENV_OFFSET_REDUND to the same value
239 as CONFIG_ENV_OFFSET makes use of the second eMMC boot partition for
240 the redundant environment copy.
241
Simon Glass0649cd02017-08-03 12:21:49 -0600242 This value is also in units of bytes, but must also be aligned to
243 an MMC sector boundary.
244
Simon Glass0649cd02017-08-03 12:21:49 -0600245config ENV_IS_IN_NAND
246 bool "Environment in a NAND device"
247 depends on !CHAIN_OF_TRUST
248 help
249 Define this if you have a NAND device which you want to use for the
250 environment.
251
252 - CONFIG_ENV_OFFSET:
253 - CONFIG_ENV_SIZE:
254
255 These two #defines specify the offset and size of the environment
256 area within the first NAND device. CONFIG_ENV_OFFSET must be
257 aligned to an erase block boundary.
258
259 - CONFIG_ENV_OFFSET_REDUND (optional):
260
261 This setting describes a second storage area of CONFIG_ENV_SIZE
262 size used to hold a redundant copy of the environment data, so
263 that there is a valid backup copy in case there is a power failure
264 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
265 aligned to an erase block boundary.
266
Simon Glass0649cd02017-08-03 12:21:49 -0600267 - CONFIG_ENV_OFFSET_OOB (optional):
268
269 Enables support for dynamically retrieving the offset of the
270 environment from block zero's out-of-band data. The
271 "nand env.oob" command can be used to record this offset.
272 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
273 using CONFIG_ENV_OFFSET_OOB.
274
Tom Rini5d7dea12022-06-13 22:57:33 -0400275config ENV_RANGE
276 hex "Length of the region in which the environment can be written"
277 depends on ENV_IS_IN_NAND
278 range ENV_SIZE 0x7fffffff
279 default ENV_SIZE
280 help
281 This should be a multiple of the NAND device's block size.
282 Specifying a range with more erase blocks than are needed to hold
283 CONFIG_ENV_SIZE allows bad blocks within the range to be avoided.
284
Simon Glass0649cd02017-08-03 12:21:49 -0600285config ENV_IS_IN_NVRAM
286 bool "Environment in a non-volatile RAM"
287 depends on !CHAIN_OF_TRUST
288 help
289 Define this if you have some non-volatile memory device
290 (NVRAM, battery buffered SRAM) which you want to use for the
291 environment.
292
293 - CONFIG_ENV_ADDR:
294 - CONFIG_ENV_SIZE:
295
296 These two #defines are used to determine the memory area you
297 want to use for environment. It is assumed that this memory
298 can just be read and written to, without any special
299 provision.
300
301config ENV_IS_IN_ONENAND
302 bool "Environment is in OneNAND"
303 depends on !CHAIN_OF_TRUST
304 help
305 Define this if you want to put your local device's environment in
306 OneNAND.
307
308 - CONFIG_ENV_ADDR:
309 - CONFIG_ENV_SIZE:
310
311 These two #defines are used to determine the device range you
312 want to use for environment. It is assumed that this memory
313 can just be read and written to, without any special
314 provision.
315
316config ENV_IS_IN_REMOTE
Heinrich Schuchardt646f1ab2018-03-17 22:53:11 +0000317 bool "Environment is in remote memory space"
Simon Glass0649cd02017-08-03 12:21:49 -0600318 depends on !CHAIN_OF_TRUST
319 help
320 Define this if you have a remote memory space which you
321 want to use for the local device's environment.
322
323 - CONFIG_ENV_ADDR:
324 - CONFIG_ENV_SIZE:
325
326 These two #defines specify the address and size of the
327 environment area within the remote memory space. The
328 local device can get the environment from remote memory
329 space by SRIO or PCIE links.
330
331config ENV_IS_IN_SPI_FLASH
332 bool "Environment is in SPI flash"
Tom Rinia4298dd2019-05-29 17:01:28 -0400333 depends on !CHAIN_OF_TRUST && SPI
Maxime Ripardfb694642018-01-23 21:17:01 +0100334 default y if ARMADA_XP
335 default y if INTEL_BAYTRAIL
336 default y if INTEL_BRASWELL
337 default y if INTEL_BROADWELL
338 default y if NORTHBRIDGE_INTEL_IVYBRIDGE
339 default y if INTEL_QUARK
340 default y if INTEL_QUEENSBAY
Andre Przywara753a85f2022-01-11 12:46:05 +0000341 default y if ARCH_SUNXI
Simon Glass0649cd02017-08-03 12:21:49 -0600342 help
343 Define this if you have a SPI Flash memory device which you
344 want to use for the environment.
345
346 - CONFIG_ENV_OFFSET:
347 - CONFIG_ENV_SIZE:
348
349 These two #defines specify the offset and size of the
350 environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
351 aligned to an erase sector boundary.
352
353 - CONFIG_ENV_SECT_SIZE:
354
355 Define the SPI flash's sector size.
356
357 - CONFIG_ENV_OFFSET_REDUND (optional):
358
359 This setting describes a second storage area of CONFIG_ENV_SIZE
360 size used to hold a redundant copy of the environment data, so
361 that there is a valid backup copy in case there is a power failure
362 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
363 aligned to an erase sector boundary.
364
Rasmus Villemoesbcb44f62021-04-14 20:51:43 +0200365config ENV_SECT_SIZE_AUTO
366 bool "Use automatically detected sector size"
367 depends on ENV_IS_IN_SPI_FLASH
368 help
369 Some boards exist in multiple variants, with different
370 flashes having different sector sizes. In such cases, you
371 can select this option to make U-Boot use the actual sector
372 size when figuring out how much to erase, which can thus be
373 more efficient on the flashes with smaller erase size. Since
374 the environment must always be aligned on a sector boundary,
375 CONFIG_ENV_OFFSET must be aligned to the largest of the
376 different sector sizes, and CONFIG_ENV_SECT_SIZE should be
377 set to that value.
378
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100379config ENV_SPI_BUS
380 int "Value of SPI flash bus for environment"
Tom Rini7e6a6fd2021-12-11 14:55:48 -0500381 depends on ENV_IS_IN_SPI_FLASH
382 default SF_DEFAULT_BUS
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100383 help
384 Value the SPI bus and chip select for environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600385
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100386config ENV_SPI_CS
387 int "Value of SPI flash chip select for environment"
Tom Rini7e6a6fd2021-12-11 14:55:48 -0500388 depends on ENV_IS_IN_SPI_FLASH
389 default SF_DEFAULT_CS
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100390 help
391 Value of the SPI chip select for environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600392
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100393config ENV_SPI_MAX_HZ
Marek Vasutdd309612019-05-04 19:10:05 +0200394 int "Value of SPI flash max frequency for environment"
Tom Rini7e6a6fd2021-12-11 14:55:48 -0500395 depends on ENV_IS_IN_SPI_FLASH
396 default SF_DEFAULT_SPEED
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100397 help
398 Value of the SPI max work clock for environment.
399
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100400config ENV_SPI_MODE
401 hex "Value of SPI flash work mode for environment"
Tom Rini7e6a6fd2021-12-11 14:55:48 -0500402 depends on ENV_IS_IN_SPI_FLASH
403 default SF_DEFAULT_MODE
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100404 help
405 Value of the SPI work mode for environment.
406 See include/spi.h for value.
Simon Glass0649cd02017-08-03 12:21:49 -0600407
Heiko Schocher92765f452020-10-10 10:28:05 +0200408config ENV_SPI_EARLY
409 bool "Access Environment in SPI flashes before relocation"
410 depends on ENV_IS_IN_SPI_FLASH
411 help
412 Enable this if you want to use Environment in SPI flash
413 before relocation. Call env_init() and than you can use
414 env_get_f() for accessing Environment variables.
415
Simon Glass0649cd02017-08-03 12:21:49 -0600416config ENV_IS_IN_UBI
417 bool "Environment in a UBI volume"
418 depends on !CHAIN_OF_TRUST
Miquel Raynal00e27042019-10-03 19:50:12 +0200419 depends on MTD_UBI
420 depends on CMD_UBI
Simon Glass0649cd02017-08-03 12:21:49 -0600421 help
422 Define this if you have an UBI volume that you want to use for the
423 environment. This has the benefit of wear-leveling the environment
424 accesses, which is important on NAND.
425
426 - CONFIG_ENV_UBI_PART:
427
428 Define this to a string that is the mtd partition containing the UBI.
429
430 - CONFIG_ENV_UBI_VOLUME:
431
432 Define this to the name of the volume that you want to store the
433 environment in.
434
435 - CONFIG_ENV_UBI_VOLUME_REDUND:
436
437 Define this to the name of another volume to store a second copy of
438 the environment in. This will enable redundant environments in UBI.
439 It is assumed that both volumes are in the same MTD partition.
440
Tom Rinicb6617a2019-11-10 11:28:03 -0500441config SYS_REDUNDAND_ENVIRONMENT
442 bool "Enable redundant environment support"
Tom Rinicb6617a2019-11-10 11:28:03 -0500443 help
444 Normally, the environemt is stored in a single location. By
445 selecting this option, you can then define where to hold a redundant
446 copy of the environment data, so that there is a valid backup copy in
447 case there is a power failure during a "saveenv" operation.
Michal Simek4e3fc5e2021-01-13 10:25:50 +0100448 Also this config changes the binary environment structure handling
449 which is used by env import/export commands which are independent of
450 storing variables to redundant location on a non volatile device.
Tom Rinicb6617a2019-11-10 11:28:03 -0500451
Simon Glass0649cd02017-08-03 12:21:49 -0600452config ENV_FAT_INTERFACE
453 string "Name of the block device for the environment"
454 depends on ENV_IS_IN_FAT
Michal Simek8d782112020-02-25 15:50:33 +0100455 default "mmc"
Simon Glass0649cd02017-08-03 12:21:49 -0600456 help
457 Define this to a string that is the name of the block device.
458
459config ENV_FAT_DEVICE_AND_PART
460 string "Device and partition for where to store the environemt in FAT"
461 depends on ENV_IS_IN_FAT
462 default "0:1" if TI_COMMON_CMD_OPTIONS
Ashok Reddy Soma4fb83c92021-02-23 08:07:46 -0700463 default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
Samuel Holland1011ebc2021-04-18 22:16:21 -0500464 default ":auto" if ARCH_SUNXI
Simon Glass0649cd02017-08-03 12:21:49 -0600465 default "0" if ARCH_AT91
466 help
467 Define this to a string to specify the partition of the device. It can
468 be as following:
469
470 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
471 - "D:P": device D partition P. Error occurs if device D has no
472 partition table.
473 - "D:0": device D.
474 - "D" or "D:": device D partition 1 if device D has partition
475 table, or the whole device D if has no partition
476 table.
477 - "D:auto": first partition in device D with bootable flag set.
478 If none, first valid partition in device D. If no
479 partition table then means device D.
480
David Woodhouse6731bef2020-06-19 23:07:17 +0100481 If ENV_FAT_INTERFACE is set to "mmc" then device 'D' can be omitted,
482 leaving the string starting with a colon, and the boot device will
483 be used.
484
Simon Glass0649cd02017-08-03 12:21:49 -0600485config ENV_FAT_FILE
Shyam Saini919d25c2018-06-07 19:47:19 +0530486 string "Name of the FAT file to use for the environment"
Simon Glass0649cd02017-08-03 12:21:49 -0600487 depends on ENV_IS_IN_FAT
488 default "uboot.env"
489 help
490 It's a string of the FAT file name. This file use to store the
491 environment.
492
Brandon Maier2339f012021-01-16 15:14:43 -0600493config ENV_FAT_FILE_REDUND
494 string "Name of the FAT file to use for the environment"
495 depends on ENV_IS_IN_FAT && SYS_REDUNDAND_ENVIRONMENT
496 default "uboot-redund.env"
497 help
498 It's a string of the FAT file name. This file use to store the
499 redundant environment.
500
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100501config ENV_EXT4_INTERFACE
502 string "Name of the block device for the environment"
503 depends on ENV_IS_IN_EXT4
504 help
505 Define this to a string that is the name of the block device.
506
507config ENV_EXT4_DEVICE_AND_PART
508 string "Device and partition for where to store the environemt in EXT4"
509 depends on ENV_IS_IN_EXT4
510 help
511 Define this to a string to specify the partition of the device. It can
512 be as following:
513
514 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
515 - "D:P": device D partition P. Error occurs if device D has no
516 partition table.
517 - "D:0": device D.
518 - "D" or "D:": device D partition 1 if device D has partition
519 table, or the whole device D if has no partition
520 table.
521 - "D:auto": first partition in device D with bootable flag set.
522 If none, first valid partition in device D. If no
523 partition table then means device D.
524
David Woodhouseb0493bb2020-08-04 10:05:47 +0100525 If ENV_EXT4_INTERFACE is set to "mmc" then device 'D' can be omitted,
526 leaving the string starting with a colon, and the boot device will
527 be used.
528
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100529config ENV_EXT4_FILE
Shyam Saini919d25c2018-06-07 19:47:19 +0530530 string "Name of the EXT4 file to use for the environment"
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100531 depends on ENV_IS_IN_EXT4
Patrick Delaunay87dac742020-07-28 11:51:14 +0200532 default "/uboot.env"
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100533 help
534 It's a string of the EXT4 file name. This file use to store the
535 environment (explicit path to the file)
536
Tom Rinia09fea12019-11-18 20:02:10 -0500537config ENV_ADDR
538 hex "Environment address"
539 depends on ENV_IS_IN_FLASH || ENV_IS_IN_NVRAM || ENV_IS_IN_ONENAND || \
540 ENV_IS_IN_REMOTE || ENV_IS_IN_SPI_FLASH
541 default 0x0 if ENV_IS_IN_SPI_FLASH
542 help
543 Offset from the start of the device (or partition)
544
545config ENV_ADDR_REDUND
546 hex "Redundant environment address"
547 depends on ENV_IS_IN_FLASH && SYS_REDUNDAND_ENVIRONMENT
548 help
549 Offset from the start of the device (or partition) of the redundant
550 environment location.
Simon Glass0649cd02017-08-03 12:21:49 -0600551
552config ENV_OFFSET
Tom Rinia09fea12019-11-18 20:02:10 -0500553 hex "Environment offset"
554 depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
555 ENV_IS_IN_SPI_FLASH
Jagan Tekid7b433e2019-12-21 13:24:35 +0530556 default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki54b85a92019-12-21 13:24:36 +0530557 default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Andre Przywara2bdf2132022-01-11 12:46:03 +0000558 default 0xF0000 if ARCH_SUNXI
Michal Simek4aee6242018-07-19 08:45:45 +0200559 default 0xE0000 if ARCH_ZYNQ
560 default 0x1E00000 if ARCH_ZYNQMP
T Karthik Reddyf8c0f9f2019-08-05 16:18:57 +0530561 default 0x7F40000 if ARCH_VERSAL
Alexey Brodkin70b5ea72019-01-15 11:42:48 +0300562 default 0 if ARC
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200563 default 0x140000 if ARCH_AT91
564 default 0x260000 if ARCH_OMAP2PLUS
Varalaxmi Bingi63e988e2020-02-05 03:58:20 -0700565 default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Simon Glass0649cd02017-08-03 12:21:49 -0600566 help
567 Offset from the start of the device (or partition)
568
Tom Rinia09fea12019-11-18 20:02:10 -0500569config ENV_OFFSET_REDUND
570 hex "Redundant environment offset"
571 depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
572 ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT
T Karthik Reddyce880862022-08-24 13:23:26 +0200573 default 0x10C0000 if MICROBLAZE
Michal Simekec217212021-02-24 10:33:45 +0100574 default 0
Tom Rinia09fea12019-11-18 20:02:10 -0500575 help
576 Offset from the start of the device (or partition) of the redundant
577 environment location.
578
Simon Glass0649cd02017-08-03 12:21:49 -0600579config ENV_SIZE
580 hex "Environment Size"
Michal Simek4aee6242018-07-19 08:45:45 +0200581 default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
Andre Przywara2bdf2132022-01-11 12:46:03 +0000582 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
583 default 0x10000 if ARCH_SUNXI
Jagan Tekid7b433e2019-12-21 13:24:35 +0530584 default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki54b85a92019-12-21 13:24:36 +0530585 default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Jagan Tekid7b433e2019-12-21 13:24:35 +0530586 default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL
Alexey Brodkin70b5ea72019-01-15 11:42:48 +0300587 default 0x4000 if ARC
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200588 default 0x1f000
Simon Glass0649cd02017-08-03 12:21:49 -0600589 help
590 Size of the environment storage area
591
Michal Simek4aee6242018-07-19 08:45:45 +0200592config ENV_SECT_SIZE
593 hex "Environment Sector-Size"
Tom Rinia09fea12019-11-18 20:02:10 -0500594 depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
Jagan Teki54b85a92019-12-21 13:24:36 +0530595 default 0x2000 if ARCH_ROCKCHIP
T Karthik Reddyf8c0f9f2019-08-05 16:18:57 +0530596 default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200597 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Varalaxmi Bingi63e988e2020-02-05 03:58:20 -0700598 default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Andre Przywara2bdf2132022-01-11 12:46:03 +0000599 default 0x10000 if ARCH_SUNXI && ENV_IS_IN_SPI_FLASH
Michal Simek4aee6242018-07-19 08:45:45 +0200600 help
601 Size of the sector containing the environment.
602
Simon Glass0649cd02017-08-03 12:21:49 -0600603config ENV_UBI_PART
604 string "UBI partition name"
605 depends on ENV_IS_IN_UBI
606 help
607 MTD partition containing the UBI device
608
609config ENV_UBI_VOLUME
610 string "UBI volume name"
611 depends on ENV_IS_IN_UBI
612 help
613 Name of the volume that you want to store the environment in.
614
Markus Klotzbuecherff4818c2019-05-15 15:15:53 +0200615config ENV_UBI_VOLUME_REDUND
616 string "UBI redundant volume name"
Tom Rinicb6617a2019-11-10 11:28:03 -0500617 depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT
Markus Klotzbuecherff4818c2019-05-15 15:15:53 +0200618 help
619 Name of the redundant volume that you want to store the environment in.
620
Hamish Guthrie985186d2019-05-15 15:15:55 +0200621config ENV_UBI_VID_OFFSET
622 int "ubi environment VID offset"
623 depends on ENV_IS_IN_UBI
624 default 0
625 help
626 UBI VID offset for environment. If 0, no custom VID offset is used.
627
Tom Rini8d8ee472019-11-12 22:46:36 -0500628config SYS_RELOC_GD_ENV_ADDR
Patrick Delaunay35c26832020-06-10 19:28:42 +0200629 bool "Relocate gd->env_addr"
Tom Rini8d8ee472019-11-12 22:46:36 -0500630 help
631 Relocate the early env_addr pointer so we know it is not inside
632 the binary. Some systems need this and for the rest, it doesn't hurt.
633
Tom Rini7d080772020-07-24 17:14:47 -0400634config SYS_MMC_ENV_DEV
635 int "mmc device number"
636 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
Kuldeep Singh9b90e0d2021-08-10 11:20:06 +0530637 CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA
Tom Rini7d080772020-07-24 17:14:47 -0400638 default 0
639 help
640 MMC device number on the platform where the environment is stored.
641
642config SYS_MMC_ENV_PART
643 int "mmc partition number"
644 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
645 default 0
646 help
647 MMC hardware partition device number on the platform where the
648 environment is stored. Note that this is not related to any software
649 defined partition table but instead if we are in the user area, which is
650 partition 0 or the first boot partition, which is 1 or some other defined
651 partition.
652
Rasmus Villemoesf3d8f7d2018-03-20 11:38:45 +0100653config USE_DEFAULT_ENV_FILE
654 bool "Create default environment from file"
655 help
656 Normally, the default environment is automatically generated
657 based on the settings of various CONFIG_* options, as well
658 as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option,
659 you can instead define the entire default environment in an
660 external file.
661
662config DEFAULT_ENV_FILE
663 string "Path to default environment file"
664 depends on USE_DEFAULT_ENV_FILE
665 help
666 The path containing the default environment. The format is
667 the same as accepted by the mkenvimage tool: lines
668 containing key=value pairs, blank lines and lines beginning
669 with # are ignored.
670
Alex Kiernand9101302018-04-01 16:37:53 +0000671config ENV_VARS_UBOOT_RUNTIME_CONFIG
672 bool "Add run-time information to the environment"
673 help
674 Enable this in order to add variables describing certain
675 run-time determined information about the hardware to the
676 environment. These will be named board_name, board_rev.
677
Ovidiu Panaitb8879f22020-05-06 20:38:42 +0300678config DELAY_ENVIRONMENT
679 bool "Delay environment loading"
680 depends on !OF_CONTROL
681 help
682 Enable this to inhibit loading the environment during board
683 initialization. This can address the security risk of untrusted data
684 being used during boot. Normally the environment is loaded when the
685 board is initialised so that it is available to U-Boot. This inhibits
686 that so that the environment is not available until explicitly loaded
687 later by U-Boot code. With CONFIG_OF_CONTROL this is instead
688 controlled by the value of /config/load-environment.
689
Rasmus Villemoes95fd9772021-04-21 11:06:54 +0200690config ENV_IMPORT_FDT
691 bool "Amend environment by FDT properties"
692 depends on OF_CONTROL
693 help
694 If selected, after the environment has been loaded from its
695 persistent location, the "env_fdt_path" variable is looked
696 up and used as a path to a node in the control DTB. The
697 property/value pairs in that node is then used to update the
698 run-time environment. This can be useful to use the same
699 U-Boot binary with different board variants.
700
701config ENV_FDT_PATH
702 string "Default value for env_fdt_path variable"
703 depends on ENV_IMPORT_FDT
704 default "/config/environment"
705 help
706 The initial value of the env_fdt_path variable.
707
Marek Vasut47f3b1f2020-07-07 20:51:38 +0200708config ENV_APPEND
709 bool "Always append the environment with new data"
Marek Vasut47f3b1f2020-07-07 20:51:38 +0200710 help
711 If defined, the environment hash table is only ever appended with new
712 data, but the existing hash table can never be dropped and reloaded
713 with newly imported data. This may be used in combination with static
714 flags to e.g. to protect variables which must not be modified.
715
Marek Vasutd045cba2020-07-07 20:51:39 +0200716config ENV_WRITEABLE_LIST
717 bool "Permit write access only to listed variables"
Marek Vasutd045cba2020-07-07 20:51:39 +0200718 help
719 If defined, only environment variables which explicitly set the 'w'
720 writeable flag can be written and modified at runtime. No variables
721 can be otherwise created, written or imported into the environment.
722
Marek Vasut3ec46992020-05-22 01:10:14 +0200723config ENV_ACCESS_IGNORE_FORCE
724 bool "Block forced environment operations"
Marek Vasut3ec46992020-05-22 01:10:14 +0200725 help
726 If defined, don't allow the -f switch to env set override variable
727 access flags.
728
York Sun474ecd22018-06-26 10:03:22 -0700729if SPL_ENV_SUPPORT
730config SPL_ENV_IS_NOWHERE
731 bool "SPL Environment is not stored"
732 default y if ENV_IS_NOWHERE
733 help
734 Similar to ENV_IS_NOWHERE, used for SPL environment.
735
736config SPL_ENV_IS_IN_MMC
737 bool "SPL Environment in an MMC device"
738 depends on !SPL_ENV_IS_NOWHERE
739 depends on ENV_IS_IN_MMC
740 default y
741 help
742 Similar to ENV_IS_IN_MMC, used for SPL environment.
743
744config SPL_ENV_IS_IN_FAT
745 bool "SPL Environment is in a FAT filesystem"
746 depends on !SPL_ENV_IS_NOWHERE
747 depends on ENV_IS_IN_FAT
748 default y
749 help
750 Similar to ENV_IS_IN_FAT, used for SPL environment.
751
752config SPL_ENV_IS_IN_EXT4
753 bool "SPL Environment is in a EXT4 filesystem"
754 depends on !SPL_ENV_IS_NOWHERE
755 depends on ENV_IS_IN_EXT4
756 default y
757 help
758 Similar to ENV_IS_IN_EXT4, used for SPL environment.
759
760config SPL_ENV_IS_IN_NAND
761 bool "SPL Environment in a NAND device"
762 depends on !SPL_ENV_IS_NOWHERE
763 depends on ENV_IS_IN_NAND
764 default y
765 help
766 Similar to ENV_IS_IN_NAND, used for SPL environment.
767
768config SPL_ENV_IS_IN_SPI_FLASH
769 bool "SPL Environment is in SPI flash"
770 depends on !SPL_ENV_IS_NOWHERE
771 depends on ENV_IS_IN_SPI_FLASH
772 default y
773 help
774 Similar to ENV_IS_IN_SPI_FLASH, used for SPL environment.
775
776config SPL_ENV_IS_IN_FLASH
777 bool "SPL Environment in flash memory"
778 depends on !SPL_ENV_IS_NOWHERE
779 depends on ENV_IS_IN_FLASH
780 default y
781 help
782 Similar to ENV_IS_IN_FLASH, used for SPL environment.
783
784endif
785
786if TPL_ENV_SUPPORT
787
788config TPL_ENV_IS_NOWHERE
789 bool "TPL Environment is not stored"
790 default y if ENV_IS_NOWHERE
791 help
792 Similar to ENV_IS_NOWHERE, used for TPL environment.
793
794config TPL_ENV_IS_IN_MMC
795 bool "TPL Environment in an MMC device"
796 depends on !TPL_ENV_IS_NOWHERE
797 depends on ENV_IS_IN_MMC
798 default y
799 help
800 Similar to ENV_IS_IN_MMC, used for TPL environment.
801
802config TPL_ENV_IS_IN_FAT
803 bool "TPL Environment is in a FAT filesystem"
804 depends on !TPL_ENV_IS_NOWHERE
805 depends on ENV_IS_IN_FAT
806 default y
807 help
808 Similar to ENV_IS_IN_FAT, used for TPL environment.
809
810config TPL_ENV_IS_IN_EXT4
811 bool "TPL Environment is in a EXT4 filesystem"
812 depends on !TPL_ENV_IS_NOWHERE
813 depends on ENV_IS_IN_EXT4
814 default y
815 help
816 Similar to ENV_IS_IN_EXT4, used for TPL environment.
817
818config TPL_ENV_IS_IN_NAND
819 bool "TPL Environment in a NAND device"
820 depends on !TPL_ENV_IS_NOWHERE
821 depends on ENV_IS_IN_NAND
822 default y
823 help
824 Similar to ENV_IS_IN_NAND, used for TPL environment.
825
826config TPL_ENV_IS_IN_SPI_FLASH
827 bool "TPL Environment is in SPI flash"
828 depends on !TPL_ENV_IS_NOWHERE
829 depends on ENV_IS_IN_SPI_FLASH
830 default y
831 help
832 Similar to ENV_IS_IN_SPI_FLASH, used for TPL environment.
833
834config TPL_ENV_IS_IN_FLASH
835 bool "TPL Environment in flash memory"
836 depends on !TPL_ENV_IS_NOWHERE
837 depends on ENV_IS_IN_FLASH
838 default y
839 help
840 Similar to ENV_IS_IN_FLASH, used for TPL environment.
841
842endif
843
Tom Rinifdfb17b2022-02-25 11:19:48 -0500844config USE_BOOTFILE
845 bool "Add a 'bootfile' environment variable"
846 help
847 The "bootfile" variable is used in some cases to allow for
848 controlling what file U-Boot will attempt to load and boot. To set
849 this, enable this option and set the value in the next question.
850
851config BOOTFILE
852 string "'bootfile' environment variable value"
853 depends on USE_BOOTFILE
854 help
855 The value to set the "bootfile" variable to.
856
Tom Rini0e14cdf2022-03-11 09:12:07 -0500857config USE_ETHPRIME
858 bool "Add an 'ethprime' environment variable"
859 help
860 The "ethprime" variable is used in some cases to control which
861 network interface is used first.
862
863config ETHPRIME
864 string "'ethprime' environment variable value"
865 depends on USE_ETHPRIME
866 help
867 The value to set the "ethprime" variable to.
868
Simon Glassbc438b62020-09-10 20:21:24 -0600869config VERSION_VARIABLE
870 bool "Add a 'ver' environment variable with the U-Boot version"
871 help
872 If this variable is defined, an environment variable
873 named "ver" is created by U-Boot showing the U-Boot
874 version as printed by the "version" command.
875 Any change to this variable will be reverted at the
876 next reset.
877
Simon Glass0649cd02017-08-03 12:21:49 -0600878endmenu