blob: a3c6298273ed8709e51e1d2b97cbac37484a8520 [file] [log] [blame]
Simon Glass547cb402017-08-03 12:21:49 -06001menu "Environment"
2
Simon Glass87551f12017-08-03 12:21:59 -06003config ENV_IS_NOWHERE
4 bool "Environment is not stored"
Maxime Ripard7569e182018-01-23 21:17:01 +01005 depends on !ENV_IS_IN_EEPROM
6 depends on !ENV_IS_IN_FAT
7 depends on !ENV_IS_IN_FLASH
8 depends on !ENV_IS_IN_MMC
9 depends on !ENV_IS_IN_NAND
10 depends on !ENV_IS_IN_NVRAM
11 depends on !ENV_IS_IN_ONENAND
12 depends on !ENV_IS_IN_REMOTE
13 depends on !ENV_IS_IN_SPI_FLASH
14 depends on !ENV_IS_IN_UBI
15 default y
Simon Glass87551f12017-08-03 12:21:59 -060016 help
17 Define this if you don't want to or can't have an environment stored
18 on a storage medium. In this case the environemnt will still exist
19 while U-Boot is running, but once U-Boot exits it will not be
20 stored. U-Boot will therefore always start up with a default
21 environment.
22
Simon Glass547cb402017-08-03 12:21:49 -060023config ENV_IS_IN_EEPROM
24 bool "Environment in EEPROM"
25 depends on !CHAIN_OF_TRUST
26 help
27 Use this if you have an EEPROM or similar serial access
28 device and a driver for it.
29
30 - CONFIG_ENV_OFFSET:
31 - CONFIG_ENV_SIZE:
32
33 These two #defines specify the offset and size of the
34 environment area within the total memory of your EEPROM.
35
Simon Glass547cb402017-08-03 12:21:49 -060036 Note that we consider the length of the address field to
37 still be one byte because the extra address bits are hidden
38 in the chip address.
39
Simon Glass547cb402017-08-03 12:21:49 -060040 - CONFIG_ENV_EEPROM_IS_ON_I2C
41 define this, if you have I2C and SPI activated, and your
42 EEPROM, which holds the environment, is on the I2C bus.
43
44 - CONFIG_I2C_ENV_EEPROM_BUS
45 if you have an Environment on an EEPROM reached over
46 I2C muxes, you can define here, how to reach this
47 EEPROM. For example:
48
49 #define CONFIG_I2C_ENV_EEPROM_BUS 1
50
51 EEPROM which holds the environment, is reached over
52 a pca9547 i2c mux with address 0x70, channel 3.
53
54config ENV_IS_IN_FAT
55 bool "Environment is in a FAT filesystem"
56 depends on !CHAIN_OF_TRUST
Maxime Ripard7569e182018-01-23 21:17:01 +010057 default y if ARCH_BCM283X
Maxime Ripard8b7dcd32018-01-23 21:17:04 +010058 default y if ARCH_SUNXI && MMC
Maxime Ripard7569e182018-01-23 21:17:01 +010059 default y if MMC_OMAP_HS && TI_COMMON_CMD_OPTIONS
Tuomas Tynkkynendc256cd2018-01-05 02:45:19 +020060 select FS_FAT
Simon Glass547cb402017-08-03 12:21:49 -060061 select FAT_WRITE
62 help
Simon Glassea8bf842017-08-03 12:21:50 -060063 Define this if you want to use the FAT file system for the environment.
Simon Glass547cb402017-08-03 12:21:49 -060064
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +010065config ENV_IS_IN_EXT4
66 bool "Environment is in a EXT4 filesystem"
67 depends on !CHAIN_OF_TRUST
68 select EXT4_WRITE
69 help
70 Define this if you want to use the EXT4 file system for the environment.
71
Simon Glass547cb402017-08-03 12:21:49 -060072config ENV_IS_IN_FLASH
73 bool "Environment in flash memory"
74 depends on !CHAIN_OF_TRUST
Maxime Ripard7569e182018-01-23 21:17:01 +010075 default y if ARCH_CINTEGRATOR
76 default y if ARCH_INTEGRATOR_CP
77 default y if M548x || M547x || M5282 || MCF547x_8x
78 default y if MCF532x || MCF52x2
79 default y if MPC86xx || MPC83xx
80 default y if ARCH_MPC8572 || ARCH_MPC8548 || ARCH_MPC8641
81 default y if SH && !CPU_SH4
Simon Glass547cb402017-08-03 12:21:49 -060082 help
83 Define this if you have a flash device which you want to use for the
84 environment.
85
86 a) The environment occupies one whole flash sector, which is
87 "embedded" in the text segment with the U-Boot code. This
88 happens usually with "bottom boot sector" or "top boot
89 sector" type flash chips, which have several smaller
90 sectors at the start or the end. For instance, such a
91 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
92 such a case you would place the environment in one of the
93 4 kB sectors - with U-Boot code before and after it. With
94 "top boot sector" type flash chips, you would put the
95 environment in one of the last sectors, leaving a gap
96 between U-Boot and the environment.
97
98 CONFIG_ENV_OFFSET:
99
100 Offset of environment data (variable area) to the
101 beginning of flash memory; for instance, with bottom boot
102 type flash chips the second sector can be used: the offset
103 for this sector is given here.
104
105 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
106
107 CONFIG_ENV_ADDR:
108
109 This is just another way to specify the start address of
110 the flash sector containing the environment (instead of
111 CONFIG_ENV_OFFSET).
112
113 CONFIG_ENV_SECT_SIZE:
114
115 Size of the sector containing the environment.
116
117
118 b) Sometimes flash chips have few, equal sized, BIG sectors.
119 In such a case you don't want to spend a whole sector for
120 the environment.
121
122 CONFIG_ENV_SIZE:
123
124 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
125 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
126 of this flash sector for the environment. This saves
127 memory for the RAM copy of the environment.
128
129 It may also save flash memory if you decide to use this
130 when your environment is "embedded" within U-Boot code,
131 since then the remainder of the flash sector could be used
132 for U-Boot code. It should be pointed out that this is
133 STRONGLY DISCOURAGED from a robustness point of view:
134 updating the environment in flash makes it always
135 necessary to erase the WHOLE sector. If something goes
136 wrong before the contents has been restored from a copy in
137 RAM, your target system will be dead.
138
139 CONFIG_ENV_ADDR_REDUND
140 CONFIG_ENV_SIZE_REDUND
141
142 These settings describe a second storage area used to hold
143 a redundant copy of the environment data, so that there is
144 a valid backup copy in case there is a power failure during
145 a "saveenv" operation.
146
147 BE CAREFUL! Any changes to the flash layout, and some changes to the
148 source code will make it necessary to adapt <board>/u-boot.lds*
149 accordingly!
150
151config ENV_IS_IN_MMC
152 bool "Environment in an MMC device"
153 depends on !CHAIN_OF_TRUST
Maxime Ripard662a1ec2018-01-23 21:17:00 +0100154 depends on MMC
Maxime Ripard7569e182018-01-23 21:17:01 +0100155 default y if ARCH_SUNXI
156 default y if ARCH_EXYNOS4
157 default y if MX6SX || MX7D
158 default y if TEGRA30 || TEGRA124
159 default y if TEGRA_ARMV8_COMMON
Simon Glass547cb402017-08-03 12:21:49 -0600160 help
161 Define this if you have an MMC device which you want to use for the
162 environment.
163
164 CONFIG_SYS_MMC_ENV_DEV:
165
166 Specifies which MMC device the environment is stored in.
167
168 CONFIG_SYS_MMC_ENV_PART (optional):
169
170 Specifies which MMC partition the environment is stored in. If not
171 set, defaults to partition 0, the user area. Common values might be
172 1 (first MMC boot partition), 2 (second MMC boot partition).
173
174 CONFIG_ENV_OFFSET:
175 CONFIG_ENV_SIZE:
176
177 These two #defines specify the offset and size of the environment
178 area within the specified MMC device.
179
180 If offset is positive (the usual case), it is treated as relative to
181 the start of the MMC partition. If offset is negative, it is treated
182 as relative to the end of the MMC partition. This can be useful if
183 your board may be fitted with different MMC devices, which have
184 different sizes for the MMC partitions, and you always want the
185 environment placed at the very end of the partition, to leave the
186 maximum possible space before it, to store other data.
187
188 These two values are in units of bytes, but must be aligned to an
189 MMC sector boundary.
190
191 CONFIG_ENV_OFFSET_REDUND (optional):
192
193 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
194 hold a redundant copy of the environment data. This provides a
195 valid backup copy in case the other copy is corrupted, e.g. due
196 to a power failure during a "saveenv" operation.
197
198 This value may also be positive or negative; this is handled in the
199 same way as CONFIG_ENV_OFFSET.
200
201 This value is also in units of bytes, but must also be aligned to
202 an MMC sector boundary.
203
204 CONFIG_ENV_SIZE_REDUND (optional):
205
206 This value need not be set, even when CONFIG_ENV_OFFSET_REDUND is
207 set. If this value is set, it must be set to the same value as
208 CONFIG_ENV_SIZE.
209
210config 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
280 bool "Environment is in remove memory space"
281 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"
296 depends on !CHAIN_OF_TRUST
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
327 - CONFIG_ENV_SPI_BUS (optional):
328 - CONFIG_ENV_SPI_CS (optional):
329
330 Define the SPI bus and chip select. If not defined they will be 0.
331
332 - CONFIG_ENV_SPI_MAX_HZ (optional):
333
334 Define the SPI max work clock. If not defined then use 1MHz.
335
336 - CONFIG_ENV_SPI_MODE (optional):
337
338 Define the SPI work mode. If not defined then use SPI_MODE_3.
339
340config ENV_IS_IN_UBI
341 bool "Environment in a UBI volume"
342 depends on !CHAIN_OF_TRUST
343 help
344 Define this if you have an UBI volume that you want to use for the
345 environment. This has the benefit of wear-leveling the environment
346 accesses, which is important on NAND.
347
348 - CONFIG_ENV_UBI_PART:
349
350 Define this to a string that is the mtd partition containing the UBI.
351
352 - CONFIG_ENV_UBI_VOLUME:
353
354 Define this to the name of the volume that you want to store the
355 environment in.
356
357 - CONFIG_ENV_UBI_VOLUME_REDUND:
358
359 Define this to the name of another volume to store a second copy of
360 the environment in. This will enable redundant environments in UBI.
361 It is assumed that both volumes are in the same MTD partition.
362
363 - CONFIG_UBI_SILENCE_MSG
364 - CONFIG_UBIFS_SILENCE_MSG
365
366 You will probably want to define these to avoid a really noisy system
367 when storing the env in UBI.
368
Simon Glass547cb402017-08-03 12:21:49 -0600369config ENV_FAT_INTERFACE
370 string "Name of the block device for the environment"
371 depends on ENV_IS_IN_FAT
Maxime Ripard8b7dcd32018-01-23 21:17:04 +0100372 default "mmc" if ARCH_SUNXI
Simon Glass547cb402017-08-03 12:21:49 -0600373 default "mmc" if TI_COMMON_CMD_OPTIONS || ARCH_ZYNQMP || ARCH_AT91
374 help
375 Define this to a string that is the name of the block device.
376
377config ENV_FAT_DEVICE_AND_PART
378 string "Device and partition for where to store the environemt in FAT"
379 depends on ENV_IS_IN_FAT
380 default "0:1" if TI_COMMON_CMD_OPTIONS
381 default "0:auto" if ARCH_ZYNQMP
Maxime Ripard8b7dcd32018-01-23 21:17:04 +0100382 default "0:auto" if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
383 default "1:auto" if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
Simon Glass547cb402017-08-03 12:21:49 -0600384 default "0" if ARCH_AT91
385 help
386 Define this to a string to specify the partition of the device. It can
387 be as following:
388
389 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
390 - "D:P": device D partition P. Error occurs if device D has no
391 partition table.
392 - "D:0": device D.
393 - "D" or "D:": device D partition 1 if device D has partition
394 table, or the whole device D if has no partition
395 table.
396 - "D:auto": first partition in device D with bootable flag set.
397 If none, first valid partition in device D. If no
398 partition table then means device D.
399
400config ENV_FAT_FILE
401 string "Name of the FAT file to use for the environemnt"
402 depends on ENV_IS_IN_FAT
403 default "uboot.env"
404 help
405 It's a string of the FAT file name. This file use to store the
406 environment.
407
Jorge Ramirez-Ortiz4a4c26d2018-01-10 11:33:48 +0100408config ENV_EXT4_INTERFACE
409 string "Name of the block device for the environment"
410 depends on ENV_IS_IN_EXT4
411 help
412 Define this to a string that is the name of the block device.
413
414config ENV_EXT4_DEVICE_AND_PART
415 string "Device and partition for where to store the environemt in EXT4"
416 depends on ENV_IS_IN_EXT4
417 help
418 Define this to a string to specify the partition of the device. It can
419 be as following:
420
421 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
422 - "D:P": device D partition P. Error occurs if device D has no
423 partition table.
424 - "D:0": device D.
425 - "D" or "D:": device D partition 1 if device D has partition
426 table, or the whole device D if has no partition
427 table.
428 - "D:auto": first partition in device D with bootable flag set.
429 If none, first valid partition in device D. If no
430 partition table then means device D.
431
432config ENV_EXT4_FILE
433 string "Name of the EXT4 file to use for the environemnt"
434 depends on ENV_IS_IN_EXT4
435 default "uboot.env"
436 help
437 It's a string of the EXT4 file name. This file use to store the
438 environment (explicit path to the file)
439
Simon Glass547cb402017-08-03 12:21:49 -0600440if ARCH_SUNXI
441
442config ENV_OFFSET
443 hex "Environment Offset"
444 depends on !ENV_IS_IN_UBI
445 depends on !ENV_IS_NOWHERE
446 default 0x88000 if ARCH_SUNXI
447 help
448 Offset from the start of the device (or partition)
449
450config ENV_SIZE
451 hex "Environment Size"
452 depends on !ENV_IS_NOWHERE
453 default 0x20000 if ARCH_SUNXI
454 help
455 Size of the environment storage area
456
457config ENV_UBI_PART
458 string "UBI partition name"
459 depends on ENV_IS_IN_UBI
460 help
461 MTD partition containing the UBI device
462
463config ENV_UBI_VOLUME
464 string "UBI volume name"
465 depends on ENV_IS_IN_UBI
466 help
467 Name of the volume that you want to store the environment in.
468
469endif
470
Klaus Goger1738e342017-12-11 17:56:08 +0100471if ARCH_ROCKCHIP
472
473config ENV_OFFSET
474 hex
475 depends on !ENV_IS_IN_UBI
476 depends on !ENV_IS_NOWHERE
477 default 0x3f8000
478 help
479 Offset from the start of the device (or partition)
480
481config ENV_SIZE
482 hex
483 default 0x8000
484 help
485 Size of the environment storage area
486
487endif
488
Simon Glass547cb402017-08-03 12:21:49 -0600489endmenu