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