env: sunxi: Define location in SPI flash
[platform/kernel/u-boot.git] / env / Kconfig
1 menu "Environment"
2
3 config ENV_SUPPORT
4         def_bool y
5
6 config 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
24 config SAVEENV
25         def_bool y if CMD_SAVEENV
26
27 config 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
33 config ENV_IS_NOWHERE
34         bool "Environment is not stored"
35         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
41         help
42           Define this if you don't want to or can't have an environment stored
43           on a storage medium. In this case the environment will still exist
44           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
48 config 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
61           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
65           - 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
75 config ENV_IS_IN_FAT
76         bool "Environment is in a FAT filesystem"
77         depends on !CHAIN_OF_TRUST
78         default y if ARCH_BCM283X
79         default y if ARCH_SUNXI && MMC
80         default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
81         select FS_FAT
82         select FAT_WRITE
83         help
84           Define this if you want to use the FAT file system for the environment.
85
86 config ENV_IS_IN_EXT4
87         bool "Environment is in a EXT4 filesystem"
88         depends on !CHAIN_OF_TRUST
89         select FS_EXT4
90         select EXT4_WRITE
91         help
92           Define this if you want to use the EXT4 file system for the environment.
93
94 config ENV_IS_IN_FLASH
95         bool "Environment in flash memory"
96         depends on !CHAIN_OF_TRUST
97         default y if ARCH_CINTEGRATOR
98         default y if ARCH_INTEGRATOR_CP
99         default y if M548x || M547x || M5282
100         default y if MCF532x || MCF52x2
101         default y if MPC86xx || MPC83xx
102         default y if ARCH_MPC8548
103         default y if SH && !CPU_SH4
104         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
162
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
172 config ENV_IS_IN_MMC
173         bool "Environment in an MMC device"
174         depends on !CHAIN_OF_TRUST
175         depends on MMC
176         default y if ARCH_EXYNOS4
177         default y if MX6SX || MX7D
178         default y if TEGRA30 || TEGRA124
179         default y if TEGRA_ARMV8_COMMON
180         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
221           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
226           This value is also in units of bytes, but must also be aligned to
227           an MMC sector boundary.
228
229 config 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
267 config 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
283 config 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
298 config ENV_IS_IN_REMOTE
299         bool "Environment is in remote memory space"
300         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
313 config ENV_IS_IN_SPI_FLASH
314         bool "Environment is in SPI flash"
315         depends on !CHAIN_OF_TRUST && SPI
316         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
323         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
346 config 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
360 config ENV_SPI_BUS
361         int "Value of SPI flash bus for environment"
362         depends on ENV_IS_IN_SPI_FLASH
363         default SF_DEFAULT_BUS
364         help
365           Value the SPI bus and chip select for environment.
366
367 config ENV_SPI_CS
368         int "Value of SPI flash chip select for environment"
369         depends on ENV_IS_IN_SPI_FLASH
370         default SF_DEFAULT_CS
371         help
372           Value of the SPI chip select for environment.
373
374 config ENV_SPI_MAX_HZ
375         int "Value of SPI flash max frequency for environment"
376         depends on ENV_IS_IN_SPI_FLASH
377         default SF_DEFAULT_SPEED
378         help
379           Value of the SPI max work clock for environment.
380
381 config ENV_SPI_MODE
382         hex "Value of SPI flash work mode for environment"
383         depends on ENV_IS_IN_SPI_FLASH
384         default SF_DEFAULT_MODE
385         help
386           Value of the SPI work mode for environment.
387           See include/spi.h for value.
388
389 config 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
397 config ENV_IS_IN_UBI
398         bool "Environment in a UBI volume"
399         depends on !CHAIN_OF_TRUST
400         depends on MTD_UBI
401         depends on CMD_UBI
402         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
422 config SYS_REDUNDAND_ENVIRONMENT
423         bool "Enable redundant environment support"
424         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.
429           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.
432
433 config ENV_FAT_INTERFACE
434         string "Name of the block device for the environment"
435         depends on ENV_IS_IN_FAT
436         default "mmc"
437         help
438           Define this to a string that is the name of the block device.
439
440 config 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
444         default "0:auto" if ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL
445         default ":auto" if ARCH_SUNXI
446         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
462           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
466 config ENV_FAT_FILE
467         string "Name of the FAT file to use for the environment"
468         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
474 config 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
482 config 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
488 config 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
506           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
510 config ENV_EXT4_FILE
511         string "Name of the EXT4 file to use for the environment"
512         depends on ENV_IS_IN_EXT4
513         default "/uboot.env"
514         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
518 config 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
526 config 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.
532
533 config ENV_OFFSET
534         hex "Environment offset"
535         depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
536                     ENV_IS_IN_SPI_FLASH
537         default 0x3f8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
538         default 0x140000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
539         default 0xF0000 if ARCH_SUNXI
540         default 0xE0000 if ARCH_ZYNQ
541         default 0x1E00000 if ARCH_ZYNQMP
542         default 0x7F40000 if ARCH_VERSAL
543         default 0 if ARC
544         default 0x140000 if ARCH_AT91
545         default 0x260000 if ARCH_OMAP2PLUS
546         default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
547         help
548           Offset from the start of the device (or partition)
549
550 config 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
554         default 0
555         help
556           Offset from the start of the device (or partition) of the redundant
557           environment location.
558
559 config ENV_SIZE
560         hex "Environment Size"
561         default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
562         default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
563         default 0x10000 if ARCH_SUNXI
564         default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
565         default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
566         default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL
567         default 0x4000 if ARC
568         default 0x1f000
569         help
570           Size of the environment storage area
571
572 config ENV_SECT_SIZE
573         hex "Environment Sector-Size"
574         depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
575         default 0x2000 if ARCH_ROCKCHIP
576         default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL
577         default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
578         default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
579         default 0x10000 if ARCH_SUNXI && ENV_IS_IN_SPI_FLASH
580         help
581           Size of the sector containing the environment.
582
583 config ENV_UBI_PART
584         string "UBI partition name"
585         depends on ENV_IS_IN_UBI
586         help
587           MTD partition containing the UBI device
588
589 config ENV_UBI_VOLUME
590         string "UBI volume name"
591         depends on ENV_IS_IN_UBI
592         help
593           Name of the volume that you want to store the environment in.
594
595 config ENV_UBI_VOLUME_REDUND
596         string "UBI redundant volume name"
597         depends on ENV_IS_IN_UBI && SYS_REDUNDAND_ENVIRONMENT
598         help
599           Name of the redundant volume that you want to store the environment in.
600
601 config ENV_UBI_VID_OFFSET
602         int "ubi environment VID offset"
603         depends on ENV_IS_IN_UBI
604         default 0
605         help
606           UBI VID offset for environment. If 0, no custom VID offset is used.
607
608 config SYS_RELOC_GD_ENV_ADDR
609         bool "Relocate gd->env_addr"
610         help
611           Relocate the early env_addr pointer so we know it is not inside
612           the binary. Some systems need this and for the rest, it doesn't hurt.
613
614 config SYS_MMC_ENV_DEV
615         int "mmc device number"
616         depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT || SYS_LS_PPA_FW_IN_MMC || \
617                 CMD_MVEBU_BUBT || FMAN_ENET || QE || PHY_CORTINA
618         default 0
619         help
620           MMC device number on the platform where the environment is stored.
621
622 config SYS_MMC_ENV_PART
623         int "mmc partition number"
624         depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT
625         default 0
626         help
627           MMC hardware partition device number on the platform where the
628           environment is stored.  Note that this is not related to any software
629           defined partition table but instead if we are in the user area, which is
630           partition 0 or the first boot partition, which is 1 or some other defined
631           partition.
632
633 config USE_DEFAULT_ENV_FILE
634         bool "Create default environment from file"
635         help
636           Normally, the default environment is automatically generated
637           based on the settings of various CONFIG_* options, as well
638           as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option,
639           you can instead define the entire default environment in an
640           external file.
641
642 config DEFAULT_ENV_FILE
643         string "Path to default environment file"
644         depends on USE_DEFAULT_ENV_FILE
645         help
646           The path containing the default environment. The format is
647           the same as accepted by the mkenvimage tool: lines
648           containing key=value pairs, blank lines and lines beginning
649           with # are ignored.
650
651 config ENV_VARS_UBOOT_RUNTIME_CONFIG
652         bool "Add run-time information to the environment"
653         help
654           Enable this in order to add variables describing certain
655           run-time determined information about the hardware to the
656           environment.  These will be named board_name, board_rev.
657
658 config DELAY_ENVIRONMENT
659         bool "Delay environment loading"
660         depends on !OF_CONTROL
661         help
662           Enable this to inhibit loading the environment during board
663           initialization. This can address the security risk of untrusted data
664           being used during boot. Normally the environment is loaded when the
665           board is initialised so that it is available to U-Boot. This inhibits
666           that so that the environment is not available until explicitly loaded
667           later by U-Boot code. With CONFIG_OF_CONTROL this is instead
668           controlled by the value of /config/load-environment.
669
670 config ENV_IMPORT_FDT
671         bool "Amend environment by FDT properties"
672         depends on OF_CONTROL
673         help
674           If selected, after the environment has been loaded from its
675           persistent location, the "env_fdt_path" variable is looked
676           up and used as a path to a node in the control DTB. The
677           property/value pairs in that node is then used to update the
678           run-time environment. This can be useful to use the same
679           U-Boot binary with different board variants.
680
681 config ENV_FDT_PATH
682         string "Default value for env_fdt_path variable"
683         depends on ENV_IMPORT_FDT
684         default "/config/environment"
685         help
686           The initial value of the env_fdt_path variable.
687
688 config ENV_APPEND
689         bool "Always append the environment with new data"
690         help
691           If defined, the environment hash table is only ever appended with new
692           data, but the existing hash table can never be dropped and reloaded
693           with newly imported data. This may be used in combination with static
694           flags to e.g. to protect variables which must not be modified.
695
696 config ENV_WRITEABLE_LIST
697         bool "Permit write access only to listed variables"
698         help
699           If defined, only environment variables which explicitly set the 'w'
700           writeable flag can be written and modified at runtime. No variables
701           can be otherwise created, written or imported into the environment.
702
703 config ENV_ACCESS_IGNORE_FORCE
704         bool "Block forced environment operations"
705         help
706           If defined, don't allow the -f switch to env set override variable
707           access flags.
708
709 if SPL_ENV_SUPPORT
710 config SPL_ENV_IS_NOWHERE
711         bool "SPL Environment is not stored"
712         default y if ENV_IS_NOWHERE
713         help
714           Similar to ENV_IS_NOWHERE, used for SPL environment.
715
716 config SPL_ENV_IS_IN_MMC
717         bool "SPL Environment in an MMC device"
718         depends on !SPL_ENV_IS_NOWHERE
719         depends on ENV_IS_IN_MMC
720         default y
721         help
722           Similar to ENV_IS_IN_MMC, used for SPL environment.
723
724 config SPL_ENV_IS_IN_FAT
725         bool "SPL Environment is in a FAT filesystem"
726         depends on !SPL_ENV_IS_NOWHERE
727         depends on ENV_IS_IN_FAT
728         default y
729         help
730           Similar to ENV_IS_IN_FAT, used for SPL environment.
731
732 config SPL_ENV_IS_IN_EXT4
733         bool "SPL Environment is in a EXT4 filesystem"
734         depends on !SPL_ENV_IS_NOWHERE
735         depends on ENV_IS_IN_EXT4
736         default y
737         help
738           Similar to ENV_IS_IN_EXT4, used for SPL environment.
739
740 config SPL_ENV_IS_IN_NAND
741         bool "SPL Environment in a NAND device"
742         depends on !SPL_ENV_IS_NOWHERE
743         depends on ENV_IS_IN_NAND
744         default y
745         help
746           Similar to ENV_IS_IN_NAND, used for SPL environment.
747
748 config SPL_ENV_IS_IN_SPI_FLASH
749         bool "SPL Environment is in SPI flash"
750         depends on !SPL_ENV_IS_NOWHERE
751         depends on ENV_IS_IN_SPI_FLASH
752         default y
753         help
754           Similar to ENV_IS_IN_SPI_FLASH, used for SPL environment.
755
756 config SPL_ENV_IS_IN_FLASH
757         bool "SPL Environment in flash memory"
758         depends on !SPL_ENV_IS_NOWHERE
759         depends on ENV_IS_IN_FLASH
760         default y
761         help
762           Similar to ENV_IS_IN_FLASH, used for SPL environment.
763
764 endif
765
766 if TPL_ENV_SUPPORT
767
768 config TPL_ENV_IS_NOWHERE
769         bool "TPL Environment is not stored"
770         default y if ENV_IS_NOWHERE
771         help
772           Similar to ENV_IS_NOWHERE, used for TPL environment.
773
774 config TPL_ENV_IS_IN_MMC
775         bool "TPL Environment in an MMC device"
776         depends on !TPL_ENV_IS_NOWHERE
777         depends on ENV_IS_IN_MMC
778         default y
779         help
780           Similar to ENV_IS_IN_MMC, used for TPL environment.
781
782 config TPL_ENV_IS_IN_FAT
783         bool "TPL Environment is in a FAT filesystem"
784         depends on !TPL_ENV_IS_NOWHERE
785         depends on ENV_IS_IN_FAT
786         default y
787         help
788           Similar to ENV_IS_IN_FAT, used for TPL environment.
789
790 config TPL_ENV_IS_IN_EXT4
791         bool "TPL Environment is in a EXT4 filesystem"
792         depends on !TPL_ENV_IS_NOWHERE
793         depends on ENV_IS_IN_EXT4
794         default y
795         help
796           Similar to ENV_IS_IN_EXT4, used for TPL environment.
797
798 config TPL_ENV_IS_IN_NAND
799         bool "TPL Environment in a NAND device"
800         depends on !TPL_ENV_IS_NOWHERE
801         depends on ENV_IS_IN_NAND
802         default y
803         help
804           Similar to ENV_IS_IN_NAND, used for TPL environment.
805
806 config TPL_ENV_IS_IN_SPI_FLASH
807         bool "TPL Environment is in SPI flash"
808         depends on !TPL_ENV_IS_NOWHERE
809         depends on ENV_IS_IN_SPI_FLASH
810         default y
811         help
812           Similar to ENV_IS_IN_SPI_FLASH, used for TPL environment.
813
814 config TPL_ENV_IS_IN_FLASH
815         bool "TPL Environment in flash memory"
816         depends on !TPL_ENV_IS_NOWHERE
817         depends on ENV_IS_IN_FLASH
818         default y
819         help
820           Similar to ENV_IS_IN_FLASH, used for TPL environment.
821
822 endif
823
824 config VERSION_VARIABLE
825         bool "Add a 'ver' environment variable with the U-Boot version"
826         help
827           If this variable is defined, an environment variable
828           named "ver" is created by U-Boot showing the U-Boot
829           version as printed by the "version" command.
830           Any change to this variable will be reverted at the
831           next reset.
832
833 endmenu