u-boot: Disable environment storage

U-Boot can be configured via environment variables which can be saved to
various storage devices. This usually defaults to MMC or SPI depending
on where it boots from, but assumes the device's layout is controlled by
U-Boot.

We should store the environment in SPI flash, but we also need to
configure coreboot FMAPs to reserve the area U-Boot would use as its
environment storage. For now, disable environment storage by setting
ENV_IS_NOWHERE=y to avoid overwriting random regions of SPI or MMC if
someone tries to save the variables.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak
2023-02-13 23:10:28 +03:00
parent 8d57468ee5
commit 7932d5fa95
9 changed files with 18 additions and 68 deletions
+2 -5
View File
@@ -183,7 +183,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=2
CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds"
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFE000
CONFIG_DM_GPIO=y
# CONFIG_SPL_DM_SPI is not set
CONFIG_DEFAULT_DEVICE_TREE="tegra124-nyan-big"
@@ -914,12 +913,12 @@ CONFIG_SAVEENV=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_MIN_ENTRIES=64
CONFIG_ENV_MAX_ENTRIES=512
# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_ENV_IS_NOWHERE=y
# CONFIG_ENV_IS_IN_EEPROM is not set
# CONFIG_ENV_IS_IN_FAT is not set
# CONFIG_ENV_IS_IN_EXT4 is not set
# CONFIG_ENV_IS_IN_FLASH is not set
CONFIG_ENV_IS_IN_MMC=y
# CONFIG_ENV_IS_IN_MMC is not set
# CONFIG_ENV_IS_IN_NAND is not set
# CONFIG_ENV_IS_IN_NVRAM is not set
# CONFIG_ENV_IS_IN_ONENAND is not set
@@ -927,8 +926,6 @@ CONFIG_ENV_IS_IN_MMC=y
# CONFIG_ENV_IS_IN_SPI_FLASH is not set
# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_MMC_ENV_DEV=0
CONFIG_SYS_MMC_ENV_PART=2
# CONFIG_USE_DEFAULT_ENV_FILE is not set
# CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set
# CONFIG_ENV_IMPORT_FDT is not set