blob: 24966f8c37380f713c34db3fa2bd3c5b241b657a [file] [log] [blame]
Simon Glass0649cd02017-08-03 12:21:49 -06001menu "Environment"
2
Rasmus Villemoesc8221682019-12-15 22:29:39 +00003config ENV_SUPPORT
4 def_bool y
5
Simon Glass86b9c3e2021-10-21 21:08:46 -06006config ENV_SOURCE_FILE
7 string "Environment file to use"
8 default ""
9 help
10 This sets the basename to use to generate the default environment.
11 This a text file as described in doc/usage/environment.rst
12
13 The file must be in the board directory and have a .env extension, so
14 the resulting filename is typically
15 board/<vendor>/<board>/<CONFIG_ENV_SOURCE_FILE>.env
16
17 If the file is not present, an error is produced.
18
19 If this CONFIG is empty, U-Boot uses CONFIG SYS_BOARD as a default, if
20 the file board/<vendor>/<board>/<SYS_BOARD>.env exists. Otherwise the
21 environment is assumed to come from the ad-hoc
22 CONFIG_EXTRA_ENV_SETTINGS #define
23
Rasmus Villemoes1d0adee2020-02-19 09:47:39 +000024config SAVEENV
25 def_bool y if CMD_SAVEENV
26
Adam Forde91907a2020-07-03 06:48:56 -050027config ENV_OVERWRITE
28 bool "Enable overwriting environment"
29 help
30 Use this to permit overriding of certain environmental variables
31 like Ethernet and Serial
32
Simon Glassc1c3fe22017-08-03 12:21:59 -060033config ENV_IS_NOWHERE
34 bool "Environment is not stored"
Patrice Chotard208bd2b2019-05-07 11:24:02 +020035 default y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
36 !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \
37 !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
38 !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
39 !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
40 !ENV_IS_IN_UBI
Simon Glassc1c3fe22017-08-03 12:21:59 -060041 help
42 Define this if you don't want to or can't have an environment stored
Shyam Saini919d25c2018-06-07 19:47:19 +053043 on a storage medium. In this case the environment will still exist
Simon Glassc1c3fe22017-08-03 12:21:59 -060044 while U-Boot is running, but once U-Boot exits it will not be
45 stored. U-Boot will therefore always start up with a default
46 environment.
47
Simon Glass0649cd02017-08-03 12:21:49 -060048config ENV_IS_IN_EEPROM
49 bool "Environment in EEPROM"
50 depends on !CHAIN_OF_TRUST
51 help
52 Use this if you have an EEPROM or similar serial access
53 device and a driver for it.
54
55 - CONFIG_ENV_OFFSET:
56 - CONFIG_ENV_SIZE:
57
58 These two #defines specify the offset and size of the
59 environment area within the total memory of your EEPROM.
60
Simon Glass0649cd02017-08-03 12:21:49 -060061 Note that we consider the length of the address field to
62 still be one byte because the extra address bits are hidden
63 in the chip address.
64
Simon Glass0649cd02017-08-03 12:21:49 -060065 - CONFIG_I2C_ENV_EEPROM_BUS
66 if you have an Environment on an EEPROM reached over
67 I2C muxes, you can define here, how to reach this
68 EEPROM. For example:
69
70 #define CONFIG_I2C_ENV_EEPROM_BUS 1
71
72 EEPROM which holds the environment, is reached over
73 a pca9547 i2c mux with address 0x70, channel 3.
74
75config ENV_IS_IN_FAT
76 bool "Environment is in a FAT filesystem"
77 depends on !CHAIN_OF_TRUST
Maxime Ripardfb694642018-01-23 21:17:01 +010078 default y if ARCH_BCM283X
Maxime Ripard0163c912018-01-23 21:17:04 +010079 default y if ARCH_SUNXI && MMC
Maxime Ripardfb694642018-01-23 21:17:01 +010080 default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
Tuomas Tynkkynen3cd084d2018-01-05 02:45:19 +020081 select FS_FAT
Simon Glass0649cd02017-08-03 12:21:49 -060082 select FAT_WRITE
83 help
Simon Glass91d3aa02017-08-03 12:21:50 -060084 Define this if you want to use the FAT file system for the environment.
Simon Glass0649cd02017-08-03 12:21:49 -060085
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +010086config ENV_IS_IN_EXT4
87 bool "Environment is in a EXT4 filesystem"
88 depends on !CHAIN_OF_TRUST
Michal Simek07661782020-08-19 10:44:23 +020089 select FS_EXT4
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +010090 select EXT4_WRITE
91 help
92 Define this if you want to use the EXT4 file system for the environment.
93
Simon Glass0649cd02017-08-03 12:21:49 -060094config ENV_IS_IN_FLASH
95 bool "Environment in flash memory"
96 depends on !CHAIN_OF_TRUST
Maxime Ripardfb694642018-01-23 21:17:01 +010097 default y if ARCH_CINTEGRATOR
98 default y if ARCH_INTEGRATOR_CP
Tom Rini9b7993b2021-05-14 21:34:10 -040099 default y if M548x || M547x || M5282
Maxime Ripardfb694642018-01-23 21:17:01 +0100100 default y if MCF532x || MCF52x2
101 default y if MPC86xx || MPC83xx
Tom Rini1c588572021-05-14 21:34:26 -0400102 default y if ARCH_MPC8548
Maxime Ripardfb694642018-01-23 21:17:01 +0100103 default y if SH && !CPU_SH4
Simon Glass0649cd02017-08-03 12:21:49 -0600104 help
105 Define this if you have a flash device which you want to use for the
106 environment.
107
108 a) The environment occupies one whole flash sector, which is
109 "embedded" in the text segment with the U-Boot code. This
110 happens usually with "bottom boot sector" or "top boot
111 sector" type flash chips, which have several smaller
112 sectors at the start or the end. For instance, such a
113 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
114 such a case you would place the environment in one of the
115 4 kB sectors - with U-Boot code before and after it. With
116 "top boot sector" type flash chips, you would put the
117 environment in one of the last sectors, leaving a gap
118 between U-Boot and the environment.
119
120 CONFIG_ENV_OFFSET:
121
122 Offset of environment data (variable area) to the
123 beginning of flash memory; for instance, with bottom boot
124 type flash chips the second sector can be used: the offset
125 for this sector is given here.
126
127 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
128
129 CONFIG_ENV_ADDR:
130
131 This is just another way to specify the start address of
132 the flash sector containing the environment (instead of
133 CONFIG_ENV_OFFSET).
134
135 CONFIG_ENV_SECT_SIZE:
136
137 Size of the sector containing the environment.
138
139
140 b) Sometimes flash chips have few, equal sized, BIG sectors.
141 In such a case you don't want to spend a whole sector for
142 the environment.
143
144 CONFIG_ENV_SIZE:
145
146 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
147 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
148 of this flash sector for the environment. This saves
149 memory for the RAM copy of the environment.
150
151 It may also save flash memory if you decide to use this
152 when your environment is "embedded" within U-Boot code,
153 since then the remainder of the flash sector could be used
154 for U-Boot code. It should be pointed out that this is
155 STRONGLY DISCOURAGED from a robustness point of view:
156 updating the environment in flash makes it always
157 necessary to erase the WHOLE sector. If something goes
158 wrong before the contents has been restored from a copy in
159 RAM, your target system will be dead.
160
161 CONFIG_ENV_ADDR_REDUND
Simon Glass0649cd02017-08-03 12:21:49 -0600162
163 These settings describe a second storage area used to hold
164 a redundant copy of the environment data, so that there is
165 a valid backup copy in case there is a power failure during
166 a "saveenv" operation.
167
168 BE CAREFUL! Any changes to the flash layout, and some changes to the
169 source code will make it necessary to adapt <board>/u-boot.lds*
170 accordingly!
171
172config ENV_IS_IN_MMC
173 bool "Environment in an MMC device"
174 depends on !CHAIN_OF_TRUST
Maxime Ripardd282a1d2018-01-23 21:17:00 +0100175 depends on MMC
Maxime Ripardfb694642018-01-23 21:17:01 +0100176 default y if ARCH_EXYNOS4
177 default y if MX6SX || MX7D
178 default y if TEGRA30 || TEGRA124
179 default y if TEGRA_ARMV8_COMMON
Simon Glass0649cd02017-08-03 12:21:49 -0600180 help
181 Define this if you have an MMC device which you want to use for the
182 environment.
183
184 CONFIG_SYS_MMC_ENV_DEV:
185
186 Specifies which MMC device the environment is stored in.
187
188 CONFIG_SYS_MMC_ENV_PART (optional):
189
190 Specifies which MMC partition the environment is stored in. If not
191 set, defaults to partition 0, the user area. Common values might be
192 1 (first MMC boot partition), 2 (second MMC boot partition).
193
194 CONFIG_ENV_OFFSET:
195 CONFIG_ENV_SIZE:
196
197 These two #defines specify the offset and size of the environment
198 area within the specified MMC device.
199
200 If offset is positive (the usual case), it is treated as relative to
201 the start of the MMC partition. If offset is negative, it is treated
202 as relative to the end of the MMC partition. This can be useful if
203 your board may be fitted with different MMC devices, which have
204 different sizes for the MMC partitions, and you always want the
205 environment placed at the very end of the partition, to leave the
206 maximum possible space before it, to store other data.
207
208 These two values are in units of bytes, but must be aligned to an
209 MMC sector boundary.
210
211 CONFIG_ENV_OFFSET_REDUND (optional):
212
213 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
214 hold a redundant copy of the environment data. This provides a
215 valid backup copy in case the other copy is corrupted, e.g. due
216 to a power failure during a "saveenv" operation.
217
218 This value may also be positive or negative; this is handled in the
219 same way as CONFIG_ENV_OFFSET.
220
Marek Vasutd11d1be2021-10-17 19:23:36 +0200221 In case CONFIG_SYS_MMC_ENV_PART is 1 (i.e. environment in eMMC boot
222 partition) then setting CONFIG_ENV_OFFSET_REDUND to the same value
223 as CONFIG_ENV_OFFSET makes use of the second eMMC boot partition for
224 the redundant environment copy.
225
Simon Glass0649cd02017-08-03 12:21:49 -0600226 This value is also in units of bytes, but must also be aligned to
227 an MMC sector boundary.
228
Simon Glass0649cd02017-08-03 12:21:49 -0600229config ENV_IS_IN_NAND
230 bool "Environment in a NAND device"
231 depends on !CHAIN_OF_TRUST
232 help
233 Define this if you have a NAND device which you want to use for the
234 environment.
235
236 - CONFIG_ENV_OFFSET:
237 - CONFIG_ENV_SIZE:
238
239 These two #defines specify the offset and size of the environment
240 area within the first NAND device. CONFIG_ENV_OFFSET must be
241 aligned to an erase block boundary.
242
243 - CONFIG_ENV_OFFSET_REDUND (optional):
244
245 This setting describes a second storage area of CONFIG_ENV_SIZE
246 size used to hold a redundant copy of the environment data, so
247 that there is a valid backup copy in case there is a power failure
248 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
249 aligned to an erase block boundary.
250
251 - CONFIG_ENV_RANGE (optional):
252
253 Specifies the length of the region in which the environment
254 can be written. This should be a multiple of the NAND device's
255 block size. Specifying a range with more erase blocks than
256 are needed to hold CONFIG_ENV_SIZE allows bad blocks within
257 the range to be avoided.
258
259 - CONFIG_ENV_OFFSET_OOB (optional):
260
261 Enables support for dynamically retrieving the offset of the
262 environment from block zero's out-of-band data. The
263 "nand env.oob" command can be used to record this offset.
264 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
265 using CONFIG_ENV_OFFSET_OOB.
266
267config ENV_IS_IN_NVRAM
268 bool "Environment in a non-volatile RAM"
269 depends on !CHAIN_OF_TRUST
270 help
271 Define this if you have some non-volatile memory device
272 (NVRAM, battery buffered SRAM) which you want to use for the
273 environment.
274
275 - CONFIG_ENV_ADDR:
276 - CONFIG_ENV_SIZE:
277
278 These two #defines are used to determine the memory area you
279 want to use for environment. It is assumed that this memory
280 can just be read and written to, without any special
281 provision.
282
283config ENV_IS_IN_ONENAND
284 bool "Environment is in OneNAND"
285 depends on !CHAIN_OF_TRUST
286 help
287 Define this if you want to put your local device's environment in
288 OneNAND.
289
290 - CONFIG_ENV_ADDR:
291 - CONFIG_ENV_SIZE:
292
293 These two #defines are used to determine the device range you
294 want to use for environment. It is assumed that this memory
295 can just be read and written to, without any special
296 provision.
297
298config ENV_IS_IN_REMOTE
Heinrich Schuchardt646f1ab2018-03-17 22:53:11 +0000299 bool "Environment is in remote memory space"
Simon Glass0649cd02017-08-03 12:21:49 -0600300 depends on !CHAIN_OF_TRUST
301 help
302 Define this if you have a remote memory space which you
303 want to use for the local device's environment.
304
305 - CONFIG_ENV_ADDR:
306 - CONFIG_ENV_SIZE:
307
308 These two #defines specify the address and size of the
309 environment area within the remote memory space. The
310 local device can get the environment from remote memory
311 space by SRIO or PCIE links.
312
313config ENV_IS_IN_SPI_FLASH
314 bool "Environment is in SPI flash"
Tom Rinia4298dd2019-05-29 17:01:28 -0400315 depends on !CHAIN_OF_TRUST && SPI
Maxime Ripardfb694642018-01-23 21:17:01 +0100316 default y if ARMADA_XP
317 default y if INTEL_BAYTRAIL
318 default y if INTEL_BRASWELL
319 default y if INTEL_BROADWELL
320 default y if NORTHBRIDGE_INTEL_IVYBRIDGE
321 default y if INTEL_QUARK
322 default y if INTEL_QUEENSBAY
Simon Glass0649cd02017-08-03 12:21:49 -0600323 help
324 Define this if you have a SPI Flash memory device which you
325 want to use for the environment.
326
327 - CONFIG_ENV_OFFSET:
328 - CONFIG_ENV_SIZE:
329
330 These two #defines specify the offset and size of the
331 environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
332 aligned to an erase sector boundary.
333
334 - CONFIG_ENV_SECT_SIZE:
335
336 Define the SPI flash's sector size.
337
338 - CONFIG_ENV_OFFSET_REDUND (optional):
339
340 This setting describes a second storage area of CONFIG_ENV_SIZE
341 size used to hold a redundant copy of the environment data, so
342 that there is a valid backup copy in case there is a power failure
343 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
344 aligned to an erase sector boundary.
345
Rasmus Villemoesbcb44f62021-04-14 20:51:43 +0200346config ENV_SECT_SIZE_AUTO
347 bool "Use automatically detected sector size"
348 depends on ENV_IS_IN_SPI_FLASH
349 help
350 Some boards exist in multiple variants, with different
351 flashes having different sector sizes. In such cases, you
352 can select this option to make U-Boot use the actual sector
353 size when figuring out how much to erase, which can thus be
354 more efficient on the flashes with smaller erase size. Since
355 the environment must always be aligned on a sector boundary,
356 CONFIG_ENV_OFFSET must be aligned to the largest of the
357 different sector sizes, and CONFIG_ENV_SECT_SIZE should be
358 set to that value.
359
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100360config USE_ENV_SPI_BUS
361 bool "SPI flash bus for environment"
362 depends on ENV_IS_IN_SPI_FLASH
363 help
364 Force the SPI bus for environment.
365 If not defined, use CONFIG_SF_DEFAULT_BUS.
Simon Glass0649cd02017-08-03 12:21:49 -0600366
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100367config ENV_SPI_BUS
368 int "Value of SPI flash bus for environment"
369 depends on USE_ENV_SPI_BUS
370 help
371 Value the SPI bus and chip select for environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600372
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100373config USE_ENV_SPI_CS
374 bool "SPI flash chip select for environment"
375 depends on ENV_IS_IN_SPI_FLASH
376 help
377 Force the SPI chip select for environment.
378 If not defined, use CONFIG_SF_DEFAULT_CS.
Simon Glass0649cd02017-08-03 12:21:49 -0600379
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100380config ENV_SPI_CS
381 int "Value of SPI flash chip select for environment"
382 depends on USE_ENV_SPI_CS
383 help
384 Value of the SPI chip select for environment.
Simon Glass0649cd02017-08-03 12:21:49 -0600385
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100386config USE_ENV_SPI_MAX_HZ
Marek Vasutdd309612019-05-04 19:10:05 +0200387 bool "SPI flash max frequency for environment"
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100388 depends on ENV_IS_IN_SPI_FLASH
389 help
390 Force the SPI max work clock for environment.
391 If not defined, use CONFIG_SF_DEFAULT_SPEED.
Simon Glass0649cd02017-08-03 12:21:49 -0600392
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100393config ENV_SPI_MAX_HZ
Marek Vasutdd309612019-05-04 19:10:05 +0200394 int "Value of SPI flash max frequency for environment"
Patrick Delaunayabe66b12019-02-27 15:20:38 +0100395 depends on USE_ENV_SPI_MAX_HZ
396 help
397 Value of the SPI max work clock for environment.
398
399config USE_ENV_SPI_MODE
400 bool "SPI flash mode for environment"
401 depends on ENV_IS_IN_SPI_FLASH
402 help
403 Force the SPI work mode for environment.
404
405config ENV_SPI_MODE
406 hex "Value of SPI flash work mode for environment"
407 depends on USE_ENV_SPI_MODE
408 help
409 Value of the SPI work mode for environment.
410 See include/spi.h for value.
Simon Glass0649cd02017-08-03 12:21:49 -0600411
Heiko Schocher92765f452020-10-10 10:28:05 +0200412config ENV_SPI_EARLY
413 bool "Access Environment in SPI flashes before relocation"
414 depends on ENV_IS_IN_SPI_FLASH
415 help
416 Enable this if you want to use Environment in SPI flash
417 before relocation. Call env_init() and than you can use
418 env_get_f() for accessing Environment variables.
419
Simon Glass0649cd02017-08-03 12:21:49 -0600420config ENV_IS_IN_UBI
421 bool "Environment in a UBI volume"
422 depends on !CHAIN_OF_TRUST
Miquel Raynal00e27042019-10-03 19:50:12 +0200423 depends on MTD_UBI
424 depends on CMD_UBI
Simon Glass0649cd02017-08-03 12:21:49 -0600425 help
426 Define this if you have an UBI volume that you want to use for the
427 environment. This has the benefit of wear-leveling the environment
428 accesses, which is important on NAND.
429
430 - CONFIG_ENV_UBI_PART:
431
432 Define this to a string that is the mtd partition containing the UBI.
433
434 - CONFIG_ENV_UBI_VOLUME:
435
436 Define this to the name of the volume that you want to store the
437 environment in.
438
439 - CONFIG_ENV_UBI_VOLUME_REDUND:
440
441 Define this to the name of another volume to store a second copy of
442 the environment in. This will enable redundant environments in UBI.
443 It is assumed that both volumes are in the same MTD partition.
444
Tom Rinicb6617a2019-11-10 11:28:03 -0500445config SYS_REDUNDAND_ENVIRONMENT
446 bool "Enable redundant environment support"
Tom Rinicb6617a2019-11-10 11:28:03 -0500447 help
448 Normally, the environemt is stored in a single location. By
449 selecting this option, you can then define where to hold a redundant
450 copy of the environment data, so that there is a valid backup copy in
451 case there is a power failure during a "saveenv" operation.
Michal Simek4e3fc5e2021-01-13 10:25:50 +0100452 Also this config changes the binary environment structure handling
453 which is used by env import/export commands which are independent of
454 storing variables to redundant location on a non volatile device.
Tom Rinicb6617a2019-11-10 11:28:03 -0500455
Simon Glass0649cd02017-08-03 12:21:49 -0600456config ENV_FAT_INTERFACE
457 string "Name of the block device for the environment"
458 depends on ENV_IS_IN_FAT
Michal Simek8d782112020-02-25 15:50:33 +0100459 default "mmc"
Simon Glass0649cd02017-08-03 12:21:49 -0600460 help
461 Define this to a string that is the name of the block device.
462
463config ENV_FAT_DEVICE_AND_PART
464 string "Device and partition for where to store the environemt in FAT"
465 depends on ENV_IS_IN_FAT
466 default "0:1" if TI_COMMON_CMD_OPTIONS
Ashok Reddy Soma4fb83c92021-02-23 08:07:46 -0700467 default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
Samuel Holland1011ebc2021-04-18 22:16:21 -0500468 default ":auto" if ARCH_SUNXI
Simon Glass0649cd02017-08-03 12:21:49 -0600469 default "0" if ARCH_AT91
470 help
471 Define this to a string to specify the partition of the device. It can
472 be as following:
473
474 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
475 - "D:P": device D partition P. Error occurs if device D has no
476 partition table.
477 - "D:0": device D.
478 - "D" or "D:": device D partition 1 if device D has partition
479 table, or the whole device D if has no partition
480 table.
481 - "D:auto": first partition in device D with bootable flag set.
482 If none, first valid partition in device D. If no
483 partition table then means device D.
484
David Woodhouse6731bef2020-06-19 23:07:17 +0100485 If ENV_FAT_INTERFACE is set to "mmc" then device 'D' can be omitted,
486 leaving the string starting with a colon, and the boot device will
487 be used.
488
Simon Glass0649cd02017-08-03 12:21:49 -0600489config ENV_FAT_FILE
Shyam Saini919d25c2018-06-07 19:47:19 +0530490 string "Name of the FAT file to use for the environment"
Simon Glass0649cd02017-08-03 12:21:49 -0600491 depends on ENV_IS_IN_FAT
492 default "uboot.env"
493 help
494 It's a string of the FAT file name. This file use to store the
495 environment.
496
Brandon Maier2339f012021-01-16 15:14:43 -0600497config ENV_FAT_FILE_REDUND
498 string "Name of the FAT file to use for the environment"
499 depends on ENV_IS_IN_FAT && SYS_REDUNDAND_ENVIRONMENT
500 default "uboot-redund.env"
501 help
502 It's a string of the FAT file name. This file use to store the
503 redundant environment.
504
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100505config ENV_EXT4_INTERFACE
506 string "Name of the block device for the environment"
507 depends on ENV_IS_IN_EXT4
508 help
509 Define this to a string that is the name of the block device.
510
511config ENV_EXT4_DEVICE_AND_PART
512 string "Device and partition for where to store the environemt in EXT4"
513 depends on ENV_IS_IN_EXT4
514 help
515 Define this to a string to specify the partition of the device. It can
516 be as following:
517
518 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
519 - "D:P": device D partition P. Error occurs if device D has no
520 partition table.
521 - "D:0": device D.
522 - "D" or "D:": device D partition 1 if device D has partition
523 table, or the whole device D if has no partition
524 table.
525 - "D:auto": first partition in device D with bootable flag set.
526 If none, first valid partition in device D. If no
527 partition table then means device D.
528
David Woodhouseb0493bb2020-08-04 10:05:47 +0100529 If ENV_EXT4_INTERFACE is set to "mmc" then device 'D' can be omitted,
530 leaving the string starting with a colon, and the boot device will
531 be used.
532
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100533config ENV_EXT4_FILE
Shyam Saini919d25c2018-06-07 19:47:19 +0530534 string "Name of the EXT4 file to use for the environment"
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100535 depends on ENV_IS_IN_EXT4
Patrick Delaunay87dac742020-07-28 11:51:14 +0200536 default "/uboot.env"
Jorge Ramirez-Ortiz1087a792018-01-10 11:33:48 +0100537 help
538 It's a string of the EXT4 file name. This file use to store the
539 environment (explicit path to the file)
540
Tom Rinia09fea12019-11-18 20:02:10 -0500541config ENV_ADDR
542 hex "Environment address"
543 depends on ENV_IS_IN_FLASH || ENV_IS_IN_NVRAM || ENV_IS_IN_ONENAND || \
544 ENV_IS_IN_REMOTE || ENV_IS_IN_SPI_FLASH
545 default 0x0 if ENV_IS_IN_SPI_FLASH
546 help
547 Offset from the start of the device (or partition)
548
549config ENV_ADDR_REDUND
550 hex "Redundant environment address"
551 depends on ENV_IS_IN_FLASH && SYS_REDUNDAND_ENVIRONMENT
552 help
553 Offset from the start of the device (or partition) of the redundant
554 environment location.
Simon Glass0649cd02017-08-03 12:21:49 -0600555
556config ENV_OFFSET
Tom Rinia09fea12019-11-18 20:02:10 -0500557 hex "Environment offset"
558 depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
559 ENV_IS_IN_SPI_FLASH
Jagan Tekid7b433e2019-12-21 13:24:35 +0530560 default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki54b85a92019-12-21 13:24:36 +0530561 default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Simon Glass0649cd02017-08-03 12:21:49 -0600562 default 0x88000 if ARCH_SUNXI
Michal Simek4aee6242018-07-19 08:45:45 +0200563 default 0xE0000 if ARCH_ZYNQ
564 default 0x1E00000 if ARCH_ZYNQMP
T Karthik Reddyf8c0f9f2019-08-05 16:18:57 +0530565 default 0x7F40000 if ARCH_VERSAL
Alexey Brodkin70b5ea72019-01-15 11:42:48 +0300566 default 0 if ARC
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200567 default 0x140000 if ARCH_AT91
568 default 0x260000 if ARCH_OMAP2PLUS
Varalaxmi Bingi63e988e2020-02-05 03:58:20 -0700569 default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Simon Glass0649cd02017-08-03 12:21:49 -0600570 help
571 Offset from the start of the device (or partition)
572
Tom Rinia09fea12019-11-18 20:02:10 -0500573config ENV_OFFSET_REDUND
574 hex "Redundant environment offset"
575 depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
576 ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT
Michal Simekec217212021-02-24 10:33:45 +0100577 default 0
Tom Rinia09fea12019-11-18 20:02:10 -0500578 help
579 Offset from the start of the device (or partition) of the redundant
580 environment location.
581
Simon Glass0649cd02017-08-03 12:21:49 -0600582config ENV_SIZE
583 hex "Environment Size"
Michal Simek4aee6242018-07-19 08:45:45 +0200584 default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200585 default 0x20000 if ARCH_SUNXI || ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Jagan Tekid7b433e2019-12-21 13:24:35 +0530586 default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
Jagan Teki54b85a92019-12-21 13:24:36 +0530587 default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
Jagan Tekid7b433e2019-12-21 13:24:35 +0530588 default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL
Alexey Brodkin70b5ea72019-01-15 11:42:48 +0300589 default 0x4000 if ARC
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200590 default 0x1f000
Simon Glass0649cd02017-08-03 12:21:49 -0600591 help
592 Size of the environment storage area
593
Michal Simek4aee6242018-07-19 08:45:45 +0200594config ENV_SECT_SIZE
595 hex "Environment Sector-Size"
Tom Rinia09fea12019-11-18 20:02:10 -0500596 depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
Jagan Teki54b85a92019-12-21 13:24:36 +0530597 default 0x2000 if ARCH_ROCKCHIP
T Karthik Reddyf8c0f9f2019-08-05 16:18:57 +0530598 default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL
Markus Klotzbuechera9221f32019-05-15 15:15:54 +0200599 default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
Varalaxmi Bingi63e988e2020-02-05 03:58:20 -0700600 default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
Michal Simek4aee6242018-07-19 08:45:45 +0200601 help
602 Size of the sector containing the environment.
603
Simon Glass0649cd02017-08-03 12:21:49 -0600604config ENV_UBI_PART
605 string "UBI partition name"
606 depends on ENV_IS_IN_UBI
607 help
608 MTD partition containing the UBI device
609
610config ENV_UBI_VOLUME
611 string "UBI volume name"
612 depends on ENV_IS_IN_UBI
613 help
614 Name of the volume that you want to store the environment in.
615
Markus Klotzbuecherff4818c2019-05-15 15:15:53 +0200616config ENV_UBI_VOLUME_REDUND
617 string "UBI redundant volume name"
Tom Rinicb6617a2019-11-10 11:28:03 -0500618 depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT
Markus Klotzbuecherff4818c2019-05-15 15:15:53 +0200619 help
620 Name of the redundant volume that you want to store the environment in.
621
Hamish Guthrie985186d2019-05-15 15:15:55 +0200622config ENV_UBI_VID_OFFSET
623 int "ubi environment VID offset"
624 depends on ENV_IS_IN_UBI
625 default 0
626 help
627 UBI VID offset for environment. If 0, no custom VID offset is used.
628
Tom Rini8d8ee472019-11-12 22:46:36 -0500629config SYS_RELOC_GD_ENV_ADDR
Patrick Delaunay35c26832020-06-10 19:28:42 +0200630 bool "Relocate gd->env_addr"
Tom Rini8d8ee472019-11-12 22:46:36 -0500631 help
632 Relocate the early env_addr pointer so we know it is not inside
633 the binary. Some systems need this and for the rest, it doesn't hurt.
634
Tom Rini7d080772020-07-24 17:14:47 -0400635config SYS_MMC_ENV_DEV
636 int "mmc device number"
637 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
Kuldeep Singh9b90e0d2021-08-10 11:20:06 +0530638 CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA
Tom Rini7d080772020-07-24 17:14:47 -0400639 default 0
640 help
641 MMC device number on the platform where the environment is stored.
642
643config SYS_MMC_ENV_PART
644 int "mmc partition number"
645 depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
646 default 0
647 help
648 MMC hardware partition device number on the platform where the
649 environment is stored. Note that this is not related to any software
650 defined partition table but instead if we are in the user area, which is
651 partition 0 or the first boot partition, which is 1 or some other defined
652 partition.
653
Rasmus Villemoesf3d8f7d2018-03-20 11:38:45 +0100654config USE_DEFAULT_ENV_FILE
655 bool "Create default environment from file"
656 help
657 Normally, the default environment is automatically generated
658 based on the settings of various CONFIG_* options, as well
659 as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option,
660 you can instead define the entire default environment in an
661 external file.
662
663config DEFAULT_ENV_FILE
664 string "Path to default environment file"
665 depends on USE_DEFAULT_ENV_FILE
666 help
667 The path containing the default environment. The format is
668 the same as accepted by the mkenvimage tool: lines
669 containing key=value pairs, blank lines and lines beginning
670 with # are ignored.
671
Alex Kiernand9101302018-04-01 16:37:53 +0000672config ENV_VARS_UBOOT_RUNTIME_CONFIG
673 bool "Add run-time information to the environment"
674 help
675 Enable this in order to add variables describing certain
676 run-time determined information about the hardware to the
677 environment. These will be named board_name, board_rev.
678
Ovidiu Panaitb8879f22020-05-06 20:38:42 +0300679config DELAY_ENVIRONMENT
680 bool "Delay environment loading"
681 depends on !OF_CONTROL
682 help
683 Enable this to inhibit loading the environment during board
684 initialization. This can address the security risk of untrusted data
685 being used during boot. Normally the environment is loaded when the
686 board is initialised so that it is available to U-Boot. This inhibits
687 that so that the environment is not available until explicitly loaded
688 later by U-Boot code. With CONFIG_OF_CONTROL this is instead
689 controlled by the value of /config/load-environment.
690
Rasmus Villemoes95fd9772021-04-21 11:06:54 +0200691config ENV_IMPORT_FDT
692 bool "Amend environment by FDT properties"
693 depends on OF_CONTROL
694 help
695 If selected, after the environment has been loaded from its
696 persistent location, the "env_fdt_path" variable is looked
697 up and used as a path to a node in the control DTB. The
698 property/value pairs in that node is then used to update the
699 run-time environment. This can be useful to use the same
700 U-Boot binary with different board variants.
701
702config ENV_FDT_PATH
703 string "Default value for env_fdt_path variable"
704 depends on ENV_IMPORT_FDT
705 default "/config/environment"
706 help
707 The initial value of the env_fdt_path variable.
708
Marek Vasut47f3b1f2020-07-07 20:51:38 +0200709config ENV_APPEND
710 bool "Always append the environment with new data"
Marek Vasut47f3b1f2020-07-07 20:51:38 +0200711 help
712 If defined, the environment hash table is only ever appended with new
713 data, but the existing hash table can never be dropped and reloaded
714 with newly imported data. This may be used in combination with static
715 flags to e.g. to protect variables which must not be modified.
716
Marek Vasutd045cba2020-07-07 20:51:39 +0200717config ENV_WRITEABLE_LIST
718 bool "Permit write access only to listed variables"
Marek Vasutd045cba2020-07-07 20:51:39 +0200719 help
720 If defined, only environment variables which explicitly set the 'w'
721 writeable flag can be written and modified at runtime. No variables
722 can be otherwise created, written or imported into the environment.
723
Marek Vasut3ec46992020-05-22 01:10:14 +0200724config ENV_ACCESS_IGNORE_FORCE
725 bool "Block forced environment operations"
Marek Vasut3ec46992020-05-22 01:10:14 +0200726 help
727 If defined, don't allow the -f switch to env set override variable
728 access flags.
729
York Sun474ecd22018-06-26 10:03:22 -0700730if SPL_ENV_SUPPORT
731config SPL_ENV_IS_NOWHERE
732 bool "SPL Environment is not stored"
733 default y if ENV_IS_NOWHERE
734 help
735 Similar to ENV_IS_NOWHERE, used for SPL environment.
736
737config SPL_ENV_IS_IN_MMC
738 bool "SPL Environment in an MMC device"
739 depends on !SPL_ENV_IS_NOWHERE
740 depends on ENV_IS_IN_MMC
741 default y
742 help
743 Similar to ENV_IS_IN_MMC, used for SPL environment.
744
745config SPL_ENV_IS_IN_FAT
746 bool "SPL Environment is in a FAT filesystem"
747 depends on !SPL_ENV_IS_NOWHERE
748 depends on ENV_IS_IN_FAT
749 default y
750 help
751 Similar to ENV_IS_IN_FAT, used for SPL environment.
752
753config SPL_ENV_IS_IN_EXT4
754 bool "SPL Environment is in a EXT4 filesystem"
755 depends on !SPL_ENV_IS_NOWHERE
756 depends on ENV_IS_IN_EXT4
757 default y
758 help
759 Similar to ENV_IS_IN_EXT4, used for SPL environment.
760
761config SPL_ENV_IS_IN_NAND
762 bool "SPL Environment in a NAND device"
763 depends on !SPL_ENV_IS_NOWHERE
764 depends on ENV_IS_IN_NAND
765 default y
766 help
767 Similar to ENV_IS_IN_NAND, used for SPL environment.
768
769config SPL_ENV_IS_IN_SPI_FLASH
770 bool "SPL Environment is in SPI flash"
771 depends on !SPL_ENV_IS_NOWHERE
772 depends on ENV_IS_IN_SPI_FLASH
773 default y
774 help
775 Similar to ENV_IS_IN_SPI_FLASH, used for SPL environment.
776
777config SPL_ENV_IS_IN_FLASH
778 bool "SPL Environment in flash memory"
779 depends on !SPL_ENV_IS_NOWHERE
780 depends on ENV_IS_IN_FLASH
781 default y
782 help
783 Similar to ENV_IS_IN_FLASH, used for SPL environment.
784
785endif
786
787if TPL_ENV_SUPPORT
788
789config TPL_ENV_IS_NOWHERE
790 bool "TPL Environment is not stored"
791 default y if ENV_IS_NOWHERE
792 help
793 Similar to ENV_IS_NOWHERE, used for TPL environment.
794
795config TPL_ENV_IS_IN_MMC
796 bool "TPL Environment in an MMC device"
797 depends on !TPL_ENV_IS_NOWHERE
798 depends on ENV_IS_IN_MMC
799 default y
800 help
801 Similar to ENV_IS_IN_MMC, used for TPL environment.
802
803config TPL_ENV_IS_IN_FAT
804 bool "TPL Environment is in a FAT filesystem"
805 depends on !TPL_ENV_IS_NOWHERE
806 depends on ENV_IS_IN_FAT
807 default y
808 help
809 Similar to ENV_IS_IN_FAT, used for TPL environment.
810
811config TPL_ENV_IS_IN_EXT4
812 bool "TPL Environment is in a EXT4 filesystem"
813 depends on !TPL_ENV_IS_NOWHERE
814 depends on ENV_IS_IN_EXT4
815 default y
816 help
817 Similar to ENV_IS_IN_EXT4, used for TPL environment.
818
819config TPL_ENV_IS_IN_NAND
820 bool "TPL Environment in a NAND device"
821 depends on !TPL_ENV_IS_NOWHERE
822 depends on ENV_IS_IN_NAND
823 default y
824 help
825 Similar to ENV_IS_IN_NAND, used for TPL environment.
826
827config TPL_ENV_IS_IN_SPI_FLASH
828 bool "TPL Environment is in SPI flash"
829 depends on !TPL_ENV_IS_NOWHERE
830 depends on ENV_IS_IN_SPI_FLASH
831 default y
832 help
833 Similar to ENV_IS_IN_SPI_FLASH, used for TPL environment.
834
835config TPL_ENV_IS_IN_FLASH
836 bool "TPL Environment in flash memory"
837 depends on !TPL_ENV_IS_NOWHERE
838 depends on ENV_IS_IN_FLASH
839 default y
840 help
841 Similar to ENV_IS_IN_FLASH, used for TPL environment.
842
843endif
844
Simon Glassbc438b62020-09-10 20:21:24 -0600845config VERSION_VARIABLE
846 bool "Add a 'ver' environment variable with the U-Boot version"
847 help
848 If this variable is defined, an environment variable
849 named "ver" is created by U-Boot showing the U-Boot
850 version as printed by the "version" command.
851 Any change to this variable will be reverted at the
852 next reset.
853
Simon Glass0649cd02017-08-03 12:21:49 -0600854endmenu