summaryrefslogtreecommitdiff
path: root/common/Kconfig
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2017-02-27 18:22:03 +0100
committerJagan Teki <jagan@amarulasolutions.com>2017-04-07 11:23:45 +0530
commitfb1c43cc37ae45c6c0576d976a53b9222819691c (patch)
tree2f55124ffd08e8c7d0fa432f4f6d730910a9973a /common/Kconfig
parent594b4cc732f8f45d855ff435ef68fa4afc153844 (diff)
common: Move environment choice to Kconfig
The environment location is something that might change per board (depending on what storage options are availaible there) or depending on the user choice (when we have several options). Instead of hardcoding it in our configuration header, create a Kconfig choice with the options we use for now, and the symbols that depend on it. Once done, also remove the irrelevant sunxi defines. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'common/Kconfig')
-rw-r--r--common/Kconfig69
1 files changed, 69 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 1e0c627341..04a73e07a2 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -158,6 +158,75 @@ config SPI_BOOT
endmenu
+menu "Environment"
+
+if ARCH_SUNXI
+
+choice
+ prompt "Environment Device"
+ default ENV_IS_IN_MMC if ARCH_SUNXI
+
+config ENV_IS_IN_MMC
+ bool "Environment in an MMC device"
+ depends on CMD_MMC
+ help
+ Define this if you have an MMC device which you want to use for the
+ environment.
+
+config ENV_IS_IN_NAND
+ bool "Environment in a NAND device"
+ depends on CMD_NAND
+ help
+ Define this if you have a NAND device which you want to use for the
+ environment.
+
+config ENV_IS_IN_UBI
+ bool "Environment in a UBI volume"
+ depends on CMD_UBI
+ depends on CMD_MTDPARTS
+ help
+ Define this if you have a UBI volume which you want to use for the
+ environment.
+
+config ENV_IS_NOWHERE
+ bool "Environment is not stored"
+ help
+ Define this if you don't want to or can't have an environment stored
+ on a storage medium
+
+endchoice
+
+config ENV_OFFSET
+ hex "Environment Offset"
+ depends on !ENV_IS_IN_UBI
+ depends on !ENV_IS_NOWHERE
+ default 0x88000 if ARCH_SUNXI
+ help
+ Offset from the start of the device (or partition)
+
+config ENV_SIZE
+ hex "Environment Size"
+ depends on !ENV_IS_NOWHERE
+ default 0x20000 if ARCH_SUNXI
+ help
+ Size of the environment storage area
+
+config ENV_UBI_PART
+ string "UBI partition name"
+ depends on ENV_IS_IN_UBI
+ help
+ MTD partition containing the UBI device
+
+config ENV_UBI_VOLUME
+ string "UBI volume name"
+ depends on ENV_IS_IN_UBI
+ help
+ Name of the volume that you want to store the environment in.
+
+endif
+
+endmenu
+
config BOOTDELAY
int "delay in seconds before automatically booting"
default 2