blob: 7ca992aa1d4032d58b1652e19776116cd9e3e61d [file] [log] [blame]
Simon Glass547cb402017-08-03 12:21:49 -06001menu "Environment"
2
Rasmus Villemoesecdf0742019-12-15 22:29:39 +00003config ENV_SUPPORT
4 def_bool y
5
Simon Glass7327fe72021-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 Villemoes21294752020-02-19 09:47:39 +000024config SAVEENV
25 def_bool y if CMD_SAVEENV
26
Adam Ford710966e2020-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 Rini7bb25792022-12-02 16:42:39 -050033config OVERWRITE_ETHADDR_ONCE
34 bool "Enable overwriting ethaddr environment variables once"
35 depends on !ENV_OVERWRITE
36 help
37 Enable this to allow for the ethaddr environment variables to be
38 overwritten one time per boot, only. This allows for a default
39 to be installed in the environment, which can be changed exactly ONCE
40 by the user.
41
Tom Rini0459c6b2022-06-12 20:01:58 -040042config ENV_MIN_ENTRIES
43 int "Minimum number of entries in the environment hashtable"
44 default 64
45 help
46 Minimum number of entries in the hash table that is used internally
47 to store the environment settings.
48
49config ENV_MAX_ENTRIES
50 int "Maximumm number of entries in the environment hashtable"
51 default 512
52 help
53 Maximum number of entries in the hash table that is used internally
54 to store the environment settings. The default setting is supposed to
55 be generous and should work in most cases. This setting can be used
56 to tune behaviour; see lib/hashtable.c for details.
57
Simon Glass87551f12017-08-03 12:21:59 -060058config ENV_IS_NOWHERE
59 bool "Environment is not stored"
Patrice Chotardaf755812019-05-07 11:24:02 +020060 default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
61 !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \
62 !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
63 !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
64 !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
65 !ENV_IS_IN_UBI
Simon Glass87551f12017-08-03 12:21:59 -060066 help
67 Define this if you don't want to or can't have an environment stored
Shyam Sainiefe757c2018-06-07 19:47:19 +053068 on a storage medium. In this case the environment will still exist
Simon Glass87551f12017-08-03 12:21:59 -060069 while U-Boot is running, but once U-Boot exits it will not be
70 stored. U-Boot will therefore always start up with a default
71 environment.
72
Simon Glass547cb402017-08-03 12:21:49 -060073config ENV_IS_IN_EEPROM
74 bool "Environment in EEPROM"
75 depends on !CHAIN_OF_TRUST
76 help
77 Use this if you have an EEPROM or similar serial access
78 device and a driver for it.
79
80 - CONFIG_ENV_OFFSET:
81 - CONFIG_ENV_SIZE:
82
83 These two #defines specify the offset and size of the
84 environment area within the total memory of your EEPROM.
85
Simon Glass547cb402017-08-03 12:21:49 -060086 Note that we consider the length of the address field to
87 still be one byte because the extra address bits are hidden
88 in the chip address.
89
Simon Glass547cb402017-08-03 12:21:49 -060090 EEPROM which holds the environment, is reached over
91 a pca9547 i2c mux with address 0x70, channel 3.
92
93config ENV_IS_IN_FAT
94 bool "Environment is in a FAT filesystem"
95 depends on !CHAIN_OF_TRUST
Maxime Ripard7569e182018-01-23 21:17:01 +010096 default y if ARCH_BCM283X
Maxime Ripard8b7dcd32018-01-23 21:17:04 +010097 default y if ARCH_SUNXI && MMC
Maxime Ripard7569e182018-01-23 21:17:01 +010098 default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
Tuomas Tynkkynendc256cd2018-01-05 02:45:19 +020099 select FS_FAT
Simon Glass547cb402017-08-03 12:21:49 -0600100 select FAT_WRITE
101 help
Simon Glassea8bf842017-08-03 12:21:50 -0600102 Define this if you want to use the FAT file system for the environment.
Simon Glass547cb402017-08-03 12:21:49 -0600103
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100104config ENV_IS_IN_EXT4
105 bool "Environment is in a EXT4 filesystem"
106 depends on !CHAIN_OF_TRUST
Michal Simek4b4ba3c2020-08-19 10:44:23 +0200107 select FS_EXT4
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100108 select EXT4_WRITE
109 help
110 Define this if you want to use the EXT4 file system for the environment.
111
Simon Glass547cb402017-08-03 12:21:49 -0600112config ENV_IS_IN_FLASH
113 bool "Environment in flash memory"
114 depends on !CHAIN_OF_TRUST
Maxime Ripard7569e182018-01-23 21:17:01 +0100115 default y if ARCH_CINTEGRATOR
116 default y if ARCH_INTEGRATOR_CP
Tom Rini7ab2f5f2021-05-14 21:34:10 -0400117 default y if M548x || M547x || M5282
Maxime Ripard7569e182018-01-23 21:17:01 +0100118 default y if MCF532x || MCF52x2
119 default y if MPC86xx || MPC83xx
Tom Rinie5404982021-05-14 21:34:26 -0400120 default y if ARCH_MPC8548
Maxime Ripard7569e182018-01-23 21:17:01 +0100121 default y if SH && !CPU_SH4
Simon Glass547cb402017-08-03 12:21:49 -0600122 help
123 Define this if you have a flash device which you want to use for the
124 environment.
125
126 a) The environment occupies one whole flash sector, which is
127 "embedded" in the text segment with the U-Boot code. This
128 happens usually with "bottom boot sector" or "top boot
129 sector" type flash chips, which have several smaller
130 sectors at the start or the end. For instance, such a
131 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
132 such a case you would place the environment in one of the
133 4 kB sectors - with U-Boot code before and after it. With
134 "top boot sector" type flash chips, you would put the
135 environment in one of the last sectors, leaving a gap
136 between U-Boot and the environment.
137
138 CONFIG_ENV_OFFSET:
139
140 Offset of environment data (variable area) to the
141 beginning of flash memory; for instance, with bottom boot
142 type flash chips the second sector can be used: the offset
143 for this sector is given here.
144
Tom Rini6a5dccc2022-11-16 13:10:41 -0500145 CONFIG_ENV_OFFSET is used relative to CFG_SYS_FLASH_BASE.
Simon Glass547cb402017-08-03 12:21:49 -0600146
147 CONFIG_ENV_ADDR:
148
149 This is just another way to specify the start address of
150 the flash sector containing the environment (instead of
151 CONFIG_ENV_OFFSET).
152
153 CONFIG_ENV_SECT_SIZE:
154
155 Size of the sector containing the environment.
156
157
158 b) Sometimes flash chips have few, equal sized, BIG sectors.
159 In such a case you don't want to spend a whole sector for
160 the environment.
161
162 CONFIG_ENV_SIZE:
163
164 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
165 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
166 of this flash sector for the environment. This saves
167 memory for the RAM copy of the environment.
168
169 It may also save flash memory if you decide to use this
170 when your environment is "embedded" within U-Boot code,
171 since then the remainder of the flash sector could be used
172 for U-Boot code. It should be pointed out that this is
173 STRONGLY DISCOURAGED from a robustness point of view:
174 updating the environment in flash makes it always
175 necessary to erase the WHOLE sector. If something goes
176 wrong before the contents has been restored from a copy in
177 RAM, your target system will be dead.
178
179 CONFIG_ENV_ADDR_REDUND
Simon Glass547cb402017-08-03 12:21:49 -0600180
181 These settings describe a second storage area used to hold
182 a redundant copy of the environment data, so that there is
183 a valid backup copy in case there is a power failure during
184 a "saveenv" operation.
185
186 BE CAREFUL! Any changes to the flash layout, and some changes to the
187 source code will make it necessary to adapt <board>/u-boot.lds*
188 accordingly!
189
190config ENV_IS_IN_MMC
191 bool "Environment in an MMC device"
192 depends on !CHAIN_OF_TRUST
Maxime Ripard662a1ec2018-01-23 21:17:00 +0100193 depends on MMC
Maxime Ripard7569e182018-01-23 21:17:01 +0100194 default y if ARCH_EXYNOS4
195 default y if MX6SX || MX7D
196 default y if TEGRA30 || TEGRA124
197 default y if TEGRA_ARMV8_COMMON
Simon Glass547cb402017-08-03 12:21:49 -0600198 help
199 Define this if you have an MMC device which you want to use for the
200 environment.
201
202 CONFIG_SYS_MMC_ENV_DEV:
203
204 Specifies which MMC device the environment is stored in.
205
206 CONFIG_SYS_MMC_ENV_PART (optional):
207
208 Specifies which MMC partition the environment is stored in. If not
209 set, defaults to partition 0, the user area. Common values might be
210 1 (first MMC boot partition), 2 (second MMC boot partition).
211
212 CONFIG_ENV_OFFSET:
213 CONFIG_ENV_SIZE:
214
215 These two #defines specify the offset and size of the environment
216 area within the specified MMC device.
217
218 If offset is positive (the usual case), it is treated as relative to
219 the start of the MMC partition. If offset is negative, it is treated
220 as relative to the end of the MMC partition. This can be useful if
221 your board may be fitted with different MMC devices, which have
222 different sizes for the MMC partitions, and you always want the
223 environment placed at the very end of the partition, to leave the
224 maximum possible space before it, to store other data.
225
226 These two values are in units of bytes, but must be aligned to an
227 MMC sector boundary.
228
229 CONFIG_ENV_OFFSET_REDUND (optional):
230
231 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
232 hold a redundant copy of the environment data. This provides a
233 valid backup copy in case the other copy is corrupted, e.g. due
234 to a power failure during a "saveenv" operation.
235
236 This value may also be positive or negative; this is handled in the
237 same way as CONFIG_ENV_OFFSET.
238
Marek Vasut509f36e2021-10-17 19:23:36 +0200239 In case CONFIG_SYS_MMC_ENV_PART is 1 (i.e. environment in eMMC boot
240 partition) then setting CONFIG_ENV_OFFSET_REDUND to the same value
241 as CONFIG_ENV_OFFSET makes use of the second eMMC boot partition for
242 the redundant environment copy.
243
Simon Glass547cb402017-08-03 12:21:49 -0600244 This value is also in units of bytes, but must also be aligned to
245 an MMC sector boundary.
246
Simon Glass547cb402017-08-03 12:21:49 -0600247config ENV_IS_IN_NAND
248 bool "Environment in a NAND device"
249 depends on !CHAIN_OF_TRUST
250 help
251 Define this if you have a NAND device which you want to use for the
252 environment.
253
254 - CONFIG_ENV_OFFSET:
255 - CONFIG_ENV_SIZE:
256
257 These two #defines specify the offset and size of the environment
258 area within the first NAND device. CONFIG_ENV_OFFSET must be
259 aligned to an erase block boundary.
260
261 - CONFIG_ENV_OFFSET_REDUND (optional):
262
263 This setting describes a second storage area of CONFIG_ENV_SIZE
264 size used to hold a redundant copy of the environment data, so
265 that there is a valid backup copy in case there is a power failure
266 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
267 aligned to an erase block boundary.
268
Simon Glass547cb402017-08-03 12:21:49 -0600269 - CONFIG_ENV_OFFSET_OOB (optional):
270
271 Enables support for dynamically retrieving the offset of the
272 environment from block zero's out-of-band data. The
273 "nand env.oob" command can be used to record this offset.
274 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
275 using CONFIG_ENV_OFFSET_OOB.
276
Tom Rini0eeb1c72022-06-13 22:57:33 -0400277config ENV_RANGE
278 hex "Length of the region in which the environment can be written"
279 depends on ENV_IS_IN_NAND
280 range ENV_SIZE 0x7fffffff
281 default ENV_SIZE
282 help
283 This should be a multiple of the NAND device's block size.
284 Specifying a range with more erase blocks than are needed to hold
285 CONFIG_ENV_SIZE allows bad blocks within the range to be avoided.
286
Simon Glass547cb402017-08-03 12:21:49 -0600287config ENV_IS_IN_NVRAM
288 bool "Environment in a non-volatile RAM"
289 depends on !CHAIN_OF_TRUST
290 help
291 Define this if you have some non-volatile memory device
292 (NVRAM, battery buffered SRAM) which you want to use for the
293 environment.
294
295 - CONFIG_ENV_ADDR:
296 - CONFIG_ENV_SIZE:
297
298 These two #defines are used to determine the memory area you
299 want to use for environment. It is assumed that this memory
300 can just be read and written to, without any special
301 provision.
302
303config ENV_IS_IN_ONENAND
304 bool "Environment is in OneNAND"
305 depends on !CHAIN_OF_TRUST
306 help
307 Define this if you want to put your local device's environment in
308 OneNAND.
309
310 - CONFIG_ENV_ADDR:
311 - CONFIG_ENV_SIZE:
312
313 These two #defines are used to determine the device range you
314 want to use for environment. It is assumed that this memory
315 can just be read and written to, without any special
316 provision.
317
318config ENV_IS_IN_REMOTE
Heinrich Schuchardtaefbfe12018-03-17 22:53:11 +0000319 bool "Environment is in remote memory space"
Simon Glass547cb402017-08-03 12:21:49 -0600320 depends on !CHAIN_OF_TRUST
321 help
322 Define this if you have a remote memory space which you
323 want to use for the local device's environment.
324
325 - CONFIG_ENV_ADDR:
326 - CONFIG_ENV_SIZE:
327
328 These two #defines specify the address and size of the
329 environment area within the remote memory space. The
330 local device can get the environment from remote memory
331 space by SRIO or PCIE links.
332
333config ENV_IS_IN_SPI_FLASH
334 bool "Environment is in SPI flash"
Tom Rinie5289a72019-05-29 17:01:28 -0400335 depends on !CHAIN_OF_TRUST && SPI
Maxime Ripard7569e182018-01-23 21:17:01 +0100336 default y if ARMADA_XP
337 default y if INTEL_BAYTRAIL
338 default y if INTEL_BRASWELL
339 default y if INTEL_BROADWELL
340 default y if NORTHBRIDGE_INTEL_IVYBRIDGE
341 default y if INTEL_QUARK
342 default y if INTEL_QUEENSBAY
Andre Przywarae28ff722022-01-11 12:46:05 +0000343 default y if ARCH_SUNXI
Simon Glass547cb402017-08-03 12:21:49 -0600344 help
345 Define this if you have a SPI Flash memory device which you
346 want to use for the environment.
347
348 - CONFIG_ENV_OFFSET:
349 - CONFIG_ENV_SIZE:
350
351 These two #defines specify the offset and size of the
352 environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
353 aligned to an erase sector boundary.
354
355 - CONFIG_ENV_SECT_SIZE:
356
357 Define the SPI flash's sector size.
358
359 - CONFIG_ENV_OFFSET_REDUND (optional):
360
361 This setting describes a second storage area of CONFIG_ENV_SIZE
362 size used to hold a redundant copy of the environment data, so
363 that there is a valid backup copy in case there is a power failure
364 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
365 aligned to an erase sector boundary.
366
Rasmus Villemoese535f5b2021-04-14 20:51:43 +0200367config ENV_SECT_SIZE_AUTO
368 bool "Use automatically detected sector size"
369 depends on ENV_IS_IN_SPI_FLASH
370 help
371 Some boards exist in multiple variants, with different
372 flashes having different sector sizes. In such cases, you
373 can select this option to make U-Boot use the actual sector
374 size when figuring out how much to erase, which can thus be
375 more efficient on the flashes with smaller erase size. Since
376 the environment must always be aligned on a sector boundary,
377 CONFIG_ENV_OFFSET must be aligned to the largest of the
378 different sector sizes, and CONFIG_ENV_SECT_SIZE should be
379 set to that value.
380
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100381config ENV_SPI_BUS
382 int "Value of SPI flash bus for environment"
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100383 depends on ENV_IS_IN_SPI_FLASH
Tom Rini119d2fb2021-12-11 14:55:48 -0500384 default SF_DEFAULT_BUS
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100385 help
Tom Rini119d2fb2021-12-11 14:55:48 -0500386 Value the SPI bus and chip select for environment.
Simon Glass547cb402017-08-03 12:21:49 -0600387
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100388config ENV_SPI_CS
389 int "Value of SPI flash chip select for environment"
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100390 depends on ENV_IS_IN_SPI_FLASH
Tom Rini119d2fb2021-12-11 14:55:48 -0500391 default SF_DEFAULT_CS
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100392 help
Tom Rini119d2fb2021-12-11 14:55:48 -0500393 Value of the SPI chip select for environment.
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100394
395config ENV_SPI_MAX_HZ
Marek Vasutdfe74622019-05-04 19:10:05 +0200396 int "Value of SPI flash max frequency for environment"
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100397 depends on ENV_IS_IN_SPI_FLASH
Tom Rini119d2fb2021-12-11 14:55:48 -0500398 default SF_DEFAULT_SPEED
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100399 help
Tom Rini119d2fb2021-12-11 14:55:48 -0500400 Value of the SPI max work clock for environment.
Simon Glass547cb402017-08-03 12:21:49 -0600401
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100402config ENV_SPI_MODE
403 hex "Value of SPI flash work mode for environment"
Tom Rini119d2fb2021-12-11 14:55:48 -0500404 depends on ENV_IS_IN_SPI_FLASH
405 default SF_DEFAULT_MODE
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100406 help
407 Value of the SPI work mode for environment.
408 See include/spi.h for value.
Simon Glass547cb402017-08-03 12:21:49 -0600409
Heiko Schocher704d21c2020-10-10 10:28:05 +0200410config ENV_SPI_EARLY
411 bool "Access Environment in SPI flashes before relocation"
412 depends on ENV_IS_IN_SPI_FLASH
413 help
414 Enable this if you want to use Environment in SPI flash
415 before relocation. Call env_init() and than you can use
416 env_get_f() for accessing Environment variables.
417
Simon Glass547cb402017-08-03 12:21:49 -0600418config ENV_IS_IN_UBI
419 bool "Environment in a UBI volume"
420 depends on !CHAIN_OF_TRUST
Miquel Raynal27271b62019-10-03 19:50:12 +0200421 depends on MTD_UBI
422 depends on CMD_UBI
Simon Glass547cb402017-08-03 12:21:49 -0600423 help
424 Define this if you have an UBI volume that you want to use for the
425 environment. This has the benefit of wear-leveling the environment
426 accesses, which is important on NAND.
427
428 - CONFIG_ENV_UBI_PART:
429
430 Define this to a string that is the mtd partition containing the UBI.
431
432 - CONFIG_ENV_UBI_VOLUME:
433
434 Define this to the name of the volume that you want to store the
435 environment in.
436
437 - CONFIG_ENV_UBI_VOLUME_REDUND:
438
439 Define this to the name of another volume to store a second copy of
440 the environment in. This will enable redundant environments in UBI.
441 It is assumed that both volumes are in the same MTD partition.
442
Tom Rini4bb26a42019-11-10 11:28:03 -0500443config SYS_REDUNDAND_ENVIRONMENT
444 bool "Enable redundant environment support"
Tom Rini4bb26a42019-11-10 11:28:03 -0500445 help
446 Normally, the environemt is stored in a single location. By
447 selecting this option, you can then define where to hold a redundant
448 copy of the environment data, so that there is a valid backup copy in
449 case there is a power failure during a "saveenv" operation.
Michal Simekcc780ec2021-01-13 10:25:50 +0100450 Also this config changes the binary environment structure handling
451 which is used by env import/export commands which are independent of
452 storing variables to redundant location on a non volatile device.
Tom Rini4bb26a42019-11-10 11:28:03 -0500453
Simon Glass547cb402017-08-03 12:21:49 -0600454config ENV_FAT_INTERFACE
455 string "Name of the block device for the environment"
456 depends on ENV_IS_IN_FAT
Michal Simek5227e1e2020-02-25 15:50:33 +0100457 default "mmc"
Simon Glass547cb402017-08-03 12:21:49 -0600458 help
459 Define this to a string that is the name of the block device.
460
461config ENV_FAT_DEVICE_AND_PART
462 string "Device and partition for where to store the environemt in FAT"
463 depends on ENV_IS_IN_FAT
464 default "0:1" if TI_COMMON_CMD_OPTIONS
Ashok Reddy Somafb6b3cd2021-02-23 08:07:46 -0700465 default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
Samuel Hollandbc42abb2021-04-18 22:16:21 -0500466 default ":auto" if ARCH_SUNXI
Simon Glass547cb402017-08-03 12:21:49 -0600467 default "0" if ARCH_AT91
468 help
469 Define this to a string to specify the partition of the device. It can
470 be as following:
471
472 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
473 - "D:P": device D partition P. Error occurs if device D has no
474 partition table.
475 - "D:0": device D.
476 - "D" or "D:": device D partition 1 if device D has partition
477 table, or the whole device D if has no partition
478 table.
479 - "D:auto": first partition in device D with bootable flag set.
480 If none, first valid partition in device D. If no
481 partition table then means device D.
482
David Woodhouse93365392020-06-19 23:07:17 +0100483 If ENV_FAT_INTERFACE is set to "mmc" then device 'D' can be omitted,
484 leaving the string starting with a colon, and the boot device will
485 be used.
486
Simon Glass547cb402017-08-03 12:21:49 -0600487config ENV_FAT_FILE
Shyam Sainiefe757c2018-06-07 19:47:19 +0530488 string "Name of the FAT file to use for the environment"
Simon Glass547cb402017-08-03 12:21:49 -0600489 depends on ENV_IS_IN_FAT
490 default "uboot.env"
491 help
492 It's a string of the FAT file name. This file use to store the
493 environment.
494
Brandon Maierf2815462021-01-16 15:14:43 -0600495config ENV_FAT_FILE_REDUND
496 string "Name of the FAT file to use for the environment"
497 depends on ENV_IS_IN_FAT && SYS_REDUNDAND_ENVIRONMENT
498 default "uboot-redund.env"
499 help
500 It's a string of the FAT file name. This file use to store the
501 redundant environment.
502
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100503config ENV_EXT4_INTERFACE
504 string "Name of the block device for the environment"
505 depends on ENV_IS_IN_EXT4
506 help
507 Define this to a string that is the name of the block device.
508
509config ENV_EXT4_DEVICE_AND_PART
510 string "Device and partition for where to store the environemt in EXT4"
511 depends on ENV_IS_IN_EXT4
512 help
513 Define this to a string to specify the partition of the device. It can
514 be as following:
515
516 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
517 - "D:P": device D partition P. Error occurs if device D has no
518 partition table.
519 - "D:0": device D.
520 - "D" or "D:": device D partition 1 if device D has partition
521 table, or the whole device D if has no partition
522 table.
523 - "D:auto": first partition in device D with bootable flag set.
524 If none, first valid partition in device D. If no
525 partition table then means device D.
526
David Woodhouse6815e2c2020-08-04 10:05:47 +0100527 If ENV_EXT4_INTERFACE is set to "mmc" then device 'D' can be omitted,
528 leaving the string starting with a colon, and the boot device will
529 be used.
530
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100531config ENV_EXT4_FILE
Shyam Sainiefe757c2018-06-07 19:47:19 +0530532 string "Name of the EXT4 file to use for the environment"
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100533 depends on ENV_IS_IN_EXT4
Patrick Delaunay955b6712020-07-28 11:51:14 +0200534 default "/uboot.env"
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100535 help
536 It's a string of the EXT4 file name. This file use to store the
537 environment (explicit path to the file)
538
Tom Rini5cd7ece2019-11-18 20:02:10 -0500539config ENV_ADDR
540 hex "Environment address"
541 depends on ENV_IS_IN_FLASH || ENV_IS_IN_NVRAM || ENV_IS_IN_ONENAND || \
542 ENV_IS_IN_REMOTE || ENV_IS_IN_SPI_FLASH
543 default 0x0 if ENV_IS_IN_SPI_FLASH
544 help
545 Offset from the start of the device (or partition)
546
547config ENV_ADDR_REDUND
548 hex "Redundant environment address"
549 depends on ENV_IS_IN_FLASH && SYS_REDUNDAND_ENVIRONMENT
550 help
551 Offset from the start of the device (or partition) of the redundant
552 environment location.
Simon Glass547cb402017-08-03 12:21:49 -0600553
554config ENV_OFFSET
Tom Rini5cd7ece2019-11-18 20:02:10 -0500555 hex "Environment offset"
556 depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
557 ENV_IS_IN_SPI_FLASH
Jagan Tekic4ec2262019-12-21 13:24:35 +0530558 default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki68397572019-12-21 13:24:36 +0530559 default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Andre Przywaracf844082022-01-11 12:46:03 +0000560 default 0xF0000 if ARCH_SUNXI
Michal Simeke93ef192018-07-19 08:45:45 +0200561 default 0xE0000 if ARCH_ZYNQ
562 default 0x1E00000 if ARCH_ZYNQMP
Michal Simek2e53eb22022-09-19 14:21:02 +0200563 default 0x7F40000 if ARCH_VERSAL || ARCH_VERSAL_NET
Alexey Brodkin07dfc092019-01-15 11:42:48 +0300564 default 0 if ARC
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200565 default 0x140000 if ARCH_AT91
566 default 0x260000 if ARCH_OMAP2PLUS
Varalaxmi Bingi52e79212020-02-05 03:58:20 -0700567 default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Simon Glass547cb402017-08-03 12:21:49 -0600568 help
569 Offset from the start of the device (or partition)
570
Tom Rini5cd7ece2019-11-18 20:02:10 -0500571config ENV_OFFSET_REDUND
572 hex "Redundant environment offset"
573 depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
574 ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT
T Karthik Reddy5bb3d912022-08-24 13:23:26 +0200575 default 0x10C0000 if MICROBLAZE
Michal Simek46d6b522021-02-24 10:33:45 +0100576 default 0
Tom Rini5cd7ece2019-11-18 20:02:10 -0500577 help
578 Offset from the start of the device (or partition) of the redundant
579 environment location.
580
Simon Glass547cb402017-08-03 12:21:49 -0600581config ENV_SIZE
582 hex "Environment Size"
Michal Simeke93ef192018-07-19 08:45:45 +0200583 default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
Andre Przywaracf844082022-01-11 12:46:03 +0000584 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
585 default 0x10000 if ARCH_SUNXI
Jagan Tekic4ec2262019-12-21 13:24:35 +0530586 default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki68397572019-12-21 13:24:36 +0530587 default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Michal Simek2e53eb22022-09-19 14:21:02 +0200588 default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET
Alexey Brodkin07dfc092019-01-15 11:42:48 +0300589 default 0x4000 if ARC
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200590 default 0x1f000
Simon Glass547cb402017-08-03 12:21:49 -0600591 help
592 Size of the environment storage area
593
Michal Simeke93ef192018-07-19 08:45:45 +0200594config ENV_SECT_SIZE
595 hex "Environment Sector-Size"
Tom Rini5cd7ece2019-11-18 20:02:10 -0500596 depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
Jagan Teki68397572019-12-21 13:24:36 +0530597 default 0x2000 if ARCH_ROCKCHIP
Michal Simek2e53eb22022-09-19 14:21:02 +0200598 default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200599 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Varalaxmi Bingi52e79212020-02-05 03:58:20 -0700600 default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Andre Przywaracf844082022-01-11 12:46:03 +0000601 default 0x10000 if ARCH_SUNXI && ENV_IS_IN_SPI_FLASH
Michal Simeke93ef192018-07-19 08:45:45 +0200602 help
603 Size of the sector containing the environment.
604
Simon Glass547cb402017-08-03 12:21:49 -0600605config ENV_UBI_PART
606 string "UBI partition name"
607 depends on ENV_IS_IN_UBI
608 help
609 MTD partition containing the UBI device
610
611config ENV_UBI_VOLUME
612 string "UBI volume name"
613 depends on ENV_IS_IN_UBI
614 help
615 Name of the volume that you want to store the environment in.
616
Markus Klotzbuecher975bcde2019-05-15 15:15:53 +0200617config ENV_UBI_VOLUME_REDUND
618 string "UBI redundant volume name"
Tom Rini4bb26a42019-11-10 11:28:03 -0500619 depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT
Markus Klotzbuecher975bcde2019-05-15 15:15:53 +0200620 help
621 Name of the redundant volume that you want to store the environment in.
622
Hamish Guthrie674ab242019-05-15 15:15:55 +0200623config ENV_UBI_VID_OFFSET
624 int "ubi environment VID offset"
625 depends on ENV_IS_IN_UBI
626 default 0
627 help
628 UBI VID offset for environment. If 0, no custom VID offset is used.
629
Tom Rinica63e712019-11-12 22:46:36 -0500630config SYS_RELOC_GD_ENV_ADDR
Patrick Delaunay9f757532020-06-10 19:28:42 +0200631 bool "Relocate gd->env_addr"
Tom Rinica63e712019-11-12 22:46:36 -0500632 help
633 Relocate the early env_addr pointer so we know it is not inside
634 the binary. Some systems need this and for the rest, it doesn't hurt.
635
Tom Rinieb1f9092020-07-24 17:14:47 -0400636config SYS_MMC_ENV_DEV
637 int "mmc device number"
638 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
Kuldeep Singhd6cfb902021-08-10 11:20:06 +0530639 CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA
Tom Rinieb1f9092020-07-24 17:14:47 -0400640 default 0
641 help
642 MMC device number on the platform where the environment is stored.
643
644config SYS_MMC_ENV_PART
645 int "mmc partition number"
646 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
647 default 0
648 help
649 MMC hardware partition device number on the platform where the
650 environment is stored. Note that this is not related to any software
651 defined partition table but instead if we are in the user area, which is
652 partition 0 or the first boot partition, which is 1 or some other defined
653 partition.
654
Rasmus Villemoes14c71142018-03-20 11:38:45 +0100655config USE_DEFAULT_ENV_FILE
656 bool "Create default environment from file"
657 help
658 Normally, the default environment is automatically generated
659 based on the settings of various CONFIG_* options, as well
660 as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option,
661 you can instead define the entire default environment in an
662 external file.
663
664config DEFAULT_ENV_FILE
665 string "Path to default environment file"
666 depends on USE_DEFAULT_ENV_FILE
667 help
668 The path containing the default environment. The format is
669 the same as accepted by the mkenvimage tool: lines
670 containing key=value pairs, blank lines and lines beginning
671 with # are ignored.
672
Alex Kiernana410d6e2018-04-01 16:37:53 +0000673config ENV_VARS_UBOOT_RUNTIME_CONFIG
674 bool "Add run-time information to the environment"
675 help
676 Enable this in order to add variables describing certain
677 run-time determined information about the hardware to the
678 environment. These will be named board_name, board_rev.
679
Ovidiu Panait86ccd752020-05-06 20:38:42 +0300680config DELAY_ENVIRONMENT
681 bool "Delay environment loading"
682 depends on !OF_CONTROL
683 help
684 Enable this to inhibit loading the environment during board
685 initialization. This can address the security risk of untrusted data
686 being used during boot. Normally the environment is loaded when the
687 board is initialised so that it is available to U-Boot. This inhibits
688 that so that the environment is not available until explicitly loaded
689 later by U-Boot code. With CONFIG_OF_CONTROL this is instead
690 controlled by the value of /config/load-environment.
691
Rasmus Villemoescf8e5432021-04-21 11:06:54 +0200692config ENV_IMPORT_FDT
693 bool "Amend environment by FDT properties"
694 depends on OF_CONTROL
695 help
696 If selected, after the environment has been loaded from its
697 persistent location, the "env_fdt_path" variable is looked
698 up and used as a path to a node in the control DTB. The
699 property/value pairs in that node is then used to update the
700 run-time environment. This can be useful to use the same
701 U-Boot binary with different board variants.
702
703config ENV_FDT_PATH
704 string "Default value for env_fdt_path variable"
705 depends on ENV_IMPORT_FDT
706 default "/config/environment"
707 help
708 The initial value of the env_fdt_path variable.
709
Marek Vasuta7b82672020-07-07 20:51:38 +0200710config ENV_APPEND
711 bool "Always append the environment with new data"
Marek Vasuta7b82672020-07-07 20:51:38 +0200712 help
713 If defined, the environment hash table is only ever appended with new
714 data, but the existing hash table can never be dropped and reloaded
715 with newly imported data. This may be used in combination with static
716 flags to e.g. to protect variables which must not be modified.
717
Marek Vasut803549f2020-07-07 20:51:39 +0200718config ENV_WRITEABLE_LIST
719 bool "Permit write access only to listed variables"
Marek Vasut803549f2020-07-07 20:51:39 +0200720 help
721 If defined, only environment variables which explicitly set the 'w'
722 writeable flag can be written and modified at runtime. No variables
723 can be otherwise created, written or imported into the environment.
724
Marek Vasutb7f3f232020-05-22 01:10:14 +0200725config ENV_ACCESS_IGNORE_FORCE
726 bool "Block forced environment operations"
Marek Vasutb7f3f232020-05-22 01:10:14 +0200727 help
728 If defined, don't allow the -f switch to env set override variable
729 access flags.
730
York Sun187da8d2018-06-26 10:03:22 -0700731if SPL_ENV_SUPPORT
732config SPL_ENV_IS_NOWHERE
733 bool "SPL Environment is not stored"
734 default y if ENV_IS_NOWHERE
735 help
736 Similar to ENV_IS_NOWHERE, used for SPL environment.
737
738config SPL_ENV_IS_IN_MMC
739 bool "SPL Environment in an MMC device"
740 depends on !SPL_ENV_IS_NOWHERE
741 depends on ENV_IS_IN_MMC
742 default y
743 help
744 Similar to ENV_IS_IN_MMC, used for SPL environment.
745
746config SPL_ENV_IS_IN_FAT
747 bool "SPL Environment is in a FAT filesystem"
748 depends on !SPL_ENV_IS_NOWHERE
749 depends on ENV_IS_IN_FAT
750 default y
751 help
752 Similar to ENV_IS_IN_FAT, used for SPL environment.
753
754config SPL_ENV_IS_IN_EXT4
755 bool "SPL Environment is in a EXT4 filesystem"
756 depends on !SPL_ENV_IS_NOWHERE
757 depends on ENV_IS_IN_EXT4
758 default y
759 help
760 Similar to ENV_IS_IN_EXT4, used for SPL environment.
761
762config SPL_ENV_IS_IN_NAND
763 bool "SPL Environment in a NAND device"
764 depends on !SPL_ENV_IS_NOWHERE
765 depends on ENV_IS_IN_NAND
766 default y
767 help
768 Similar to ENV_IS_IN_NAND, used for SPL environment.
769
770config SPL_ENV_IS_IN_SPI_FLASH
771 bool "SPL Environment is in SPI flash"
772 depends on !SPL_ENV_IS_NOWHERE
773 depends on ENV_IS_IN_SPI_FLASH
774 default y
775 help
776 Similar to ENV_IS_IN_SPI_FLASH, used for SPL environment.
777
778config SPL_ENV_IS_IN_FLASH
779 bool "SPL Environment in flash memory"
780 depends on !SPL_ENV_IS_NOWHERE
781 depends on ENV_IS_IN_FLASH
782 default y
783 help
784 Similar to ENV_IS_IN_FLASH, used for SPL environment.
785
786endif
787
788if TPL_ENV_SUPPORT
789
790config TPL_ENV_IS_NOWHERE
791 bool "TPL Environment is not stored"
792 default y if ENV_IS_NOWHERE
793 help
794 Similar to ENV_IS_NOWHERE, used for TPL environment.
795
796config TPL_ENV_IS_IN_MMC
797 bool "TPL Environment in an MMC device"
798 depends on !TPL_ENV_IS_NOWHERE
799 depends on ENV_IS_IN_MMC
800 default y
801 help
802 Similar to ENV_IS_IN_MMC, used for TPL environment.
803
804config TPL_ENV_IS_IN_FAT
805 bool "TPL Environment is in a FAT filesystem"
806 depends on !TPL_ENV_IS_NOWHERE
807 depends on ENV_IS_IN_FAT
808 default y
809 help
810 Similar to ENV_IS_IN_FAT, used for TPL environment.
811
812config TPL_ENV_IS_IN_EXT4
813 bool "TPL Environment is in a EXT4 filesystem"
814 depends on !TPL_ENV_IS_NOWHERE
815 depends on ENV_IS_IN_EXT4
816 default y
817 help
818 Similar to ENV_IS_IN_EXT4, used for TPL environment.
819
820config TPL_ENV_IS_IN_NAND
821 bool "TPL Environment in a NAND device"
822 depends on !TPL_ENV_IS_NOWHERE
823 depends on ENV_IS_IN_NAND
824 default y
825 help
826 Similar to ENV_IS_IN_NAND, used for TPL environment.
827
828config TPL_ENV_IS_IN_SPI_FLASH
829 bool "TPL Environment is in SPI flash"
830 depends on !TPL_ENV_IS_NOWHERE
831 depends on ENV_IS_IN_SPI_FLASH
832 default y
833 help
834 Similar to ENV_IS_IN_SPI_FLASH, used for TPL environment.
835
836config TPL_ENV_IS_IN_FLASH
837 bool "TPL Environment in flash memory"
838 depends on !TPL_ENV_IS_NOWHERE
839 depends on ENV_IS_IN_FLASH
840 default y
841 help
842 Similar to ENV_IS_IN_FLASH, used for TPL environment.
843
844endif
845
Tom Rini5fb860c2022-02-25 11:19:48 -0500846config USE_BOOTFILE
847 bool "Add a 'bootfile' environment variable"
848 help
849 The "bootfile" variable is used in some cases to allow for
850 controlling what file U-Boot will attempt to load and boot. To set
851 this, enable this option and set the value in the next question.
852
853config BOOTFILE
854 string "'bootfile' environment variable value"
855 depends on USE_BOOTFILE
856 help
857 The value to set the "bootfile" variable to.
858
Tom Rinife586752022-03-11 09:12:07 -0500859config USE_ETHPRIME
860 bool "Add an 'ethprime' environment variable"
861 help
862 The "ethprime" variable is used in some cases to control which
863 network interface is used first.
864
865config ETHPRIME
866 string "'ethprime' environment variable value"
867 depends on USE_ETHPRIME
868 help
869 The value to set the "ethprime" variable to.
870
Tom Rini1479a832022-12-02 16:42:27 -0500871config USE_HOSTNAME
872 bool "Set a default 'hostname' value in the environment"
873 default y if X86
874
875config HOSTNAME
876 string "Value of the default 'hostname' value in the environment"
877 depends on USE_HOSTNAME
878 default "x86" if X86
879 default "unknown"
880
Simon Glass99298be2020-09-10 20:21:24 -0600881config VERSION_VARIABLE
882 bool "Add a 'ver' environment variable with the U-Boot version"
883 help
884 If this variable is defined, an environment variable
885 named "ver" is created by U-Boot showing the U-Boot
886 version as printed by the "version" command.
887 Any change to this variable will be reverted at the
888 next reset.
889
Simon Glass547cb402017-08-03 12:21:49 -0600890endmenu