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