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