blob: c8dd65f3a51bccae84bbde4b269523ed391fa71b [file] [log] [blame]
Simon Glass547cb402017-08-03 12:21:49 -06001menu "Environment"
2
3config ENV_IS_IN_DATAFLASH
4 bool "Environment in dataflash"
5 depends on !CHAIN_OF_TRUST
6 help
7 Define this if you have a DataFlash memory device which you
8 want to use for the environment.
9
10 - CONFIG_ENV_OFFSET:
11 - CONFIG_ENV_ADDR:
12 - CONFIG_ENV_SIZE:
13
14 These three #defines specify the offset and size of the
15 environment area within the total memory of your DataFlash placed
16 at the specified address.
17
18config ENV_IS_IN_EEPROM
19 bool "Environment in EEPROM"
20 depends on !CHAIN_OF_TRUST
21 help
22 Use this if you have an EEPROM or similar serial access
23 device and a driver for it.
24
25 - CONFIG_ENV_OFFSET:
26 - CONFIG_ENV_SIZE:
27
28 These two #defines specify the offset and size of the
29 environment area within the total memory of your EEPROM.
30
31 - CONFIG_SYS_I2C_EEPROM_ADDR:
32 If defined, specified the chip address of the EEPROM device.
33 The default address is zero.
34
35 - CONFIG_SYS_I2C_EEPROM_BUS:
36 If defined, specified the i2c bus of the EEPROM device.
37
38 - CONFIG_SYS_EEPROM_PAGE_WRITE_BITS:
39 If defined, the number of bits used to address bytes in a
40 single page in the EEPROM device. A 64 byte page, for example
41 would require six bits.
42
43 - CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS:
44 If defined, the number of milliseconds to delay between
45 page writes. The default is zero milliseconds.
46
47 - CONFIG_SYS_I2C_EEPROM_ADDR_LEN:
48 The length in bytes of the EEPROM memory array address. Note
49 that this is NOT the chip address length!
50
51 - CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW:
52 EEPROM chips that implement "address overflow" are ones
53 like Catalyst 24WC04/08/16 which has 9/10/11 bits of
54 address and the extra bits end up in the "chip address" bit
55 slots. This makes a 24WC08 (1Kbyte) chip look like four 256
56 byte chips.
57
58 Note that we consider the length of the address field to
59 still be one byte because the extra address bits are hidden
60 in the chip address.
61
62 - CONFIG_SYS_EEPROM_SIZE:
63 The size in bytes of the EEPROM device.
64
65 - CONFIG_ENV_EEPROM_IS_ON_I2C
66 define this, if you have I2C and SPI activated, and your
67 EEPROM, which holds the environment, is on the I2C bus.
68
69 - CONFIG_I2C_ENV_EEPROM_BUS
70 if you have an Environment on an EEPROM reached over
71 I2C muxes, you can define here, how to reach this
72 EEPROM. For example:
73
74 #define CONFIG_I2C_ENV_EEPROM_BUS 1
75
76 EEPROM which holds the environment, is reached over
77 a pca9547 i2c mux with address 0x70, channel 3.
78
79config ENV_IS_IN_FAT
80 bool "Environment is in a FAT filesystem"
81 depends on !CHAIN_OF_TRUST
82 select FAT_WRITE
83 help
Simon Glassea8bf842017-08-03 12:21:50 -060084 Define this if you want to use the FAT file system for the environment.
Simon Glass547cb402017-08-03 12:21:49 -060085
Simon Glassea8bf842017-08-03 12:21:50 -060086 - CONFIG_FAT_WRITE:
87 This must be enabled. Otherwise it cannot save the environment file.
Simon Glass547cb402017-08-03 12:21:49 -060088
89config ENV_IS_IN_FLASH
90 bool "Environment in flash memory"
91 depends on !CHAIN_OF_TRUST
92 help
93 Define this if you have a flash device which you want to use for the
94 environment.
95
96 a) The environment occupies one whole flash sector, which is
97 "embedded" in the text segment with the U-Boot code. This
98 happens usually with "bottom boot sector" or "top boot
99 sector" type flash chips, which have several smaller
100 sectors at the start or the end. For instance, such a
101 layout can have sector sizes of 8, 2x4, 16, Nx32 kB. In
102 such a case you would place the environment in one of the
103 4 kB sectors - with U-Boot code before and after it. With
104 "top boot sector" type flash chips, you would put the
105 environment in one of the last sectors, leaving a gap
106 between U-Boot and the environment.
107
108 CONFIG_ENV_OFFSET:
109
110 Offset of environment data (variable area) to the
111 beginning of flash memory; for instance, with bottom boot
112 type flash chips the second sector can be used: the offset
113 for this sector is given here.
114
115 CONFIG_ENV_OFFSET is used relative to CONFIG_SYS_FLASH_BASE.
116
117 CONFIG_ENV_ADDR:
118
119 This is just another way to specify the start address of
120 the flash sector containing the environment (instead of
121 CONFIG_ENV_OFFSET).
122
123 CONFIG_ENV_SECT_SIZE:
124
125 Size of the sector containing the environment.
126
127
128 b) Sometimes flash chips have few, equal sized, BIG sectors.
129 In such a case you don't want to spend a whole sector for
130 the environment.
131
132 CONFIG_ENV_SIZE:
133
134 If you use this in combination with CONFIG_ENV_IS_IN_FLASH
135 and CONFIG_ENV_SECT_SIZE, you can specify to use only a part
136 of this flash sector for the environment. This saves
137 memory for the RAM copy of the environment.
138
139 It may also save flash memory if you decide to use this
140 when your environment is "embedded" within U-Boot code,
141 since then the remainder of the flash sector could be used
142 for U-Boot code. It should be pointed out that this is
143 STRONGLY DISCOURAGED from a robustness point of view:
144 updating the environment in flash makes it always
145 necessary to erase the WHOLE sector. If something goes
146 wrong before the contents has been restored from a copy in
147 RAM, your target system will be dead.
148
149 CONFIG_ENV_ADDR_REDUND
150 CONFIG_ENV_SIZE_REDUND
151
152 These settings describe a second storage area used to hold
153 a redundant copy of the environment data, so that there is
154 a valid backup copy in case there is a power failure during
155 a "saveenv" operation.
156
157 BE CAREFUL! Any changes to the flash layout, and some changes to the
158 source code will make it necessary to adapt <board>/u-boot.lds*
159 accordingly!
160
161config ENV_IS_IN_MMC
162 bool "Environment in an MMC device"
163 depends on !CHAIN_OF_TRUST
164 default y if ARCH_SUNXI
165 help
166 Define this if you have an MMC device which you want to use for the
167 environment.
168
169 CONFIG_SYS_MMC_ENV_DEV:
170
171 Specifies which MMC device the environment is stored in.
172
173 CONFIG_SYS_MMC_ENV_PART (optional):
174
175 Specifies which MMC partition the environment is stored in. If not
176 set, defaults to partition 0, the user area. Common values might be
177 1 (first MMC boot partition), 2 (second MMC boot partition).
178
179 CONFIG_ENV_OFFSET:
180 CONFIG_ENV_SIZE:
181
182 These two #defines specify the offset and size of the environment
183 area within the specified MMC device.
184
185 If offset is positive (the usual case), it is treated as relative to
186 the start of the MMC partition. If offset is negative, it is treated
187 as relative to the end of the MMC partition. This can be useful if
188 your board may be fitted with different MMC devices, which have
189 different sizes for the MMC partitions, and you always want the
190 environment placed at the very end of the partition, to leave the
191 maximum possible space before it, to store other data.
192
193 These two values are in units of bytes, but must be aligned to an
194 MMC sector boundary.
195
196 CONFIG_ENV_OFFSET_REDUND (optional):
197
198 Specifies a second storage area, of CONFIG_ENV_SIZE size, used to
199 hold a redundant copy of the environment data. This provides a
200 valid backup copy in case the other copy is corrupted, e.g. due
201 to a power failure during a "saveenv" operation.
202
203 This value may also be positive or negative; this is handled in the
204 same way as CONFIG_ENV_OFFSET.
205
206 This value is also in units of bytes, but must also be aligned to
207 an MMC sector boundary.
208
209 CONFIG_ENV_SIZE_REDUND (optional):
210
211 This value need not be set, even when CONFIG_ENV_OFFSET_REDUND is
212 set. If this value is set, it must be set to the same value as
213 CONFIG_ENV_SIZE.
214
215config ENV_IS_IN_NAND
216 bool "Environment in a NAND device"
217 depends on !CHAIN_OF_TRUST
218 help
219 Define this if you have a NAND device which you want to use for the
220 environment.
221
222 - CONFIG_ENV_OFFSET:
223 - CONFIG_ENV_SIZE:
224
225 These two #defines specify the offset and size of the environment
226 area within the first NAND device. CONFIG_ENV_OFFSET must be
227 aligned to an erase block boundary.
228
229 - CONFIG_ENV_OFFSET_REDUND (optional):
230
231 This setting describes a second storage area of CONFIG_ENV_SIZE
232 size used to hold a redundant copy of the environment data, so
233 that there is a valid backup copy in case there is a power failure
234 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
235 aligned to an erase block boundary.
236
237 - CONFIG_ENV_RANGE (optional):
238
239 Specifies the length of the region in which the environment
240 can be written. This should be a multiple of the NAND device's
241 block size. Specifying a range with more erase blocks than
242 are needed to hold CONFIG_ENV_SIZE allows bad blocks within
243 the range to be avoided.
244
245 - CONFIG_ENV_OFFSET_OOB (optional):
246
247 Enables support for dynamically retrieving the offset of the
248 environment from block zero's out-of-band data. The
249 "nand env.oob" command can be used to record this offset.
250 Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
251 using CONFIG_ENV_OFFSET_OOB.
252
253config ENV_IS_IN_NVRAM
254 bool "Environment in a non-volatile RAM"
255 depends on !CHAIN_OF_TRUST
256 help
257 Define this if you have some non-volatile memory device
258 (NVRAM, battery buffered SRAM) which you want to use for the
259 environment.
260
261 - CONFIG_ENV_ADDR:
262 - CONFIG_ENV_SIZE:
263
264 These two #defines are used to determine the memory area you
265 want to use for environment. It is assumed that this memory
266 can just be read and written to, without any special
267 provision.
268
269config ENV_IS_IN_ONENAND
270 bool "Environment is in OneNAND"
271 depends on !CHAIN_OF_TRUST
272 help
273 Define this if you want to put your local device's environment in
274 OneNAND.
275
276 - CONFIG_ENV_ADDR:
277 - CONFIG_ENV_SIZE:
278
279 These two #defines are used to determine the device range you
280 want to use for environment. It is assumed that this memory
281 can just be read and written to, without any special
282 provision.
283
284config ENV_IS_IN_REMOTE
285 bool "Environment is in remove memory space"
286 depends on !CHAIN_OF_TRUST
287 help
288 Define this if you have a remote memory space which you
289 want to use for the local device's environment.
290
291 - CONFIG_ENV_ADDR:
292 - CONFIG_ENV_SIZE:
293
294 These two #defines specify the address and size of the
295 environment area within the remote memory space. The
296 local device can get the environment from remote memory
297 space by SRIO or PCIE links.
298
299config ENV_IS_IN_SPI_FLASH
300 bool "Environment is in SPI flash"
301 depends on !CHAIN_OF_TRUST
302 help
303 Define this if you have a SPI Flash memory device which you
304 want to use for the environment.
305
306 - CONFIG_ENV_OFFSET:
307 - CONFIG_ENV_SIZE:
308
309 These two #defines specify the offset and size of the
310 environment area within the SPI Flash. CONFIG_ENV_OFFSET must be
311 aligned to an erase sector boundary.
312
313 - CONFIG_ENV_SECT_SIZE:
314
315 Define the SPI flash's sector size.
316
317 - CONFIG_ENV_OFFSET_REDUND (optional):
318
319 This setting describes a second storage area of CONFIG_ENV_SIZE
320 size used to hold a redundant copy of the environment data, so
321 that there is a valid backup copy in case there is a power failure
322 during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
323 aligned to an erase sector boundary.
324
325 - CONFIG_ENV_SPI_BUS (optional):
326 - CONFIG_ENV_SPI_CS (optional):
327
328 Define the SPI bus and chip select. If not defined they will be 0.
329
330 - CONFIG_ENV_SPI_MAX_HZ (optional):
331
332 Define the SPI max work clock. If not defined then use 1MHz.
333
334 - CONFIG_ENV_SPI_MODE (optional):
335
336 Define the SPI work mode. If not defined then use SPI_MODE_3.
337
338config ENV_IS_IN_UBI
339 bool "Environment in a UBI volume"
340 depends on !CHAIN_OF_TRUST
341 help
342 Define this if you have an UBI volume that you want to use for the
343 environment. This has the benefit of wear-leveling the environment
344 accesses, which is important on NAND.
345
346 - CONFIG_ENV_UBI_PART:
347
348 Define this to a string that is the mtd partition containing the UBI.
349
350 - CONFIG_ENV_UBI_VOLUME:
351
352 Define this to the name of the volume that you want to store the
353 environment in.
354
355 - CONFIG_ENV_UBI_VOLUME_REDUND:
356
357 Define this to the name of another volume to store a second copy of
358 the environment in. This will enable redundant environments in UBI.
359 It is assumed that both volumes are in the same MTD partition.
360
361 - CONFIG_UBI_SILENCE_MSG
362 - CONFIG_UBIFS_SILENCE_MSG
363
364 You will probably want to define these to avoid a really noisy system
365 when storing the env in UBI.
366
367config ENV_IS_NOWHERE
368 bool "Environment is not stored"
369 help
370 Define this if you don't want to or can't have an environment stored
371 on a storage medium
372
373config ENV_FAT_INTERFACE
374 string "Name of the block device for the environment"
375 depends on ENV_IS_IN_FAT
376 default "mmc" if TI_COMMON_CMD_OPTIONS || ARCH_ZYNQMP || ARCH_AT91
377 help
378 Define this to a string that is the name of the block device.
379
380config ENV_FAT_DEVICE_AND_PART
381 string "Device and partition for where to store the environemt in FAT"
382 depends on ENV_IS_IN_FAT
383 default "0:1" if TI_COMMON_CMD_OPTIONS
384 default "0:auto" if ARCH_ZYNQMP
385 default "0" if ARCH_AT91
386 help
387 Define this to a string to specify the partition of the device. It can
388 be as following:
389
390 "D:P", "D:0", "D", "D:" or "D:auto" (D, P are integers. And P >= 1)
391 - "D:P": device D partition P. Error occurs if device D has no
392 partition table.
393 - "D:0": device D.
394 - "D" or "D:": device D partition 1 if device D has partition
395 table, or the whole device D if has no partition
396 table.
397 - "D:auto": first partition in device D with bootable flag set.
398 If none, first valid partition in device D. If no
399 partition table then means device D.
400
401config ENV_FAT_FILE
402 string "Name of the FAT file to use for the environemnt"
403 depends on ENV_IS_IN_FAT
404 default "uboot.env"
405 help
406 It's a string of the FAT file name. This file use to store the
407 environment.
408
409if ARCH_SUNXI
410
411config ENV_OFFSET
412 hex "Environment Offset"
413 depends on !ENV_IS_IN_UBI
414 depends on !ENV_IS_NOWHERE
415 default 0x88000 if ARCH_SUNXI
416 help
417 Offset from the start of the device (or partition)
418
419config ENV_SIZE
420 hex "Environment Size"
421 depends on !ENV_IS_NOWHERE
422 default 0x20000 if ARCH_SUNXI
423 help
424 Size of the environment storage area
425
426config ENV_UBI_PART
427 string "UBI partition name"
428 depends on ENV_IS_IN_UBI
429 help
430 MTD partition containing the UBI device
431
432config ENV_UBI_VOLUME
433 string "UBI volume name"
434 depends on ENV_IS_IN_UBI
435 help
436 Name of the volume that you want to store the environment in.
437
438endif
439
440endmenu