blob: f75f2b13536af6f1a059a10933f642e6ba10ea11 [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
Rasmus Villemoes1d0adee2020-02-19 09:47:39 +00006config SAVEENV
7 def_bool y if CMD_SAVEENV
8
Adam Forde91907a2020-07-03 06:48:56 -05009config ENV_OVERWRITE
10 bool "Enable overwriting environment"
11 help
12 Use this to permit overriding of certain environmental variables
13 like Ethernet and Serial
14
Simon Glassc1c3fe22017-08-03 12:21:59 -060015config ENV_IS_NOWHERE
16 bool "Environment is not stored"
Patrice Chotard208bd2b2019-05-07 11:24:02 +020017 default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
18 !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \
19 !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
20 !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
21 !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
22 !ENV_IS_IN_UBI
Simon Glassc1c3fe22017-08-03 12:21:59 -060023 help
24 Define this if you don't want to or can't have an environment stored
Shyam Saini919d25c2018-06-07 19:47:19 +053025 on a storage medium. In this case the environment will still exist
Simon Glassc1c3fe22017-08-03 12:21:59 -060026 while U-Boot is running, but once U-Boot exits it will not be
27 stored. U-Boot will therefore always start up with a default
28 environment.
29
Simon Glass0649cd02017-08-03 12:21:49 -060030config ENV_IS_IN_EEPROM
31 bool "Environment in EEPROM"
32 depends on !CHAIN_OF_TRUST
33 help
34 Use this if you have an EEPROM or similar serial access
35 device and a driver for it.
36
37 - CONFIG_ENV_OFFSET:
38 - CONFIG_ENV_SIZE:
39
40 These two #defines specify the offset and size of the
41 environment area within the total memory of your EEPROM.
42
Simon Glass0649cd02017-08-03 12:21:49 -060043 Note that we consider the length of the address field to
44 still be one byte because the extra address bits are hidden
45 in the chip address.
46
Simon Glass0649cd02017-08-03 12:21:49 -060047 - CONFIG_I2C_ENV_EEPROM_BUS
48 if you have an Environment on an EEPROM reached over
49 I2C muxes, you can define here, how to reach this
50 EEPROM. For example:
51
52 #define CONFIG_I2C_ENV_EEPROM_BUS 1
53
54 EEPROM which holds the environment, is reached over
55 a pca9547 i2c mux with address 0x70, channel 3.
56
57config ENV_IS_IN_FAT
58 bool "Environment is in a FAT filesystem"
59 depends on !CHAIN_OF_TRUST
Maxime Ripardfb694642018-01-23 21:17:01 +010060 default y if ARCH_BCM283X
Maxime Ripard0163c912018-01-23 21:17:04 +010061 default y if ARCH_SUNXI && MMC
Maxime Ripardfb694642018-01-23 21:17:01 +010062 default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
Tuomas Tynkkynen3cd084d2018-01-05 02:45:19 +020063 select FS_FAT
Simon Glass0649cd02017-08-03 12:21:49 -060064 select FAT_WRITE
65 help
Simon Glass91d3aa02017-08-03 12:21:50 -060066 Define this if you want to use the FAT file system for the environment.
Simon Glass0649cd02017-08-03 12:21:49 -060067
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +010068config ENV_IS_IN_EXT4
69 bool "Environment is in a EXT4 filesystem"
70 depends on !CHAIN_OF_TRUST
Michal Simek07661782020-08-19 10:44:23 +020071 select FS_EXT4
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +010072 select EXT4_WRITE
73 help
74 Define this if you want to use the EXT4 file system for the environment.
75
Simon Glass0649cd02017-08-03 12:21:49 -060076config ENV_IS_IN_FLASH
77 bool "Environment in flash memory"
78 depends on !CHAIN_OF_TRUST
Maxime Ripardfb694642018-01-23 21:17:01 +010079 default y if ARCH_CINTEGRATOR
80 default y if ARCH_INTEGRATOR_CP
Tom Rini9b7993b2021-05-14 21:34:10 -040081 default y if M548x || M547x || M5282
Maxime Ripardfb694642018-01-23 21:17:01 +010082 default y if MCF532x || MCF52x2
83 default y if MPC86xx || MPC83xx
Tom Rini1c588572021-05-14 21:34:26 -040084 default y if ARCH_MPC8548
Maxime Ripardfb694642018-01-23 21:17:01 +010085 default y if SH && !CPU_SH4
Simon Glass0649cd02017-08-03 12:21:49 -060086 help
87 Define this if you have a flash device which you want to use for the
88 environment.
89
90 a) The environment occupies one whole flash sector, which is
91 "embedded" in the text segment with the U-Boot code. This
92 happens usually with "bottom boot sector" or "top boot
93 sector" type flash chips, which have several smaller
94 sectors at the start or the end. For instance, such a
95 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
96 such a case you would place the environment in one of the
97 4 kB sectors - with U-Boot code before and after it. With
98 "top boot sector" type flash chips, you would put the
99 environment in one of the last sectors, leaving a gap
100 between U-Boot and the environment.
101
102 CONFIG_ENV_OFFSET:
103
104 Offset of environment data (variable area) to the
105 beginning of flash memory; for instance, with bottom boot
106 type flash chips the second sector can be used: the offset
107 for this sector is given here.
108
109 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
110
111 CONFIG_ENV_ADDR:
112
113 This is just another way to specify the start address of
114 the flash sector containing the environment (instead of
115 CONFIG_ENV_OFFSET).
116
117 CONFIG_ENV_SECT_SIZE:
118
119 Size of the sector containing the environment.
120
121
122 b) Sometimes flash chips have few, equal sized, BIG sectors.
123 In such a case you don't want to spend a whole sector for
124 the environment.
125
126 CONFIG_ENV_SIZE:
127
128 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
129 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
130 of this flash sector for the environment. This saves
131 memory for the RAM copy of the environment.
132
133 It may also save flash memory if you decide to use this
134 when your environment is "embedded" within U-Boot code,
135 since then the remainder of the flash sector could be used
136 for U-Boot code. It should be pointed out that this is
137 STRONGLY DISCOURAGED from a robustness point of view:
138 updating the environment in flash makes it always
139 necessary to erase the WHOLE sector. If something goes
140 wrong before the contents has been restored from a copy in
141 RAM, your target system will be dead.
142
143 CONFIG_ENV_ADDR_REDUND
Simon Glass0649cd02017-08-03 12:21:49 -0600144
145 These settings describe a second storage area used to hold
146 a redundant copy of the environment data, so that there is
147 a valid backup copy in case there is a power failure during
148 a "saveenv" operation.
149
150 BE CAREFUL! Any changes to the flash layout, and some changes to the
151 source code will make it necessary to adapt <board>/u-boot.lds*
152 accordingly!
153
154config ENV_IS_IN_MMC
155 bool "Environment in an MMC device"
156 depends on !CHAIN_OF_TRUST
Maxime Ripardd282a1d2018-01-23 21:17:00 +0100157 depends on MMC
Maxime Ripardfb694642018-01-23 21:17:01 +0100158 default y if ARCH_EXYNOS4
159 default y if MX6SX || MX7D
160 default y if TEGRA30 || TEGRA124
161 default y if TEGRA_ARMV8_COMMON
Simon Glass0649cd02017-08-03 12:21:49 -0600162 help
163 Define this if you have an MMC device which you want to use for the
164 environment.
165
166 CONFIG_SYS_MMC_ENV_DEV:
167
168 Specifies which MMC device the environment is stored in.
169
170 CONFIG_SYS_MMC_ENV_PART (optional):
171
172 Specifies which MMC partition the environment is stored in. If not
173 set, defaults to partition 0, the user area. Common values might be
174 1 (first MMC boot partition), 2 (second MMC boot partition).
175
176 CONFIG_ENV_OFFSET:
177 CONFIG_ENV_SIZE:
178
179 These two #defines specify the offset and size of the environment
180 area within the specified MMC device.
181
182 If offset is positive (the usual case), it is treated as relative to
183 the start of the MMC partition. If offset is negative, it is treated
184 as relative to the end of the MMC partition. This can be useful if
185 your board may be fitted with different MMC devices, which have
186 different sizes for the MMC partitions, and you always want the
187 environment placed at the very end of the partition, to leave the
188 maximum possible space before it, to store other data.
189
190 These two values are in units of bytes, but must be aligned to an
191 MMC sector boundary.
192
193 CONFIG_ENV_OFFSET_REDUND (optional):
194
195 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
196 hold a redundant copy of the environment data. This provides a
197 valid backup copy in case the other copy is corrupted, e.g. due
198 to a power failure during a "saveenv" operation.
199
200 This value may also be positive or negative; this is handled in the
201 same way as CONFIG_ENV_OFFSET.
202
203 This value is also in units of bytes, but must also be aligned to
204 an MMC sector boundary.
205
Simon Glass0649cd02017-08-03 12:21:49 -0600206config ENV_IS_IN_NAND
207 bool "Environment in a NAND device"
208 depends on !CHAIN_OF_TRUST
209 help
210 Define this if you have a NAND device which you want to use for the
211 environment.
212
213 - CONFIG_ENV_OFFSET:
214 - CONFIG_ENV_SIZE:
215
216 These two #defines specify the offset and size of the environment
217 area within the first NAND device. CONFIG_ENV_OFFSET must be
218 aligned to an erase block boundary.
219
220 - CONFIG_ENV_OFFSET_REDUND (optional):
221
222 This setting describes a second storage area of CONFIG_ENV_SIZE
223 size used to hold a redundant copy of the environment data, so
224 that there is a valid backup copy in case there is a power failure
225 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
226 aligned to an erase block boundary.
227
228 - CONFIG_ENV_RANGE (optional):
229
230 Specifies the length of the region in which the environment
231 can be written. This should be a multiple of the NAND device's
232 block size. Specifying a range with more erase blocks than
233 are needed to hold CONFIG_ENV_SIZE allows bad blocks within
234 the range to be avoided.
235
236 - CONFIG_ENV_OFFSET_OOB (optional):
237
238 Enables support for dynamically retrieving the offset of the
239 environment from block zero's out-of-band data. The
240 "nand env.oob" command can be used to record this offset.
241 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
242 using CONFIG_ENV_OFFSET_OOB.
243
244config ENV_IS_IN_NVRAM
245 bool "Environment in a non-volatile RAM"
246 depends on !CHAIN_OF_TRUST
247 help
248 Define this if you have some non-volatile memory device
249 (NVRAM, battery buffered SRAM) which you want to use for the
250 environment.
251
252 - CONFIG_ENV_ADDR:
253 - CONFIG_ENV_SIZE:
254
255 These two #defines are used to determine the memory area you
256 want to use for environment. It is assumed that this memory
257 can just be read and written to, without any special
258 provision.
259
260config ENV_IS_IN_ONENAND
261 bool "Environment is in OneNAND"
262 depends on !CHAIN_OF_TRUST
263 help
264 Define this if you want to put your local device's environment in
265 OneNAND.
266
267 - CONFIG_ENV_ADDR:
268 - CONFIG_ENV_SIZE:
269
270 These two #defines are used to determine the device range you
271 want to use for environment. It is assumed that this memory
272 can just be read and written to, without any special
273 provision.
274
275config ENV_IS_IN_REMOTE
Heinrich Schuchardt646f1ab2018-03-17 22:53:11 +0000276 bool "Environment is in remote memory space"
Simon Glass0649cd02017-08-03 12:21:49 -0600277 depends on !CHAIN_OF_TRUST
278 help
279 Define this if you have a remote memory space which you
280 want to use for the local device's environment.
281
282 - CONFIG_ENV_ADDR:
283 - CONFIG_ENV_SIZE:
284
285 These two #defines specify the address and size of the
286 environment area within the remote memory space. The
287 local device can get the environment from remote memory
288 space by SRIO or PCIE links.
289
290config ENV_IS_IN_SPI_FLASH
291 bool "Environment is in SPI flash"
Tom Rinia4298dd2019-05-29 17:01:28 -0400292 depends on !CHAIN_OF_TRUST && SPI
Maxime Ripardfb694642018-01-23 21:17:01 +0100293 default y if ARMADA_XP
294 default y if INTEL_BAYTRAIL
295 default y if INTEL_BRASWELL
296 default y if INTEL_BROADWELL
297 default y if NORTHBRIDGE_INTEL_IVYBRIDGE
298 default y if INTEL_QUARK
299 default y if INTEL_QUEENSBAY
Simon Glass0649cd02017-08-03 12:21:49 -0600300 help
301 Define this if you have a SPI Flash memory device which you
302 want to use for the environment.
303
304 - CONFIG_ENV_OFFSET:
305 - CONFIG_ENV_SIZE:
306
307 These two #defines specify the offset and size of the
308 environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
309 aligned to an erase sector boundary.
310
311 - CONFIG_ENV_SECT_SIZE:
312
313 Define the SPI flash's sector size.
314
315 - CONFIG_ENV_OFFSET_REDUND (optional):
316
317 This setting describes a second storage area of CONFIG_ENV_SIZE
318 size used to hold a redundant copy of the environment data, so
319 that there is a valid backup copy in case there is a power failure
320 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
321 aligned to an erase sector boundary.
322
Rasmus Villemoesbcb44f62021-04-14 20:51:43 +0200323config ENV_SECT_SIZE_AUTO
324 bool "Use automatically detected sector size"
325 depends on ENV_IS_IN_SPI_FLASH
326 help
327 Some boards exist in multiple variants, with different
328 flashes having different sector sizes. In such cases, you
329 can select this option to make U-Boot use the actual sector
330 size when figuring out how much to erase, which can thus be
331 more efficient on the flashes with smaller erase size. Since
332 the environment must always be aligned on a sector boundary,
333 CONFIG_ENV_OFFSET must be aligned to the largest of the
334 different sector sizes, and CONFIG_ENV_SECT_SIZE should be
335 set to that value.
336
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100337config USE_ENV_SPI_BUS
338 bool "SPI flash bus for environment"
339 depends on ENV_IS_IN_SPI_FLASH
340 help
341 Force the SPI bus for environment.
342 If not defined, use CONFIG_SF_DEFAULT_BUS.
Simon Glass0649cd02017-08-03 12:21:49 -0600343
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100344config ENV_SPI_BUS
345 int "Value of SPI flash bus for environment"
346 depends on USE_ENV_SPI_BUS
347 help
348 Value the SPI bus and chip select for environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600349
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100350config USE_ENV_SPI_CS
351 bool "SPI flash chip select for environment"
352 depends on ENV_IS_IN_SPI_FLASH
353 help
354 Force the SPI chip select for environment.
355 If not defined, use CONFIG_SF_DEFAULT_CS.
Simon Glass0649cd02017-08-03 12:21:49 -0600356
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100357config ENV_SPI_CS
358 int "Value of SPI flash chip select for environment"
359 depends on USE_ENV_SPI_CS
360 help
361 Value of the SPI chip select for environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600362
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100363config USE_ENV_SPI_MAX_HZ
Marek Vasutdd309612019-05-04 19:10:05 +0200364 bool "SPI flash max frequency for environment"
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100365 depends on ENV_IS_IN_SPI_FLASH
366 help
367 Force the SPI max work clock for environment.
368 If not defined, use CONFIG_SF_DEFAULT_SPEED.
Simon Glass0649cd02017-08-03 12:21:49 -0600369
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100370config ENV_SPI_MAX_HZ
Marek Vasutdd309612019-05-04 19:10:05 +0200371 int "Value of SPI flash max frequency for environment"
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100372 depends on USE_ENV_SPI_MAX_HZ
373 help
374 Value of the SPI max work clock for environment.
375
376config USE_ENV_SPI_MODE
377 bool "SPI flash mode for environment"
378 depends on ENV_IS_IN_SPI_FLASH
379 help
380 Force the SPI work mode for environment.
381
382config ENV_SPI_MODE
383 hex "Value of SPI flash work mode for environment"
384 depends on USE_ENV_SPI_MODE
385 help
386 Value of the SPI work mode for environment.
387 See include/spi.h for value.
Simon Glass0649cd02017-08-03 12:21:49 -0600388
Heiko Schocher92765f452020-10-10 10:28:05 +0200389config ENV_SPI_EARLY
390 bool "Access Environment in SPI flashes before relocation"
391 depends on ENV_IS_IN_SPI_FLASH
392 help
393 Enable this if you want to use Environment in SPI flash
394 before relocation. Call env_init() and than you can use
395 env_get_f() for accessing Environment variables.
396
Simon Glass0649cd02017-08-03 12:21:49 -0600397config ENV_IS_IN_UBI
398 bool "Environment in a UBI volume"
399 depends on !CHAIN_OF_TRUST
Miquel Raynal00e27042019-10-03 19:50:12 +0200400 depends on MTD_UBI
401 depends on CMD_UBI
Simon Glass0649cd02017-08-03 12:21:49 -0600402 help
403 Define this if you have an UBI volume that you want to use for the
404 environment. This has the benefit of wear-leveling the environment
405 accesses, which is important on NAND.
406
407 - CONFIG_ENV_UBI_PART:
408
409 Define this to a string that is the mtd partition containing the UBI.
410
411 - CONFIG_ENV_UBI_VOLUME:
412
413 Define this to the name of the volume that you want to store the
414 environment in.
415
416 - CONFIG_ENV_UBI_VOLUME_REDUND:
417
418 Define this to the name of another volume to store a second copy of
419 the environment in. This will enable redundant environments in UBI.
420 It is assumed that both volumes are in the same MTD partition.
421
Tom Rinicb6617a2019-11-10 11:28:03 -0500422config SYS_REDUNDAND_ENVIRONMENT
423 bool "Enable redundant environment support"
Tom Rinicb6617a2019-11-10 11:28:03 -0500424 help
425 Normally, the environemt is stored in a single location. By
426 selecting this option, you can then define where to hold a redundant
427 copy of the environment data, so that there is a valid backup copy in
428 case there is a power failure during a "saveenv" operation.
Michal Simek4e3fc5e2021-01-13 10:25:50 +0100429 Also this config changes the binary environment structure handling
430 which is used by env import/export commands which are independent of
431 storing variables to redundant location on a non volatile device.
Tom Rinicb6617a2019-11-10 11:28:03 -0500432
Simon Glass0649cd02017-08-03 12:21:49 -0600433config ENV_FAT_INTERFACE
434 string "Name of the block device for the environment"
435 depends on ENV_IS_IN_FAT
Michal Simek8d782112020-02-25 15:50:33 +0100436 default "mmc"
Simon Glass0649cd02017-08-03 12:21:49 -0600437 help
438 Define this to a string that is the name of the block device.
439
440config ENV_FAT_DEVICE_AND_PART
441 string "Device and partition for where to store the environemt in FAT"
442 depends on ENV_IS_IN_FAT
443 default "0:1" if TI_COMMON_CMD_OPTIONS
Ashok Reddy Soma4fb83c92021-02-23 08:07:46 -0700444 default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
Samuel Holland1011ebc2021-04-18 22:16:21 -0500445 default ":auto" if ARCH_SUNXI
Simon Glass0649cd02017-08-03 12:21:49 -0600446 default "0" if ARCH_AT91
447 help
448 Define this to a string to specify the partition of the device. It can
449 be as following:
450
451 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
452 - "D:P": device D partition P. Error occurs if device D has no
453 partition table.
454 - "D:0": device D.
455 - "D" or "D:": device D partition 1 if device D has partition
456 table, or the whole device D if has no partition
457 table.
458 - "D:auto": first partition in device D with bootable flag set.
459 If none, first valid partition in device D. If no
460 partition table then means device D.
461
David Woodhouse6731bef2020-06-19 23:07:17 +0100462 If ENV_FAT_INTERFACE is set to "mmc" then device 'D' can be omitted,
463 leaving the string starting with a colon, and the boot device will
464 be used.
465
Simon Glass0649cd02017-08-03 12:21:49 -0600466config ENV_FAT_FILE
Shyam Saini919d25c2018-06-07 19:47:19 +0530467 string "Name of the FAT file to use for the environment"
Simon Glass0649cd02017-08-03 12:21:49 -0600468 depends on ENV_IS_IN_FAT
469 default "uboot.env"
470 help
471 It's a string of the FAT file name. This file use to store the
472 environment.
473
Brandon Maier2339f012021-01-16 15:14:43 -0600474config ENV_FAT_FILE_REDUND
475 string "Name of the FAT file to use for the environment"
476 depends on ENV_IS_IN_FAT && SYS_REDUNDAND_ENVIRONMENT
477 default "uboot-redund.env"
478 help
479 It's a string of the FAT file name. This file use to store the
480 redundant environment.
481
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100482config ENV_EXT4_INTERFACE
483 string "Name of the block device for the environment"
484 depends on ENV_IS_IN_EXT4
485 help
486 Define this to a string that is the name of the block device.
487
488config ENV_EXT4_DEVICE_AND_PART
489 string "Device and partition for where to store the environemt in EXT4"
490 depends on ENV_IS_IN_EXT4
491 help
492 Define this to a string to specify the partition of the device. It can
493 be as following:
494
495 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
496 - "D:P": device D partition P. Error occurs if device D has no
497 partition table.
498 - "D:0": device D.
499 - "D" or "D:": device D partition 1 if device D has partition
500 table, or the whole device D if has no partition
501 table.
502 - "D:auto": first partition in device D with bootable flag set.
503 If none, first valid partition in device D. If no
504 partition table then means device D.
505
David Woodhouseb0493bb2020-08-04 10:05:47 +0100506 If ENV_EXT4_INTERFACE is set to "mmc" then device 'D' can be omitted,
507 leaving the string starting with a colon, and the boot device will
508 be used.
509
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100510config ENV_EXT4_FILE
Shyam Saini919d25c2018-06-07 19:47:19 +0530511 string "Name of the EXT4 file to use for the environment"
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100512 depends on ENV_IS_IN_EXT4
Patrick Delaunay87dac742020-07-28 11:51:14 +0200513 default "/uboot.env"
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100514 help
515 It's a string of the EXT4 file name. This file use to store the
516 environment (explicit path to the file)
517
Tom Rinia09fea12019-11-18 20:02:10 -0500518config ENV_ADDR
519 hex "Environment address"
520 depends on ENV_IS_IN_FLASH || ENV_IS_IN_NVRAM || ENV_IS_IN_ONENAND || \
521 ENV_IS_IN_REMOTE || ENV_IS_IN_SPI_FLASH
522 default 0x0 if ENV_IS_IN_SPI_FLASH
523 help
524 Offset from the start of the device (or partition)
525
526config ENV_ADDR_REDUND
527 hex "Redundant environment address"
528 depends on ENV_IS_IN_FLASH && SYS_REDUNDAND_ENVIRONMENT
529 help
530 Offset from the start of the device (or partition) of the redundant
531 environment location.
Simon Glass0649cd02017-08-03 12:21:49 -0600532
533config ENV_OFFSET
Tom Rinia09fea12019-11-18 20:02:10 -0500534 hex "Environment offset"
535 depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
536 ENV_IS_IN_SPI_FLASH
Jagan Tekid7b433e2019-12-21 13:24:35 +0530537 default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki54b85a92019-12-21 13:24:36 +0530538 default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Simon Glass0649cd02017-08-03 12:21:49 -0600539 default 0x88000 if ARCH_SUNXI
Michal Simek4aee6242018-07-19 08:45:45 +0200540 default 0xE0000 if ARCH_ZYNQ
541 default 0x1E00000 if ARCH_ZYNQMP
T Karthik Reddyf8c0f9f2019-08-05 16:18:57 +0530542 default 0x7F40000 if ARCH_VERSAL
Alexey Brodkin70b5ea72019-01-15 11:42:48 +0300543 default 0 if ARC
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200544 default 0x140000 if ARCH_AT91
545 default 0x260000 if ARCH_OMAP2PLUS
Varalaxmi Bingi63e988e2020-02-05 03:58:20 -0700546 default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Simon Glass0649cd02017-08-03 12:21:49 -0600547 help
548 Offset from the start of the device (or partition)
549
Tom Rinia09fea12019-11-18 20:02:10 -0500550config ENV_OFFSET_REDUND
551 hex "Redundant environment offset"
552 depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
553 ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT
Michal Simekec217212021-02-24 10:33:45 +0100554 default 0
Tom Rinia09fea12019-11-18 20:02:10 -0500555 help
556 Offset from the start of the device (or partition) of the redundant
557 environment location.
558
Simon Glass0649cd02017-08-03 12:21:49 -0600559config ENV_SIZE
560 hex "Environment Size"
Michal Simek4aee6242018-07-19 08:45:45 +0200561 default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200562 default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Jagan Tekid7b433e2019-12-21 13:24:35 +0530563 default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki54b85a92019-12-21 13:24:36 +0530564 default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Jagan Tekid7b433e2019-12-21 13:24:35 +0530565 default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL
Alexey Brodkin70b5ea72019-01-15 11:42:48 +0300566 default 0x4000 if ARC
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200567 default 0x1f000
Simon Glass0649cd02017-08-03 12:21:49 -0600568 help
569 Size of the environment storage area
570
Michal Simek4aee6242018-07-19 08:45:45 +0200571config ENV_SECT_SIZE
572 hex "Environment Sector-Size"
Tom Rinia09fea12019-11-18 20:02:10 -0500573 depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
Jagan Teki54b85a92019-12-21 13:24:36 +0530574 default 0x2000 if ARCH_ROCKCHIP
T Karthik Reddyf8c0f9f2019-08-05 16:18:57 +0530575 default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200576 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Varalaxmi Bingi63e988e2020-02-05 03:58:20 -0700577 default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Michal Simek4aee6242018-07-19 08:45:45 +0200578 help
579 Size of the sector containing the environment.
580
Simon Glass0649cd02017-08-03 12:21:49 -0600581config ENV_UBI_PART
582 string "UBI partition name"
583 depends on ENV_IS_IN_UBI
584 help
585 MTD partition containing the UBI device
586
587config ENV_UBI_VOLUME
588 string "UBI volume name"
589 depends on ENV_IS_IN_UBI
590 help
591 Name of the volume that you want to store the environment in.
592
Markus Klotzbuecherff4818c2019-05-15 15:15:53 +0200593config ENV_UBI_VOLUME_REDUND
594 string "UBI redundant volume name"
Tom Rinicb6617a2019-11-10 11:28:03 -0500595 depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT
Markus Klotzbuecherff4818c2019-05-15 15:15:53 +0200596 help
597 Name of the redundant volume that you want to store the environment in.
598
Hamish Guthrie985186d2019-05-15 15:15:55 +0200599config ENV_UBI_VID_OFFSET
600 int "ubi environment VID offset"
601 depends on ENV_IS_IN_UBI
602 default 0
603 help
604 UBI VID offset for environment. If 0, no custom VID offset is used.
605
Tom Rini8d8ee472019-11-12 22:46:36 -0500606config SYS_RELOC_GD_ENV_ADDR
Patrick Delaunay35c26832020-06-10 19:28:42 +0200607 bool "Relocate gd->env_addr"
Tom Rini8d8ee472019-11-12 22:46:36 -0500608 help
609 Relocate the early env_addr pointer so we know it is not inside
610 the binary. Some systems need this and for the rest, it doesn't hurt.
611
Tom Rini7d080772020-07-24 17:14:47 -0400612config SYS_MMC_ENV_DEV
613 int "mmc device number"
614 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
Kuldeep Singh9b90e0d2021-08-10 11:20:06 +0530615 CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA
Tom Rini7d080772020-07-24 17:14:47 -0400616 default 0
617 help
618 MMC device number on the platform where the environment is stored.
619
620config SYS_MMC_ENV_PART
621 int "mmc partition number"
622 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
623 default 0
624 help
625 MMC hardware partition device number on the platform where the
626 environment is stored. Note that this is not related to any software
627 defined partition table but instead if we are in the user area, which is
628 partition 0 or the first boot partition, which is 1 or some other defined
629 partition.
630
Rasmus Villemoesf3d8f7d2018-03-20 11:38:45 +0100631config USE_DEFAULT_ENV_FILE
632 bool "Create default environment from file"
633 help
634 Normally, the default environment is automatically generated
635 based on the settings of various CONFIG_* options, as well
636 as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option,
637 you can instead define the entire default environment in an
638 external file.
639
640config DEFAULT_ENV_FILE
641 string "Path to default environment file"
642 depends on USE_DEFAULT_ENV_FILE
643 help
644 The path containing the default environment. The format is
645 the same as accepted by the mkenvimage tool: lines
646 containing key=value pairs, blank lines and lines beginning
647 with # are ignored.
648
Alex Kiernand9101302018-04-01 16:37:53 +0000649config ENV_VARS_UBOOT_RUNTIME_CONFIG
650 bool "Add run-time information to the environment"
651 help
652 Enable this in order to add variables describing certain
653 run-time determined information about the hardware to the
654 environment. These will be named board_name, board_rev.
655
Ovidiu Panaitb8879f22020-05-06 20:38:42 +0300656config DELAY_ENVIRONMENT
657 bool "Delay environment loading"
658 depends on !OF_CONTROL
659 help
660 Enable this to inhibit loading the environment during board
661 initialization. This can address the security risk of untrusted data
662 being used during boot. Normally the environment is loaded when the
663 board is initialised so that it is available to U-Boot. This inhibits
664 that so that the environment is not available until explicitly loaded
665 later by U-Boot code. With CONFIG_OF_CONTROL this is instead
666 controlled by the value of /config/load-environment.
667
Rasmus Villemoes95fd9772021-04-21 11:06:54 +0200668config ENV_IMPORT_FDT
669 bool "Amend environment by FDT properties"
670 depends on OF_CONTROL
671 help
672 If selected, after the environment has been loaded from its
673 persistent location, the "env_fdt_path" variable is looked
674 up and used as a path to a node in the control DTB. The
675 property/value pairs in that node is then used to update the
676 run-time environment. This can be useful to use the same
677 U-Boot binary with different board variants.
678
679config ENV_FDT_PATH
680 string "Default value for env_fdt_path variable"
681 depends on ENV_IMPORT_FDT
682 default "/config/environment"
683 help
684 The initial value of the env_fdt_path variable.
685
Marek Vasut47f3b1f2020-07-07 20:51:38 +0200686config ENV_APPEND
687 bool "Always append the environment with new data"
Marek Vasut47f3b1f2020-07-07 20:51:38 +0200688 help
689 If defined, the environment hash table is only ever appended with new
690 data, but the existing hash table can never be dropped and reloaded
691 with newly imported data. This may be used in combination with static
692 flags to e.g. to protect variables which must not be modified.
693
Marek Vasutd045cba2020-07-07 20:51:39 +0200694config ENV_WRITEABLE_LIST
695 bool "Permit write access only to listed variables"
Marek Vasutd045cba2020-07-07 20:51:39 +0200696 help
697 If defined, only environment variables which explicitly set the 'w'
698 writeable flag can be written and modified at runtime. No variables
699 can be otherwise created, written or imported into the environment.
700
Marek Vasut3ec46992020-05-22 01:10:14 +0200701config ENV_ACCESS_IGNORE_FORCE
702 bool "Block forced environment operations"
Marek Vasut3ec46992020-05-22 01:10:14 +0200703 help
704 If defined, don't allow the -f switch to env set override variable
705 access flags.
706
York Sun474ecd22018-06-26 10:03:22 -0700707if SPL_ENV_SUPPORT
708config SPL_ENV_IS_NOWHERE
709 bool "SPL Environment is not stored"
710 default y if ENV_IS_NOWHERE
711 help
712 Similar to ENV_IS_NOWHERE, used for SPL environment.
713
714config SPL_ENV_IS_IN_MMC
715 bool "SPL Environment in an MMC device"
716 depends on !SPL_ENV_IS_NOWHERE
717 depends on ENV_IS_IN_MMC
718 default y
719 help
720 Similar to ENV_IS_IN_MMC, used for SPL environment.
721
722config SPL_ENV_IS_IN_FAT
723 bool "SPL Environment is in a FAT filesystem"
724 depends on !SPL_ENV_IS_NOWHERE
725 depends on ENV_IS_IN_FAT
726 default y
727 help
728 Similar to ENV_IS_IN_FAT, used for SPL environment.
729
730config SPL_ENV_IS_IN_EXT4
731 bool "SPL Environment is in a EXT4 filesystem"
732 depends on !SPL_ENV_IS_NOWHERE
733 depends on ENV_IS_IN_EXT4
734 default y
735 help
736 Similar to ENV_IS_IN_EXT4, used for SPL environment.
737
738config SPL_ENV_IS_IN_NAND
739 bool "SPL Environment in a NAND device"
740 depends on !SPL_ENV_IS_NOWHERE
741 depends on ENV_IS_IN_NAND
742 default y
743 help
744 Similar to ENV_IS_IN_NAND, used for SPL environment.
745
746config SPL_ENV_IS_IN_SPI_FLASH
747 bool "SPL Environment is in SPI flash"
748 depends on !SPL_ENV_IS_NOWHERE
749 depends on ENV_IS_IN_SPI_FLASH
750 default y
751 help
752 Similar to ENV_IS_IN_SPI_FLASH, used for SPL environment.
753
754config SPL_ENV_IS_IN_FLASH
755 bool "SPL Environment in flash memory"
756 depends on !SPL_ENV_IS_NOWHERE
757 depends on ENV_IS_IN_FLASH
758 default y
759 help
760 Similar to ENV_IS_IN_FLASH, used for SPL environment.
761
762endif
763
764if TPL_ENV_SUPPORT
765
766config TPL_ENV_IS_NOWHERE
767 bool "TPL Environment is not stored"
768 default y if ENV_IS_NOWHERE
769 help
770 Similar to ENV_IS_NOWHERE, used for TPL environment.
771
772config TPL_ENV_IS_IN_MMC
773 bool "TPL Environment in an MMC device"
774 depends on !TPL_ENV_IS_NOWHERE
775 depends on ENV_IS_IN_MMC
776 default y
777 help
778 Similar to ENV_IS_IN_MMC, used for TPL environment.
779
780config TPL_ENV_IS_IN_FAT
781 bool "TPL Environment is in a FAT filesystem"
782 depends on !TPL_ENV_IS_NOWHERE
783 depends on ENV_IS_IN_FAT
784 default y
785 help
786 Similar to ENV_IS_IN_FAT, used for TPL environment.
787
788config TPL_ENV_IS_IN_EXT4
789 bool "TPL Environment is in a EXT4 filesystem"
790 depends on !TPL_ENV_IS_NOWHERE
791 depends on ENV_IS_IN_EXT4
792 default y
793 help
794 Similar to ENV_IS_IN_EXT4, used for TPL environment.
795
796config TPL_ENV_IS_IN_NAND
797 bool "TPL Environment in a NAND device"
798 depends on !TPL_ENV_IS_NOWHERE
799 depends on ENV_IS_IN_NAND
800 default y
801 help
802 Similar to ENV_IS_IN_NAND, used for TPL environment.
803
804config TPL_ENV_IS_IN_SPI_FLASH
805 bool "TPL Environment is in SPI flash"
806 depends on !TPL_ENV_IS_NOWHERE
807 depends on ENV_IS_IN_SPI_FLASH
808 default y
809 help
810 Similar to ENV_IS_IN_SPI_FLASH, used for TPL environment.
811
812config TPL_ENV_IS_IN_FLASH
813 bool "TPL Environment in flash memory"
814 depends on !TPL_ENV_IS_NOWHERE
815 depends on ENV_IS_IN_FLASH
816 default y
817 help
818 Similar to ENV_IS_IN_FLASH, used for TPL environment.
819
820endif
821
Simon Glassbc438b62020-09-10 20:21:24 -0600822config VERSION_VARIABLE
823 bool "Add a 'ver' environment variable with the U-Boot version"
824 help
825 If this variable is defined, an environment variable
826 named "ver" is created by U-Boot showing the U-Boot
827 version as printed by the "version" command.
828 Any change to this variable will be reverted at the
829 next reset.
830
Simon Glass0649cd02017-08-03 12:21:49 -0600831endmenu