[U-Boot] [PATCH 2/3] SPL: create Kconfig options for CONFIG_SPL_*_LOAD

Fabien Parent fparent at baylibre.com
Tue Dec 6 14:48:29 CET 2016


In order to clean up the config headers and also to allow to easily
switch the boot device for some boards without having to modify the
config headers, it is better to move the options to Kconfig. This
commit move the CONFIG_SPL_*_LOAD options to Kconfig files.

Signed-off-by: Fabien Parent <fparent at baylibre.com>
---
 common/spl/Kconfig           | 25 +++++++++++++++++++++++++
 scripts/config_whitelist.txt |  3 ---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index cba51f5df6..9313870566 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -97,6 +97,31 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
 	  Address on the MMC to load U-Boot from, when the MMC is being used
 	  in raw mode. Units: MMC sectors (1 sector = 512 bytes).
 
+config SPL_SELECT_BOOT_MEDIA
+	bool "Select the media to boot from"
+	depends on SPL
+	help
+	  Enable selection of the media that will be used to load u-boot or
+	  the OS. This is not a must, some SoCs need this, some not.
+
+choice
+	prompt "Boot media"
+	depends on SPL_SELECT_BOOT_MEDIA
+
+config SPL_NAND_LOAD
+	bool "Load u-boot or OS from NAND"
+	depends on SPL_NAND_SUPPORT
+
+config SPL_SPI_LOAD
+	bool "Load u-boot or OS from SPI"
+	depends on SPL_SPI_FLASH_SUPPORT
+
+config SPL_MMC_LOAD
+	bool "Load u-boot or OS from MMC"
+	depends on SPL_MMC_SUPPORT
+
+endchoice
+
 config TPL
 	bool
 	depends on SPL && SUPPORT_TPL
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 8814841e1f..f9fb4b59f8 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -4163,7 +4163,6 @@ CONFIG_SPL_MAX_FOOTPRINT
 CONFIG_SPL_MAX_PEB_SIZE
 CONFIG_SPL_MAX_SIZE
 CONFIG_SPL_MMC_BOOT
-CONFIG_SPL_MMC_LOAD
 CONFIG_SPL_MMC_MINIMAL
 CONFIG_SPL_MPC83XX_WAIT_FOR_NAND
 CONFIG_SPL_MXS_PSWITCH_WAIT
@@ -4173,7 +4172,6 @@ CONFIG_SPL_NAND_BOOT
 CONFIG_SPL_NAND_DRIVERS
 CONFIG_SPL_NAND_ECC
 CONFIG_SPL_NAND_INIT
-CONFIG_SPL_NAND_LOAD
 CONFIG_SPL_NAND_MINIMAL
 CONFIG_SPL_NAND_MXS
 CONFIG_SPL_NAND_RAW_ONLY
@@ -4199,7 +4197,6 @@ CONFIG_SPL_SKIP_RELOCATE
 CONFIG_SPL_SPAACT_ADDR
 CONFIG_SPL_SPI_BOOT
 CONFIG_SPL_SPI_FLASH_MINIMAL
-CONFIG_SPL_SPI_LOAD
 CONFIG_SPL_STACK
 CONFIG_SPL_STACK_ADDR
 CONFIG_SPL_STACK_SIZE
-- 
2.11.0



More information about the U-Boot mailing list