blob: 844c3128705391623c06547b0371b5330321747a [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
Rasmus Villemoes21294752020-02-19 09:47:39 +00006config SAVEENV
7 def_bool y if CMD_SAVEENV
8
Adam Ford710966e2020-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 Glass87551f12017-08-03 12:21:59 -060015config ENV_IS_NOWHERE
16 bool "Environment is not stored"
Patrice Chotardaf755812019-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 Glass87551f12017-08-03 12:21:59 -060023 help
24 Define this if you don't want to or can't have an environment stored
Shyam Sainiefe757c2018-06-07 19:47:19 +053025 on a storage medium. In this case the environment will still exist
Simon Glass87551f12017-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 Glass547cb402017-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 Glass547cb402017-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 Glass547cb402017-08-03 12:21:49 -060047 - CONFIG_ENV_EEPROM_IS_ON_I2C
48 define this, if you have I2C and SPI activated, and your
49 EEPROM, which holds the environment, is on the I2C bus.
50
51 - CONFIG_I2C_ENV_EEPROM_BUS
52 if you have an Environment on an EEPROM reached over
53 I2C muxes, you can define here, how to reach this
54 EEPROM. For example:
55
56 #define CONFIG_I2C_ENV_EEPROM_BUS 1
57
58 EEPROM which holds the environment, is reached over
59 a pca9547 i2c mux with address 0x70, channel 3.
60
61config ENV_IS_IN_FAT
62 bool "Environment is in a FAT filesystem"
63 depends on !CHAIN_OF_TRUST
Maxime Ripard7569e182018-01-23 21:17:01 +010064 default y if ARCH_BCM283X
Maxime Ripard8b7dcd32018-01-23 21:17:04 +010065 default y if ARCH_SUNXI && MMC
Maxime Ripard7569e182018-01-23 21:17:01 +010066 default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
Tuomas Tynkkynendc256cd2018-01-05 02:45:19 +020067 select FS_FAT
Simon Glass547cb402017-08-03 12:21:49 -060068 select FAT_WRITE
69 help
Simon Glassea8bf842017-08-03 12:21:50 -060070 Define this if you want to use the FAT file system for the environment.
Simon Glass547cb402017-08-03 12:21:49 -060071
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +010072config ENV_IS_IN_EXT4
73 bool "Environment is in a EXT4 filesystem"
74 depends on !CHAIN_OF_TRUST
Michal Simek4b4ba3c2020-08-19 10:44:23 +020075 select FS_EXT4
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +010076 select EXT4_WRITE
77 help
78 Define this if you want to use the EXT4 file system for the environment.
79
Simon Glass547cb402017-08-03 12:21:49 -060080config ENV_IS_IN_FLASH
81 bool "Environment in flash memory"
82 depends on !CHAIN_OF_TRUST
Maxime Ripard7569e182018-01-23 21:17:01 +010083 default y if ARCH_CINTEGRATOR
84 default y if ARCH_INTEGRATOR_CP
85 default y if M548x || M547x || M5282 || MCF547x_8x
86 default y if MCF532x || MCF52x2
87 default y if MPC86xx || MPC83xx
88 default y if ARCH_MPC8572 || ARCH_MPC8548 || ARCH_MPC8641
89 default y if SH && !CPU_SH4
Simon Glass547cb402017-08-03 12:21:49 -060090 help
91 Define this if you have a flash device which you want to use for the
92 environment.
93
94 a) The environment occupies one whole flash sector, which is
95 "embedded" in the text segment with the U-Boot code. This
96 happens usually with "bottom boot sector" or "top boot
97 sector" type flash chips, which have several smaller
98 sectors at the start or the end. For instance, such a
99 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
100 such a case you would place the environment in one of the
101 4 kB sectors - with U-Boot code before and after it. With
102 "top boot sector" type flash chips, you would put the
103 environment in one of the last sectors, leaving a gap
104 between U-Boot and the environment.
105
106 CONFIG_ENV_OFFSET:
107
108 Offset of environment data (variable area) to the
109 beginning of flash memory; for instance, with bottom boot
110 type flash chips the second sector can be used: the offset
111 for this sector is given here.
112
113 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
114
115 CONFIG_ENV_ADDR:
116
117 This is just another way to specify the start address of
118 the flash sector containing the environment (instead of
119 CONFIG_ENV_OFFSET).
120
121 CONFIG_ENV_SECT_SIZE:
122
123 Size of the sector containing the environment.
124
125
126 b) Sometimes flash chips have few, equal sized, BIG sectors.
127 In such a case you don't want to spend a whole sector for
128 the environment.
129
130 CONFIG_ENV_SIZE:
131
132 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
133 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
134 of this flash sector for the environment. This saves
135 memory for the RAM copy of the environment.
136
137 It may also save flash memory if you decide to use this
138 when your environment is "embedded" within U-Boot code,
139 since then the remainder of the flash sector could be used
140 for U-Boot code. It should be pointed out that this is
141 STRONGLY DISCOURAGED from a robustness point of view:
142 updating the environment in flash makes it always
143 necessary to erase the WHOLE sector. If something goes
144 wrong before the contents has been restored from a copy in
145 RAM, your target system will be dead.
146
147 CONFIG_ENV_ADDR_REDUND
Simon Glass547cb402017-08-03 12:21:49 -0600148
149 These settings describe a second storage area used to hold
150 a redundant copy of the environment data, so that there is
151 a valid backup copy in case there is a power failure during
152 a "saveenv" operation.
153
154 BE CAREFUL! Any changes to the flash layout, and some changes to the
155 source code will make it necessary to adapt <board>/u-boot.lds*
156 accordingly!
157
158config ENV_IS_IN_MMC
159 bool "Environment in an MMC device"
160 depends on !CHAIN_OF_TRUST
Maxime Ripard662a1ec2018-01-23 21:17:00 +0100161 depends on MMC
Maxime Ripard7569e182018-01-23 21:17:01 +0100162 default y if ARCH_EXYNOS4
163 default y if MX6SX || MX7D
164 default y if TEGRA30 || TEGRA124
165 default y if TEGRA_ARMV8_COMMON
Simon Glass547cb402017-08-03 12:21:49 -0600166 help
167 Define this if you have an MMC device which you want to use for the
168 environment.
169
170 CONFIG_SYS_MMC_ENV_DEV:
171
172 Specifies which MMC device the environment is stored in.
173
174 CONFIG_SYS_MMC_ENV_PART (optional):
175
176 Specifies which MMC partition the environment is stored in. If not
177 set, defaults to partition 0, the user area. Common values might be
178 1 (first MMC boot partition), 2 (second MMC boot partition).
179
180 CONFIG_ENV_OFFSET:
181 CONFIG_ENV_SIZE:
182
183 These two #defines specify the offset and size of the environment
184 area within the specified MMC device.
185
186 If offset is positive (the usual case), it is treated as relative to
187 the start of the MMC partition. If offset is negative, it is treated
188 as relative to the end of the MMC partition. This can be useful if
189 your board may be fitted with different MMC devices, which have
190 different sizes for the MMC partitions, and you always want the
191 environment placed at the very end of the partition, to leave the
192 maximum possible space before it, to store other data.
193
194 These two values are in units of bytes, but must be aligned to an
195 MMC sector boundary.
196
197 CONFIG_ENV_OFFSET_REDUND (optional):
198
199 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
200 hold a redundant copy of the environment data. This provides a
201 valid backup copy in case the other copy is corrupted, e.g. due
202 to a power failure during a "saveenv" operation.
203
204 This value may also be positive or negative; this is handled in the
205 same way as CONFIG_ENV_OFFSET.
206
207 This value is also in units of bytes, but must also be aligned to
208 an MMC sector boundary.
209
Simon Glass547cb402017-08-03 12:21:49 -0600210config ENV_IS_IN_NAND
211 bool "Environment in a NAND device"
212 depends on !CHAIN_OF_TRUST
213 help
214 Define this if you have a NAND device which you want to use for the
215 environment.
216
217 - CONFIG_ENV_OFFSET:
218 - CONFIG_ENV_SIZE:
219
220 These two #defines specify the offset and size of the environment
221 area within the first NAND device. CONFIG_ENV_OFFSET must be
222 aligned to an erase block boundary.
223
224 - CONFIG_ENV_OFFSET_REDUND (optional):
225
226 This setting describes a second storage area of CONFIG_ENV_SIZE
227 size used to hold a redundant copy of the environment data, so
228 that there is a valid backup copy in case there is a power failure
229 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
230 aligned to an erase block boundary.
231
232 - CONFIG_ENV_RANGE (optional):
233
234 Specifies the length of the region in which the environment
235 can be written. This should be a multiple of the NAND device's
236 block size. Specifying a range with more erase blocks than
237 are needed to hold CONFIG_ENV_SIZE allows bad blocks within
238 the range to be avoided.
239
240 - CONFIG_ENV_OFFSET_OOB (optional):
241
242 Enables support for dynamically retrieving the offset of the
243 environment from block zero's out-of-band data. The
244 "nand env.oob" command can be used to record this offset.
245 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
246 using CONFIG_ENV_OFFSET_OOB.
247
248config ENV_IS_IN_NVRAM
249 bool "Environment in a non-volatile RAM"
250 depends on !CHAIN_OF_TRUST
251 help
252 Define this if you have some non-volatile memory device
253 (NVRAM, battery buffered SRAM) which you want to use for the
254 environment.
255
256 - CONFIG_ENV_ADDR:
257 - CONFIG_ENV_SIZE:
258
259 These two #defines are used to determine the memory area you
260 want to use for environment. It is assumed that this memory
261 can just be read and written to, without any special
262 provision.
263
264config ENV_IS_IN_ONENAND
265 bool "Environment is in OneNAND"
266 depends on !CHAIN_OF_TRUST
267 help
268 Define this if you want to put your local device's environment in
269 OneNAND.
270
271 - CONFIG_ENV_ADDR:
272 - CONFIG_ENV_SIZE:
273
274 These two #defines are used to determine the device range you
275 want to use for environment. It is assumed that this memory
276 can just be read and written to, without any special
277 provision.
278
279config ENV_IS_IN_REMOTE
Heinrich Schuchardtaefbfe12018-03-17 22:53:11 +0000280 bool "Environment is in remote memory space"
Simon Glass547cb402017-08-03 12:21:49 -0600281 depends on !CHAIN_OF_TRUST
282 help
283 Define this if you have a remote memory space which you
284 want to use for the local device's environment.
285
286 - CONFIG_ENV_ADDR:
287 - CONFIG_ENV_SIZE:
288
289 These two #defines specify the address and size of the
290 environment area within the remote memory space. The
291 local device can get the environment from remote memory
292 space by SRIO or PCIE links.
293
294config ENV_IS_IN_SPI_FLASH
295 bool "Environment is in SPI flash"
Tom Rinie5289a72019-05-29 17:01:28 -0400296 depends on !CHAIN_OF_TRUST && SPI
Maxime Ripard7569e182018-01-23 21:17:01 +0100297 default y if ARMADA_XP
298 default y if INTEL_BAYTRAIL
299 default y if INTEL_BRASWELL
300 default y if INTEL_BROADWELL
301 default y if NORTHBRIDGE_INTEL_IVYBRIDGE
302 default y if INTEL_QUARK
303 default y if INTEL_QUEENSBAY
Simon Glass547cb402017-08-03 12:21:49 -0600304 help
305 Define this if you have a SPI Flash memory device which you
306 want to use for the environment.
307
308 - CONFIG_ENV_OFFSET:
309 - CONFIG_ENV_SIZE:
310
311 These two #defines specify the offset and size of the
312 environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
313 aligned to an erase sector boundary.
314
315 - CONFIG_ENV_SECT_SIZE:
316
317 Define the SPI flash's sector size.
318
319 - CONFIG_ENV_OFFSET_REDUND (optional):
320
321 This setting describes a second storage area of CONFIG_ENV_SIZE
322 size used to hold a redundant copy of the environment data, so
323 that there is a valid backup copy in case there is a power failure
324 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
325 aligned to an erase sector boundary.
326
Rasmus Villemoese535f5b2021-04-14 20:51:43 +0200327config ENV_SECT_SIZE_AUTO
328 bool "Use automatically detected sector size"
329 depends on ENV_IS_IN_SPI_FLASH
330 help
331 Some boards exist in multiple variants, with different
332 flashes having different sector sizes. In such cases, you
333 can select this option to make U-Boot use the actual sector
334 size when figuring out how much to erase, which can thus be
335 more efficient on the flashes with smaller erase size. Since
336 the environment must always be aligned on a sector boundary,
337 CONFIG_ENV_OFFSET must be aligned to the largest of the
338 different sector sizes, and CONFIG_ENV_SECT_SIZE should be
339 set to that value.
340
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100341config USE_ENV_SPI_BUS
342 bool "SPI flash bus for environment"
343 depends on ENV_IS_IN_SPI_FLASH
344 help
345 Force the SPI bus for environment.
346 If not defined, use CONFIG_SF_DEFAULT_BUS.
Simon Glass547cb402017-08-03 12:21:49 -0600347
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100348config ENV_SPI_BUS
349 int "Value of SPI flash bus for environment"
350 depends on USE_ENV_SPI_BUS
351 help
352 Value the SPI bus and chip select for environment.
Simon Glass547cb402017-08-03 12:21:49 -0600353
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100354config USE_ENV_SPI_CS
355 bool "SPI flash chip select for environment"
356 depends on ENV_IS_IN_SPI_FLASH
357 help
358 Force the SPI chip select for environment.
359 If not defined, use CONFIG_SF_DEFAULT_CS.
Simon Glass547cb402017-08-03 12:21:49 -0600360
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100361config ENV_SPI_CS
362 int "Value of SPI flash chip select for environment"
363 depends on USE_ENV_SPI_CS
364 help
365 Value of the SPI chip select for environment.
Simon Glass547cb402017-08-03 12:21:49 -0600366
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100367config USE_ENV_SPI_MAX_HZ
Marek Vasutdfe74622019-05-04 19:10:05 +0200368 bool "SPI flash max frequency for environment"
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100369 depends on ENV_IS_IN_SPI_FLASH
370 help
371 Force the SPI max work clock for environment.
372 If not defined, use CONFIG_SF_DEFAULT_SPEED.
373
374config ENV_SPI_MAX_HZ
Marek Vasutdfe74622019-05-04 19:10:05 +0200375 int "Value of SPI flash max frequency for environment"
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100376 depends on USE_ENV_SPI_MAX_HZ
377 help
378 Value of the SPI max work clock for environment.
379
380config USE_ENV_SPI_MODE
381 bool "SPI flash mode for environment"
382 depends on ENV_IS_IN_SPI_FLASH
383 help
384 Force the SPI work mode for environment.
Simon Glass547cb402017-08-03 12:21:49 -0600385
Patrick Delaunayf8e932e2019-02-27 15:20:38 +0100386config ENV_SPI_MODE
387 hex "Value of SPI flash work mode for environment"
388 depends on USE_ENV_SPI_MODE
389 help
390 Value of the SPI work mode for environment.
391 See include/spi.h for value.
Simon Glass547cb402017-08-03 12:21:49 -0600392
Heiko Schocher704d21c2020-10-10 10:28:05 +0200393config ENV_SPI_EARLY
394 bool "Access Environment in SPI flashes before relocation"
395 depends on ENV_IS_IN_SPI_FLASH
396 help
397 Enable this if you want to use Environment in SPI flash
398 before relocation. Call env_init() and than you can use
399 env_get_f() for accessing Environment variables.
400
Simon Glass547cb402017-08-03 12:21:49 -0600401config ENV_IS_IN_UBI
402 bool "Environment in a UBI volume"
403 depends on !CHAIN_OF_TRUST
Miquel Raynal27271b62019-10-03 19:50:12 +0200404 depends on MTD_UBI
405 depends on CMD_UBI
Simon Glass547cb402017-08-03 12:21:49 -0600406 help
407 Define this if you have an UBI volume that you want to use for the
408 environment. This has the benefit of wear-leveling the environment
409 accesses, which is important on NAND.
410
411 - CONFIG_ENV_UBI_PART:
412
413 Define this to a string that is the mtd partition containing the UBI.
414
415 - CONFIG_ENV_UBI_VOLUME:
416
417 Define this to the name of the volume that you want to store the
418 environment in.
419
420 - CONFIG_ENV_UBI_VOLUME_REDUND:
421
422 Define this to the name of another volume to store a second copy of
423 the environment in. This will enable redundant environments in UBI.
424 It is assumed that both volumes are in the same MTD partition.
425
Tom Rini4bb26a42019-11-10 11:28:03 -0500426config SYS_REDUNDAND_ENVIRONMENT
427 bool "Enable redundant environment support"
Tom Rini4bb26a42019-11-10 11:28:03 -0500428 help
429 Normally, the environemt is stored in a single location. By
430 selecting this option, you can then define where to hold a redundant
431 copy of the environment data, so that there is a valid backup copy in
432 case there is a power failure during a "saveenv" operation.
Michal Simekcc780ec2021-01-13 10:25:50 +0100433 Also this config changes the binary environment structure handling
434 which is used by env import/export commands which are independent of
435 storing variables to redundant location on a non volatile device.
Tom Rini4bb26a42019-11-10 11:28:03 -0500436
Simon Glass547cb402017-08-03 12:21:49 -0600437config ENV_FAT_INTERFACE
438 string "Name of the block device for the environment"
439 depends on ENV_IS_IN_FAT
Michal Simek5227e1e2020-02-25 15:50:33 +0100440 default "mmc"
Simon Glass547cb402017-08-03 12:21:49 -0600441 help
442 Define this to a string that is the name of the block device.
443
444config ENV_FAT_DEVICE_AND_PART
445 string "Device and partition for where to store the environemt in FAT"
446 depends on ENV_IS_IN_FAT
447 default "0:1" if TI_COMMON_CMD_OPTIONS
Michal Simek678d1352020-08-24 13:35:53 +0200448 default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP
Maxime Ripard8b7dcd32018-01-23 21:17:04 +0100449 default "0:auto" if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
450 default "1:auto" if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
Simon Glass547cb402017-08-03 12:21:49 -0600451 default "0" if ARCH_AT91
452 help
453 Define this to a string to specify the partition of the device. It can
454 be as following:
455
456 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
457 - "D:P": device D partition P. Error occurs if device D has no
458 partition table.
459 - "D:0": device D.
460 - "D" or "D:": device D partition 1 if device D has partition
461 table, or the whole device D if has no partition
462 table.
463 - "D:auto": first partition in device D with bootable flag set.
464 If none, first valid partition in device D. If no
465 partition table then means device D.
466
David Woodhouse93365392020-06-19 23:07:17 +0100467 If ENV_FAT_INTERFACE is set to "mmc" then device 'D' can be omitted,
468 leaving the string starting with a colon, and the boot device will
469 be used.
470
Simon Glass547cb402017-08-03 12:21:49 -0600471config ENV_FAT_FILE
Shyam Sainiefe757c2018-06-07 19:47:19 +0530472 string "Name of the FAT file to use for the environment"
Simon Glass547cb402017-08-03 12:21:49 -0600473 depends on ENV_IS_IN_FAT
474 default "uboot.env"
475 help
476 It's a string of the FAT file name. This file use to store the
477 environment.
478
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100479config ENV_EXT4_INTERFACE
480 string "Name of the block device for the environment"
481 depends on ENV_IS_IN_EXT4
482 help
483 Define this to a string that is the name of the block device.
484
485config ENV_EXT4_DEVICE_AND_PART
486 string "Device and partition for where to store the environemt in EXT4"
487 depends on ENV_IS_IN_EXT4
488 help
489 Define this to a string to specify the partition of the device. It can
490 be as following:
491
492 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
493 - "D:P": device D partition P. Error occurs if device D has no
494 partition table.
495 - "D:0": device D.
496 - "D" or "D:": device D partition 1 if device D has partition
497 table, or the whole device D if has no partition
498 table.
499 - "D:auto": first partition in device D with bootable flag set.
500 If none, first valid partition in device D. If no
501 partition table then means device D.
502
David Woodhouse6815e2c2020-08-04 10:05:47 +0100503 If ENV_EXT4_INTERFACE is set to "mmc" then device 'D' can be omitted,
504 leaving the string starting with a colon, and the boot device will
505 be used.
506
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100507config ENV_EXT4_FILE
Shyam Sainiefe757c2018-06-07 19:47:19 +0530508 string "Name of the EXT4 file to use for the environment"
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100509 depends on ENV_IS_IN_EXT4
Patrick Delaunay955b6712020-07-28 11:51:14 +0200510 default "/uboot.env"
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100511 help
512 It's a string of the EXT4 file name. This file use to store the
513 environment (explicit path to the file)
514
Tom Rini5cd7ece2019-11-18 20:02:10 -0500515config ENV_ADDR
516 hex "Environment address"
517 depends on ENV_IS_IN_FLASH || ENV_IS_IN_NVRAM || ENV_IS_IN_ONENAND || \
518 ENV_IS_IN_REMOTE || ENV_IS_IN_SPI_FLASH
519 default 0x0 if ENV_IS_IN_SPI_FLASH
520 help
521 Offset from the start of the device (or partition)
522
523config ENV_ADDR_REDUND
524 hex "Redundant environment address"
525 depends on ENV_IS_IN_FLASH && SYS_REDUNDAND_ENVIRONMENT
526 help
527 Offset from the start of the device (or partition) of the redundant
528 environment location.
Simon Glass547cb402017-08-03 12:21:49 -0600529
530config ENV_OFFSET
Tom Rini5cd7ece2019-11-18 20:02:10 -0500531 hex "Environment offset"
532 depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
533 ENV_IS_IN_SPI_FLASH
Jagan Tekic4ec2262019-12-21 13:24:35 +0530534 default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki68397572019-12-21 13:24:36 +0530535 default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Simon Glass547cb402017-08-03 12:21:49 -0600536 default 0x88000 if ARCH_SUNXI
Michal Simeke93ef192018-07-19 08:45:45 +0200537 default 0xE0000 if ARCH_ZYNQ
538 default 0x1E00000 if ARCH_ZYNQMP
T Karthik Reddy76770302019-08-05 16:18:57 +0530539 default 0x7F40000 if ARCH_VERSAL
Alexey Brodkin07dfc092019-01-15 11:42:48 +0300540 default 0 if ARC
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200541 default 0x140000 if ARCH_AT91
542 default 0x260000 if ARCH_OMAP2PLUS
Varalaxmi Bingi52e79212020-02-05 03:58:20 -0700543 default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Simon Glass547cb402017-08-03 12:21:49 -0600544 help
545 Offset from the start of the device (or partition)
546
Tom Rini5cd7ece2019-11-18 20:02:10 -0500547config ENV_OFFSET_REDUND
548 hex "Redundant environment offset"
549 depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
550 ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT
551 help
552 Offset from the start of the device (or partition) of the redundant
553 environment location.
554
Simon Glass547cb402017-08-03 12:21:49 -0600555config ENV_SIZE
556 hex "Environment Size"
Michal Simeke93ef192018-07-19 08:45:45 +0200557 default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200558 default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Jagan Tekic4ec2262019-12-21 13:24:35 +0530559 default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki68397572019-12-21 13:24:36 +0530560 default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Jagan Tekic4ec2262019-12-21 13:24:35 +0530561 default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL
Alexey Brodkin07dfc092019-01-15 11:42:48 +0300562 default 0x4000 if ARC
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200563 default 0x1f000
Simon Glass547cb402017-08-03 12:21:49 -0600564 help
565 Size of the environment storage area
566
Michal Simeke93ef192018-07-19 08:45:45 +0200567config ENV_SECT_SIZE
568 hex "Environment Sector-Size"
Tom Rini5cd7ece2019-11-18 20:02:10 -0500569 depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
Jagan Teki68397572019-12-21 13:24:36 +0530570 default 0x2000 if ARCH_ROCKCHIP
T Karthik Reddy76770302019-08-05 16:18:57 +0530571 default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL
Markus Klotzbuecher7bd60e62019-05-15 15:15:54 +0200572 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Varalaxmi Bingi52e79212020-02-05 03:58:20 -0700573 default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Michal Simeke93ef192018-07-19 08:45:45 +0200574 help
575 Size of the sector containing the environment.
576
Simon Glass547cb402017-08-03 12:21:49 -0600577config ENV_UBI_PART
578 string "UBI partition name"
579 depends on ENV_IS_IN_UBI
580 help
581 MTD partition containing the UBI device
582
583config ENV_UBI_VOLUME
584 string "UBI volume name"
585 depends on ENV_IS_IN_UBI
586 help
587 Name of the volume that you want to store the environment in.
588
Markus Klotzbuecher975bcde2019-05-15 15:15:53 +0200589config ENV_UBI_VOLUME_REDUND
590 string "UBI redundant volume name"
Tom Rini4bb26a42019-11-10 11:28:03 -0500591 depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT
Markus Klotzbuecher975bcde2019-05-15 15:15:53 +0200592 help
593 Name of the redundant volume that you want to store the environment in.
594
Hamish Guthrie674ab242019-05-15 15:15:55 +0200595config ENV_UBI_VID_OFFSET
596 int "ubi environment VID offset"
597 depends on ENV_IS_IN_UBI
598 default 0
599 help
600 UBI VID offset for environment. If 0, no custom VID offset is used.
601
Tom Rinica63e712019-11-12 22:46:36 -0500602config SYS_RELOC_GD_ENV_ADDR
Patrick Delaunay9f757532020-06-10 19:28:42 +0200603 bool "Relocate gd->env_addr"
Tom Rinica63e712019-11-12 22:46:36 -0500604 help
605 Relocate the early env_addr pointer so we know it is not inside
606 the binary. Some systems need this and for the rest, it doesn't hurt.
607
Tom Rinieb1f9092020-07-24 17:14:47 -0400608config SYS_MMC_ENV_DEV
609 int "mmc device number"
610 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
611 CMD_MVEBU_BUBT || FMAN_ENET || QE
612 default 0
613 help
614 MMC device number on the platform where the environment is stored.
615
616config SYS_MMC_ENV_PART
617 int "mmc partition number"
618 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
619 default 0
620 help
621 MMC hardware partition device number on the platform where the
622 environment is stored. Note that this is not related to any software
623 defined partition table but instead if we are in the user area, which is
624 partition 0 or the first boot partition, which is 1 or some other defined
625 partition.
626
Rasmus Villemoes14c71142018-03-20 11:38:45 +0100627config USE_DEFAULT_ENV_FILE
628 bool "Create default environment from file"
629 help
630 Normally, the default environment is automatically generated
631 based on the settings of various CONFIG_* options, as well
632 as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option,
633 you can instead define the entire default environment in an
634 external file.
635
636config DEFAULT_ENV_FILE
637 string "Path to default environment file"
638 depends on USE_DEFAULT_ENV_FILE
639 help
640 The path containing the default environment. The format is
641 the same as accepted by the mkenvimage tool: lines
642 containing key=value pairs, blank lines and lines beginning
643 with # are ignored.
644
Alex Kiernana410d6e2018-04-01 16:37:53 +0000645config ENV_VARS_UBOOT_RUNTIME_CONFIG
646 bool "Add run-time information to the environment"
647 help
648 Enable this in order to add variables describing certain
649 run-time determined information about the hardware to the
650 environment. These will be named board_name, board_rev.
651
Ovidiu Panait86ccd752020-05-06 20:38:42 +0300652config DELAY_ENVIRONMENT
653 bool "Delay environment loading"
654 depends on !OF_CONTROL
655 help
656 Enable this to inhibit loading the environment during board
657 initialization. This can address the security risk of untrusted data
658 being used during boot. Normally the environment is loaded when the
659 board is initialised so that it is available to U-Boot. This inhibits
660 that so that the environment is not available until explicitly loaded
661 later by U-Boot code. With CONFIG_OF_CONTROL this is instead
662 controlled by the value of /config/load-environment.
663
Marek Vasuta7b82672020-07-07 20:51:38 +0200664config ENV_APPEND
665 bool "Always append the environment with new data"
666 default n
667 help
668 If defined, the environment hash table is only ever appended with new
669 data, but the existing hash table can never be dropped and reloaded
670 with newly imported data. This may be used in combination with static
671 flags to e.g. to protect variables which must not be modified.
672
Marek Vasut803549f2020-07-07 20:51:39 +0200673config ENV_WRITEABLE_LIST
674 bool "Permit write access only to listed variables"
675 default n
676 help
677 If defined, only environment variables which explicitly set the 'w'
678 writeable flag can be written and modified at runtime. No variables
679 can be otherwise created, written or imported into the environment.
680
Marek Vasutb7f3f232020-05-22 01:10:14 +0200681config ENV_ACCESS_IGNORE_FORCE
682 bool "Block forced environment operations"
683 default n
684 help
685 If defined, don't allow the -f switch to env set override variable
686 access flags.
687
York Sun187da8d2018-06-26 10:03:22 -0700688if SPL_ENV_SUPPORT
689config SPL_ENV_IS_NOWHERE
690 bool "SPL Environment is not stored"
691 default y if ENV_IS_NOWHERE
692 help
693 Similar to ENV_IS_NOWHERE, used for SPL environment.
694
695config SPL_ENV_IS_IN_MMC
696 bool "SPL Environment in an MMC device"
697 depends on !SPL_ENV_IS_NOWHERE
698 depends on ENV_IS_IN_MMC
699 default y
700 help
701 Similar to ENV_IS_IN_MMC, used for SPL environment.
702
703config SPL_ENV_IS_IN_FAT
704 bool "SPL Environment is in a FAT filesystem"
705 depends on !SPL_ENV_IS_NOWHERE
706 depends on ENV_IS_IN_FAT
707 default y
708 help
709 Similar to ENV_IS_IN_FAT, used for SPL environment.
710
711config SPL_ENV_IS_IN_EXT4
712 bool "SPL Environment is in a EXT4 filesystem"
713 depends on !SPL_ENV_IS_NOWHERE
714 depends on ENV_IS_IN_EXT4
715 default y
716 help
717 Similar to ENV_IS_IN_EXT4, used for SPL environment.
718
719config SPL_ENV_IS_IN_NAND
720 bool "SPL Environment in a NAND device"
721 depends on !SPL_ENV_IS_NOWHERE
722 depends on ENV_IS_IN_NAND
723 default y
724 help
725 Similar to ENV_IS_IN_NAND, used for SPL environment.
726
727config SPL_ENV_IS_IN_SPI_FLASH
728 bool "SPL Environment is in SPI flash"
729 depends on !SPL_ENV_IS_NOWHERE
730 depends on ENV_IS_IN_SPI_FLASH
731 default y
732 help
733 Similar to ENV_IS_IN_SPI_FLASH, used for SPL environment.
734
735config SPL_ENV_IS_IN_FLASH
736 bool "SPL Environment in flash memory"
737 depends on !SPL_ENV_IS_NOWHERE
738 depends on ENV_IS_IN_FLASH
739 default y
740 help
741 Similar to ENV_IS_IN_FLASH, used for SPL environment.
742
743endif
744
745if TPL_ENV_SUPPORT
746
747config TPL_ENV_IS_NOWHERE
748 bool "TPL Environment is not stored"
749 default y if ENV_IS_NOWHERE
750 help
751 Similar to ENV_IS_NOWHERE, used for TPL environment.
752
753config TPL_ENV_IS_IN_MMC
754 bool "TPL Environment in an MMC device"
755 depends on !TPL_ENV_IS_NOWHERE
756 depends on ENV_IS_IN_MMC
757 default y
758 help
759 Similar to ENV_IS_IN_MMC, used for TPL environment.
760
761config TPL_ENV_IS_IN_FAT
762 bool "TPL Environment is in a FAT filesystem"
763 depends on !TPL_ENV_IS_NOWHERE
764 depends on ENV_IS_IN_FAT
765 default y
766 help
767 Similar to ENV_IS_IN_FAT, used for TPL environment.
768
769config TPL_ENV_IS_IN_EXT4
770 bool "TPL Environment is in a EXT4 filesystem"
771 depends on !TPL_ENV_IS_NOWHERE
772 depends on ENV_IS_IN_EXT4
773 default y
774 help
775 Similar to ENV_IS_IN_EXT4, used for TPL environment.
776
777config TPL_ENV_IS_IN_NAND
778 bool "TPL Environment in a NAND device"
779 depends on !TPL_ENV_IS_NOWHERE
780 depends on ENV_IS_IN_NAND
781 default y
782 help
783 Similar to ENV_IS_IN_NAND, used for TPL environment.
784
785config TPL_ENV_IS_IN_SPI_FLASH
786 bool "TPL Environment is in SPI flash"
787 depends on !TPL_ENV_IS_NOWHERE
788 depends on ENV_IS_IN_SPI_FLASH
789 default y
790 help
791 Similar to ENV_IS_IN_SPI_FLASH, used for TPL environment.
792
793config TPL_ENV_IS_IN_FLASH
794 bool "TPL Environment in flash memory"
795 depends on !TPL_ENV_IS_NOWHERE
796 depends on ENV_IS_IN_FLASH
797 default y
798 help
799 Similar to ENV_IS_IN_FLASH, used for TPL environment.
800
801endif
802
Simon Glass99298be2020-09-10 20:21:24 -0600803config VERSION_VARIABLE
804 bool "Add a 'ver' environment variable with the U-Boot version"
805 help
806 If this variable is defined, an environment variable
807 named "ver" is created by U-Boot showing the U-Boot
808 version as printed by the "version" command.
809 Any change to this variable will be reverted at the
810 next reset.
811
Simon Glass547cb402017-08-03 12:21:49 -0600812endmenu