Skip to contentSkip to conversation

kconfig: turnaround into single .config

PATCH New Masahiro Yamada 2 participants 9 messages Feb 24, 2015 – Feb 25, 2015

Subsystems (10)
lore
Share & tools
lore
#0 lore raw

v5 cover kconfig: turnaround into single .config

Masahiro Yamada (3):
ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
kconfig: switch to single .config configuration
kconfig: remove unneeded dependency on !SPL_BUILD

Simon Glass (1):
kconfig: Adjust ordering so that defaults work as expected

 Kconfig                              |  29 +---
 arch/arm/Kconfig                     |   7 +-
 arch/arm/cpu/arm1176/bcm2835/Kconfig |   6 +-
 arch/arm/cpu/armv7/exynos/Kconfig    |  28 ++--
 arch/arm/cpu/armv7/omap3/Kconfig     |  10 +-
 arch/arm/cpu/armv7/s5pc1xx/Kconfig   |   4 +-
 arch/arm/cpu/armv7/uniphier/Kconfig  |   4 +-
 arch/arm/mach-tegra/Kconfig          |  14 +-
 board/compulab/cm_t335/Kconfig       |   6 +-
 board/gumstix/pepper/Kconfig         |   6 +-
 board/isee/igep0033/Kconfig          |   6 +-
 board/phytec/pcm051/Kconfig          |   6 +-
 board/samsung/goni/Kconfig           |   6 +-
 board/samsung/smdkc100/Kconfig       |   6 +-
 board/silica/pengwyn/Kconfig         |   6 +-
 board/ti/am335x/Kconfig              |  10 +-
 common/Kconfig                       |   1 -
 config.mk                            |   5 +
 configs/ph1_ld4_defconfig            |   2 +-
 configs/ph1_pro4_defconfig           |   2 +-
 configs/ph1_sld8_defconfig           |   2 +-
 doc/README.kconfig                   | 132 +++++-------------
 drivers/core/Kconfig                 |  16 +--
 drivers/mtd/nand/Kconfig             |   6 +-
 dts/Kconfig                          |   1 -
 include/config_uncmd_spl.h           |  13 ++
 scripts/Makefile.autoconf            |  36 +++--
 scripts/Makefile.build               |   3 +-
 scripts/Makefile.spl                 |  10 +-
 scripts/Makefile.uncmd_spl           |  18 +++
 scripts/multiconfig.sh               | 261 +----------------------------------
 31 files changed, 184 insertions(+), 478 deletions(-)
 create mode 100644 scripts/Makefile.uncmd_spl
Signature · 1 line
1.9.1
#1 lore raw

PATCH v5 1/4 ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value

It is true that malloc is necessary for Driver Model before relocation, but there is no good reason to reserve the malloc space more than enough. The default value 0x400 works well.

---

Changes in v5: None
Changes in v3: None
Changes in v2: None

 arch/arm/cpu/armv7/uniphier/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/uniphier/Kconfig +1 -1
index 1a47ac9..8fdef28 100644
@@ -52,7 +52,7 @@ config SYS_MALLOC_F
 	default y
 
 config SYS_MALLOC_F_LEN
-	default 0x2000
+	default 0x400
 
 config CMD_PINMON
 	bool "Enable boot mode pins monitor command"
Signature · 1 line
1.9.1
#2 lore raw

PATCH v5 1/4 ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value

Quoted 6 lines · Masahiro Yamada

It is true that malloc is necessary for Driver Model before relocation, but there is no good reason to reserve the malloc space more than enough. The default value 0x400 works well.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150224/0f285065/attachment.sig>
#3 lore raw

PATCH v5 2/4 kconfig: Adjust ordering so that defaults work as expected

In reply to Masahiro Yamada

From: Simon Glass <[email protected]>

At present defaults in arch-specific Kconfig files are ignored if the top-level item comes ahead of it in include order. This means that it is not possible to have a U-Boot default that architectures and boards can override. This does not seem very useful.

Move the include earlier to support this.

---

Changes in v5: None
Changes in v3:
- The same as what Simon posted
http://patchwork.ozlabs.org/patch/441670/
Included in this series to clarify the order

Changes in v2: None

 Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Kconfig +3 -2
index 75bab7f..823f1e2 100644
@@ -12,6 +12,9 @@ config KCONFIG_OBJDIR
 	string
 	option env="KCONFIG_OBJDIR"
 
+# Allow defaults in arch-specific code to override any given here
+source "arch/Kconfig"
+
 menu "General setup"
 
 config LOCALVERSION
@@ -172,8 +175,6 @@ config SYS_CLK_FREQ
 
 endmenu		# Boot images
 
-source "arch/Kconfig"
-
 source "common/Kconfig"
 
 source "dts/Kconfig"
Signature · 1 line
1.9.1
#4 lore raw

PATCH v5 2/4 kconfig: Adjust ordering so that defaults work as expected

Quoted 7 lines · Masahiro Yamada

From: Simon Glass <[email protected]>

At present defaults in arch-specific Kconfig files are ignored if the top-level item comes ahead of it in include order. This means that it is not possible to have a U-Boot default that architectures and boards can override. This does not seem very useful.

Quoted 5 lines

Move the include earlier to support this.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150224/4e0f8fc6/attachment.sig>
#5 lore raw

PATCH v5 3/4 kconfig: switch to single .config configuration

In reply to Masahiro Yamada

When Kconfig for U-boot was examined, one of the biggest issues was how to support multiple images (Normal, SPL, TPL). There were actually two options, "single .config" and "multiple .config". After some discussions and thought experiments, I chose the latter, i.e. to create ".config", "spl/.config", "tpl/.config" for Normal, SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the maximum flexibility and helped to avoid duplicating CONFIGs among Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images. If you change the configuration of Main image, you often have to adjust some SPL configurations correspondingly. Currently, we cannot handle the dependencies between them. It means one of the biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config". Sunxi guys started to work around this problem by creating a new configuration target. Commit cbdd9a9737cc (sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.) added "make *_felconfig" to enable CONFIG_SPL_FEL on both images. Changing the configuration of multiple images in one command is a generic demand. The current implementation cannot propose any good solution about this.

[3] Kconfig files are getting ugly and difficult to understand. Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be. To adjust Linux-originated Kconfig to U-Boot, the helper script "scripts/multiconfig.sh" was introduced. Writing a complicated text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better. With it, all the problems above would go away. Instead, we will have to add some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM, but we will not have much. Anyway, this is what we do now in scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the single .config configuration.

It is not so difficult to do that:

- Remove unnecessary processings from scripts/multiconfig.sh This file will remain for a while to support the current defconfig format. It will be removed after more cleanups are done.

- Adjust some makefiles and Kconfigs

- Add some entries to include/config_uncmd_spl.h and the new file scripts/Makefile.uncmd_spl. Some CONFIG options that are not supported on SPL must be disabled because one .config is shared between SPL and U-Boot proper going forward. I know this is not a beautiful solution and I think we can do better, but let's see how much we will have to describe them.

- update doc/README.kconfig

More cleaning up patches will follow this.

---

Changes in v5: None
Changes in v3: None
Changes in v2:
- Fix typos in commit description

 Kconfig                             |  14 --
 arch/arm/cpu/armv7/uniphier/Kconfig |   1 -
 arch/arm/mach-tegra/Kconfig         |   2 +-
 config.mk                           |   5 +
 configs/ph1_ld4_defconfig           |   2 +-
 configs/ph1_pro4_defconfig          |   2 +-
 configs/ph1_sld8_defconfig          |   2 +-
 doc/README.kconfig                  | 132 +++++-------------
 drivers/mtd/nand/Kconfig            |   2 +-
 include/config_uncmd_spl.h          |   9 ++
 scripts/Makefile.autoconf           |  36 +++--
 scripts/Makefile.build              |   3 +-
 scripts/Makefile.spl                |  10 +-
 scripts/Makefile.uncmd_spl          |  16 +++
 scripts/multiconfig.sh              | 261 +-----------------------------------
 15 files changed, 108 insertions(+), 389 deletions(-)
 create mode 100644 scripts/Makefile.uncmd_spl
Kconfig +0 -14
index 823f1e2..bb9b5c2 100644
@@ -8,10 +8,6 @@ config UBOOTVERSION
 	string
 	option env="UBOOTVERSION"
 
-config KCONFIG_OBJDIR
-	string
-	option env="KCONFIG_OBJDIR"
-
 # Allow defaults in arch-specific code to override any given here
 source "arch/Kconfig"
 
@@ -90,16 +86,6 @@ endmenu		# General setup
 
 menu "Boot images"
 
-config SPL_BUILD
-	bool
-	depends on $KCONFIG_OBJDIR="spl" || $KCONFIG_OBJDIR="tpl"
-	default y
-
-config TPL_BUILD
-	bool
-	depends on $KCONFIG_OBJDIR="tpl"
-	default y
-
 config SUPPORT_SPL
 	bool
 
arch/arm/cpu/armv7/uniphier/Kconfig +0 -1
index 8fdef28..9bbc011 100644
@@ -71,7 +71,6 @@ config CMD_DDRPHY_DUMP
 
 choice
 	prompt "DDR3 Frequency select"
-	depends on SPL_BUILD
 
 config DDR_FREQ_1600
 	bool "DDR3 1600"
arch/arm/mach-tegra/Kconfig +1 -1
index 3a8e2b1..8569167 100644
@@ -24,7 +24,7 @@ config SYS_MALLOC_F_LEN
 	default 0x1800
 
 config USE_PRIVATE_LIBGCC
-	default y if SPL_BUILD
+	default y
 
 config DM
 	default y if !SPL_BUILD
config.mk +5 -0
index 64c2951..6282919 100644
@@ -24,6 +24,11 @@ VENDOR :=
 
 ARCH := $(CONFIG_SYS_ARCH:"%"=%)
 CPU := $(CONFIG_SYS_CPU:"%"=%)
+ifdef CONFIG_SPL_BUILD
+ifdef CONFIG_TEGRA
+CPU := arm720t
+endif
+endif
 BOARD := $(CONFIG_SYS_BOARD:"%"=%)
 ifneq ($(CONFIG_SYS_VENDOR),)
 VENDOR := $(CONFIG_SYS_VENDOR:"%"=%)
configs/ph1_ld4_defconfig +1 -1
index 86b4b15..fa8d291 100644
@@ -39,4 +39,4 @@ CONFIG_DM_I2C=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-S:CONFIG_SPL_NAND_DENALI=y
+CONFIG_SPL_NAND_DENALI=y
configs/ph1_pro4_defconfig +1 -1
index 242bcf9..12f0694 100644
@@ -39,4 +39,4 @@ CONFIG_DM_I2C=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-S:CONFIG_SPL_NAND_DENALI=y
+CONFIG_SPL_NAND_DENALI=y
configs/ph1_sld8_defconfig +1 -1
index 8e95f17..e66d166 100644
@@ -39,4 +39,4 @@ CONFIG_DM_I2C=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
-S:CONFIG_SPL_NAND_DENALI=y
+CONFIG_SPL_NAND_DENALI=y
doc/README.kconfig +32 -100

163 lines not on this page · raw message

drivers/mtd/nand/Kconfig +1 -1
index c242214..ccd8211 100644
@@ -36,7 +36,7 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
 
 endif
 
-if SPL_BUILD
+if SPL
 
 config SPL_NAND_DENALI
 	bool "Support Denali NAND controller for SPL"
include/config_uncmd_spl.h +9 -0
index 9cb7a9a..9f0fe44 100644
@@ -20,5 +20,14 @@
 #undef CONFIG_CMD_SNTP
 #undef CONFIG_CMD_TFTPPUT
 #undef CONFIG_CMD_TFTPSRV
+#undef CONFIG_OF_CONTROL
+
+#ifndef CONFIG_SPL_DM
+#undef CONFIG_DM_SERIAL
+#undef CONFIG_DM_GPIO
+#undef CONFIG_DM_I2C
+#undef CONFIG_DM_SPI
+#endif
+
 #endif /* CONFIG_SPL_BUILD */
 #endif /* __CONFIG_UNCMD_SPL_H__ */
scripts/Makefile.autoconf +26 -10
index 58e1642..f054081 100644
@@ -7,9 +7,17 @@
 # (= When we move all CONFIGs from header files to Kconfig)
 # this makefile can be deleted.
 
-# obj is "include" or "spl/include" or "tpl/include"
-# for non-SPL, SPL, TPL, respectively
-include $(obj)/config/auto.conf
+__all: include/autoconf.mk include/autoconf.mk.dep
+
+ifeq ($(shell grep -q '^CONFIG_SPL=y' include/config/auto.conf 2>/dev/null && echo y),y)
+__all: spl/include/autoconf.mk
+endif
+
+ifeq ($(shell grep -q '^CONFIG_TPL=y' include/config/auto.conf 2>/dev/null && echo y),y)
+__all: tpl/include/autoconf.mk
+endif
+
+include include/config/auto.conf
 
 include scripts/Kbuild.include
 
@@ -22,7 +30,6 @@ CPP		= $(CC) -E
 include config.mk
 
 UBOOTINCLUDE    := \
-		-I$(obj) \
 		-Iinclude \
 		$(if $(KBUILD_SRC), -I$(srctree)/include) \
 		-I$(srctree)/arch/$(ARCH)/include \
@@ -48,10 +55,10 @@ include/autoconf.mk.dep: FORCE
 # same CONFIG macros
 quiet_cmd_autoconf = GEN     $@
       cmd_autoconf = \
-	$(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > [email protected] && {	\
+	$(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > [email protected] && { \
 		sed -n -f $(srctree)/tools/scripts/define2mk.sed [email protected] |		\
 		while read line; do							\
-			if ! grep -q "$${line%=*}=" $(obj)/config/auto.conf; then	\
+			if ! grep -q "$${line%=*}=" include/config/auto.conf; then	\
 				echo "$$line";						\
 			fi								\
 		done > $@;								\
@@ -60,10 +67,19 @@ quiet_cmd_autoconf = GEN     $@
 		rm [email protected]; false;							\
 	}
 
-$(obj)/autoconf.mk: FORCE
+include/autoconf.mk: FORCE
 	$(call cmd,autoconf)
 
-include/autoconf.mk include/autoconf.mk.dep: include/config.h
+spl/include/autoconf.mk: FORCE
+	$(Q)mkdir -p $(dir $@)
+	$(call cmd,autoconf,-DCONFIG_SPL_BUILD)
+
+tpl/include/autoconf.mk: FORCE
+	$(Q)mkdir -p $(dir $@)
+	$(call cmd,autoconf,-DCONFIG_SPL_BUILD -DCONFIG_TPL_BUILD)
+
+include/autoconf.mk include/autoconf.mk.dep \
+	spl/include/autoconf.mk tpl/include/autoconf.mk: include/config.h
 
 # include/config.h
 # Prior to Kconfig, it was generated by mkconfig. Now it is created here.
@@ -75,10 +91,10 @@ define filechk_config_h
 	done;								\
 	echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
 	echo \#include \<config_defaults.h\>;				\
+	echo \#include \<config_uncmd_spl.h\>;				\
 	echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>;		\
 	echo \#include \<asm/config.h\>;				\
-	echo \#include \<config_fallbacks.h\>;				\
-	echo \#include \<config_uncmd_spl.h\>; )
+	echo \#include \<config_fallbacks.h\>;)
 endef
 
 include/config.h: scripts/Makefile.autoconf create_symlink FORCE
scripts/Makefile.build +2 -1
index 14cf092..ac0554e 100644
@@ -41,8 +41,9 @@ subdir-ccflags-y :=
 
 # Read auto.conf if it exists, otherwise ignore
 # Modified for U-Boot
--include $(prefix)/include/config/auto.conf
+-include include/config/auto.conf
 -include $(prefix)/include/autoconf.mk
+include scripts/Makefile.uncmd_spl
 
 include scripts/Kbuild.include
 
scripts/Makefile.spl +6 -4
index cc189ad..fcacb7f 100644
@@ -21,13 +21,15 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
 
 include $(srctree)/scripts/Kbuild.include
 
-UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE)
-
--include $(obj)/include/config/auto.conf
+-include include/config/auto.conf
 -include $(obj)/include/autoconf.mk
 
+KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD
+ifeq ($(CONFIG_TPL_BUILD),y)
+KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD
+endif
+
 ifeq ($(CONFIG_TPL_BUILD),y)
-export CONFIG_TPL_BUILD
 SPL_BIN := u-boot-tpl
 else
 SPL_BIN := u-boot-spl
scripts/Makefile.uncmd_spl new file +16 -0
new file mode 100644
index 0000000..86c938e
@@ -0,0 +1,16 @@
+# Makefile version of include/config_uncmd_spl.h
+#
+# TODO: Invent a better way
+
+ifdef CONFIG_SPL_BUILD
+CONFIG_OF_CONTROL=
+
+ifndef CONFIG_SPL_DM
+CONFIG_DM_SERIAL=
+CONFIG_DM_GPIO=
+CONIFG_DM_I2C=
+CONFIG_DM_SPI=
+CONFIG_DM_SPI_FLASH=
+endif
+
+endif
scripts/multiconfig.sh +7 -254

330 lines not on this page · raw message

Signature · 1 line
1.9.1
#6 lore raw

PATCH v5 3/4 kconfig: switch to single .config configuration

Quoted 59 lines · Masahiro Yamada

When Kconfig for U-boot was examined, one of the biggest issues was how to support multiple images (Normal, SPL, TPL). There were actually two options, "single .config" and "multiple .config". After some discussions and thought experiments, I chose the latter, i.e. to create ".config", "spl/.config", "tpl/.config" for Normal, SPL, TPL, respectively.

It is true that the "multiple .config" strategy provided us the maximum flexibility and helped to avoid duplicating CONFIGs among Normal, SPL, TPL, but I have noticed some fatal problems:

[1] It is impossible to share CONFIG options across the images. If you change the configuration of Main image, you often have to adjust some SPL configurations correspondingly. Currently, we cannot handle the dependencies between them. It means one of the biggest advantages of Kconfig is lost.

[2] It is too painful to change both ".config" and "spl/.config". Sunxi guys started to work around this problem by creating a new configuration target. Commit cbdd9a9737cc (sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.) added "make *_felconfig" to enable CONFIG_SPL_FEL on both images. Changing the configuration of multiple images in one command is a generic demand. The current implementation cannot propose any good solution about this.

[3] Kconfig files are getting ugly and difficult to understand. Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files.

[4] The build system got more complicated than it should be. To adjust Linux-originated Kconfig to U-Boot, the helper script "scripts/multiconfig.sh" was introduced. Writing a complicated text processor is a shell script sometimes caused problems.

Now I believe the "single .config" will serve us better. With it, all the problems above would go away. Instead, we will have to add some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM, but we will not have much. Anyway, this is what we do now in scripts/Makefile.spl.

I admit my mistake with my apology and this commit switches to the single .config configuration.

It is not so difficult to do that:

- Remove unnecessary processings from scripts/multiconfig.sh This file will remain for a while to support the current defconfig format. It will be removed after more cleanups are done.

- Adjust some makefiles and Kconfigs

- Add some entries to include/config_uncmd_spl.h and the new file scripts/Makefile.uncmd_spl. Some CONFIG options that are not supported on SPL must be disabled because one .config is shared between SPL and U-Boot proper going forward. I know this is not a beautiful solution and I think we can do better, but let's see how much we will have to describe them.

Quoted 6 lines

- update doc/README.kconfig

More cleaning up patches will follow this.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150224/6bb3bce8/attachment.sig>
#7 lore raw

PATCH v5 4/4 kconfig: remove unneeded dependency on !SPL_BUILD

In reply to Masahiro Yamada

Now CONFIG_SPL_BUILD is not defined in Kconfig, so "!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.

---

Changes in v5:
- Rebase on u-boot/master (commit ded4bc3a)

Changes in v3: None
Changes in v2:
- Fix a typo in commit description

 Kconfig                              | 12 ++----------
 arch/arm/Kconfig                     |  7 +++----
 arch/arm/cpu/arm1176/bcm2835/Kconfig |  6 +++---
 arch/arm/cpu/armv7/exynos/Kconfig    | 28 ++++++++++++++--------------
 arch/arm/cpu/armv7/omap3/Kconfig     | 10 +++++-----
 arch/arm/cpu/armv7/s5pc1xx/Kconfig   |  4 ++--
 arch/arm/cpu/armv7/uniphier/Kconfig  |  1 -
 arch/arm/mach-tegra/Kconfig          | 12 ++++++------
 board/compulab/cm_t335/Kconfig       |  6 +++---
 board/gumstix/pepper/Kconfig         |  6 +++---
 board/isee/igep0033/Kconfig          |  6 +++---
 board/phytec/pcm051/Kconfig          |  6 +++---
 board/samsung/goni/Kconfig           |  6 +++---
 board/samsung/smdkc100/Kconfig       |  6 +++---
 board/silica/pengwyn/Kconfig         |  6 +++---
 board/ti/am335x/Kconfig              | 10 +++++-----
 common/Kconfig                       |  1 -
 drivers/core/Kconfig                 | 16 ++++++----------
 drivers/mtd/nand/Kconfig             |  4 ----
 dts/Kconfig                          |  1 -
 include/config_uncmd_spl.h           |  4 ++++
 scripts/Makefile.uncmd_spl           |  2 ++
 22 files changed, 73 insertions(+), 87 deletions(-)
Kconfig +2 -10
index bb9b5c2..d0318cc 100644
@@ -15,7 +15,6 @@ menu "General setup"
 
 config LOCALVERSION
 	string "Local version - append to U-Boot release"
-	depends on !SPL_BUILD
 	help
 	  Append an extra string to the end of your U-Boot version.
 	  This will show up on your boot log, for example.
@@ -26,7 +25,6 @@ config LOCALVERSION
 
 config LOCALVERSION_AUTO
 	bool "Automatically append version information to the version string"
-	depends on !SPL_BUILD
 	default y
 	help
 	  This will try to automatically determine if the current tree is a
@@ -47,7 +45,6 @@ config LOCALVERSION_AUTO
 
 config CC_OPTIMIZE_FOR_SIZE
 	bool "Optimize for size"
-	depends on !SPL_BUILD
 	default y
 	help
 	  Enabling this option will pass "-Os" instead of "-O2" to gcc
@@ -95,23 +92,19 @@ config SUPPORT_TPL
 config SPL
 	bool
 	depends on SUPPORT_SPL
-	prompt "Enable SPL" if !SPL_BUILD
-	default y if SPL_BUILD
+	prompt "Enable SPL"
 	help
 	  If you want to build SPL as well as the normal image, say Y.
 
 config TPL
 	bool
 	depends on SPL && SUPPORT_TPL
-	prompt "Enable TPL" if !SPL_BUILD
-	default y if TPL_BUILD
-	default n
+	prompt "Enable TPL"
 	help
 	  If you want to build TPL as well as the normal image and SPL, say Y.
 
 config FIT
 	bool "Support Flattened Image Tree"
-	depends on !SPL_BUILD
 	help
 	  This option allows to boot the new uImage structrure,
 	  Flattened Image Tree.  FIT is formally a FDT, which can include
@@ -135,7 +128,6 @@ config FIT_SIGNATURE
 
 config SYS_EXTRA_OPTIONS
 	string "Extra Options (DEPRECATED)"
-	depends on !SPL_BUILD
 	help
 	  The old configuration infrastructure (= mkconfig + boards.cfg)
 	  provided the extra options field. If you have something like
arch/arm/Kconfig +3 -4
index 820ba1c..3408319 100644
@@ -620,9 +620,8 @@ config TEGRA
 	bool "NVIDIA Tegra"
 	select SUPPORT_SPL
 	select SPL
-	select OF_CONTROL if !SPL_BUILD
-	select CPU_ARM720T if SPL_BUILD
-	select CPU_V7 if !SPL_BUILD
+	select OF_CONTROL
+	select CPU_V7
 
 config TARGET_VEXPRESS64_AEMV8A
 	bool "Support vexpress_aemv8a"
@@ -714,7 +713,7 @@ config ARCH_UNIPHIER
 	select CPU_V7
 	select SUPPORT_SPL
 	select SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 endchoice
 
arch/arm/cpu/arm1176/bcm2835/Kconfig +3 -3
index 162f973..73cc72b 100644
@@ -1,12 +1,12 @@
 if TARGET_RPI || TARGET_RPI_2
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 endif
arch/arm/cpu/armv7/exynos/Kconfig +14 -14
index 2064efa..eb86a7f 100644
@@ -6,7 +6,7 @@ choice
 config TARGET_SMDKV310
 	select SUPPORT_SPL
 	bool "Exynos4210 SMDKV310 board"
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_TRATS
 	bool "Exynos4210 Trats board"
@@ -33,32 +33,32 @@ config TARGET_ARNDALE
 	select CPU_V7_HAS_NONSEC
 	select CPU_V7_HAS_VIRT
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SMDK5250
 	bool "SMDK5250 board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SNOW
 	bool "Snow board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SMDK5420
 	bool "SMDK5420 board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_PEACH_PI
 	bool "Peach Pi board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_PEACH_PIT
 	bool "Peach Pit board"
 	select SUPPORT_SPL
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 endchoice
 
@@ -66,25 +66,25 @@ config SYS_SOC
 	default "exynos"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI_FLASH
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config SYS_MALLOC_F
-	default y if !SPL_BUILD
+	default y
 
 config SYS_MALLOC_F_LEN
-	default 0x400 if !SPL_BUILD
+	default 0x400
 
 source "board/samsung/smdkv310/Kconfig"
 source "board/samsung/trats/Kconfig"
arch/arm/cpu/armv7/omap3/Kconfig +5 -5
index 4644098..4a0ac2c 100644
@@ -94,19 +94,19 @@ config TARGET_TWISTER
 endchoice
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config DM_SERIAL
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_MALLOC_F
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_MALLOC_F_LEN
-	default 0x400 if DM && !SPL_BUILD
+	default 0x400 if DM
 
 config SYS_SOC
 	default "omap3"
arch/arm/cpu/armv7/s5pc1xx/Kconfig +2 -2
index 6288134..bc73813 100644
@@ -5,11 +5,11 @@ choice
 
 config TARGET_S5P_GONI
 	bool "S5P Goni board"
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 config TARGET_SMDKC100
 	bool "Support smdkc100 board"
-	select OF_CONTROL if !SPL_BUILD
+	select OF_CONTROL
 
 endchoice
 
arch/arm/cpu/armv7/uniphier/Kconfig +0 -1
index 9bbc011..8335685 100644
@@ -64,7 +64,6 @@ config CMD_PINMON
 
 config CMD_DDRPHY_DUMP
 	bool "Enable dump command of DDR PHY parameters"
-	depends on !SPL_BUILD
 	help
 	  The command "ddrphy" shows the resulting parameters of DDR PHY
 	  training; it is useful for the evaluation of DDR PHY training.
arch/arm/mach-tegra/Kconfig +6 -6
index 8569167..8615248 100644
@@ -27,22 +27,22 @@ config USE_PRIVATE_LIBGCC
 	default y
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI
-	default y if !SPL_BUILD
+	default y
 
 config DM_SPI_FLASH
-	default y if !SPL_BUILD
+	default y
 
 config DM_I2C
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 source "arch/arm/mach-tegra/tegra20/Kconfig"
 source "arch/arm/mach-tegra/tegra30/Kconfig"
board/compulab/cm_t335/Kconfig +3 -3
index aadbfbc..3a8f304 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "cm_t335"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/gumstix/pepper/Kconfig +3 -3
index 3099a9e..750db85 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "pepper"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/isee/igep0033/Kconfig +3 -3
index 2fe2ef1..9a8421e 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "am335x_igep0033"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/phytec/pcm051/Kconfig +3 -3
index 65094cf..bb98715 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "pcm051"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/samsung/goni/Kconfig +3 -3
index 2c5d3fc..006e864 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "s5p_goni"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/samsung/smdkc100/Kconfig +3 -3
index 996fe3c..ea87166 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "smdkc100"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/silica/pengwyn/Kconfig +3 -3
index 6ecda80..2e9a2b3 100644
@@ -13,12 +13,12 @@ config SYS_CONFIG_NAME
 	default "pengwyn"
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if !SPL_BUILD
+	default y
 
 config DM_SERIAL
-	default y if !SPL_BUILD
+	default y
 
 endif
board/ti/am335x/Kconfig +5 -5
index a20e0c1..722f9d5 100644
@@ -39,18 +39,18 @@ config NOR_BOOT
 	  NOR for environment.
 
 config DM
-	default y if !SPL_BUILD
+	default y
 
 config DM_GPIO
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config DM_SERIAL
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_MALLOC_F
-	default y if DM && !SPL_BUILD
+	default y if DM
 
 config SYS_MALLOC_F_LEN
-	default 0x400 if DM && !SPL_BUILD
+	default 0x400 if DM
 
 endif
common/Kconfig +0 -1
index 2ca002d..f82bc88 100644
@@ -1,5 +1,4 @@
 menu "Command line interface"
-	depends on !SPL_BUILD
 
 config HUSH_PARSER
 	bool "Use hush shell"
drivers/core/Kconfig +6 -10
index f0d6110..75d182d 100644
@@ -1,6 +1,5 @@
 config DM
 	bool "Enable Driver Model"
-	depends on !SPL_BUILD
 	help
 	  This config option enables Driver Model. This brings in the core
 	  support, including scanning of platform data on start-up. If
@@ -22,31 +21,28 @@ config SPL_DM
 
 config DM_WARN
 	bool "Enable warnings in driver model"
+	depends on DM
+	default y
 	help
 	  The dm_warn() function can use up quite a bit of space for its
 	  strings. By default this is disabled for SPL builds to save space.
 	  This will cause dm_warn() to be compiled out - it will do nothing
 	  when called.
-	depends on DM
-	default y if !SPL_BUILD
-	default n if SPL_BUILD
 
 config DM_DEVICE_REMOVE
 	bool "Support device removal"
+	depends on DM
+	default y
 	help
 	  We can save some code space by dropping support for removing a
 	  device. This is not normally required in SPL, so by default this
 	  option is disabled for SPL.
-	depends on DM
-	default y if !SPL_BUILD
-	default n if SPL_BUILD
 
 config DM_STDIO
 	bool "Support stdio registration"
+	depends on DM
+	default y
 	help
 	  Normally serial drivers register with stdio so that they can be used
 	  as normal output devices. In SPL we don't normally use stdio, so
 	  we can omit this feature.
-	depends on DM
-	default y if !SPL_BUILD
-	default n if SPL_BUILD
drivers/mtd/nand/Kconfig +0 -4
index ccd8211..72825c3 100644
@@ -6,8 +6,6 @@ config SYS_NAND_SELF_INIT
 	  This option, if enabled, provides more flexible and linux-like
 	  NAND initialization process.
 
-if !SPL_BUILD
-
 config NAND_DENALI
 	bool "Support Denali NAND controller"
 	select SYS_NAND_SELF_INIT
@@ -34,8 +32,6 @@ config NAND_DENALI_SPARE_AREA_SKIP_BYTES
 	  of OOB area before last ECC sector data starts.  This is potentially
 	  used to preserve the bad block marker in the OOB area.
 
-endif
-
 if SPL
 
 config SPL_NAND_DENALI
dts/Kconfig +0 -1
index 5fe63f8..ca5bd6f 100644
@@ -9,7 +9,6 @@ config SUPPORT_OF_CONTROL
 	bool
 
 menu "Device Tree Control"
-	depends on !SPL_BUILD
 	depends on SUPPORT_OF_CONTROL
 
 config OF_CONTROL
include/config_uncmd_spl.h +4 -0
index 9f0fe44..a9106f4 100644
@@ -29,5 +29,9 @@
 #undef CONFIG_DM_SPI
 #endif
 
+#undef CONFIG_DM_WARN
+#undef CONFIG_DM_DEVICE_REMOVE
+#undef CONFIG_DM_STDIO
+
 #endif /* CONFIG_SPL_BUILD */
 #endif /* __CONFIG_UNCMD_SPL_H__ */
scripts/Makefile.uncmd_spl +2 -0
index 86c938e..343c3fc 100644
@@ -13,4 +13,6 @@ CONFIG_DM_SPI=
 CONFIG_DM_SPI_FLASH=
 endif
 
+CONFIG_DM_DEVICE_REMOVE=
+
 endif
Signature · 1 line
1.9.1
#8 lore raw

PATCH v5 4/4 kconfig: remove unneeded dependency on !SPL_BUILD

Quoted 4 lines · Masahiro Yamada

Now CONFIG_SPL_BUILD is not defined in Kconfig, so "!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150224/0c3ad815/attachment.sig>