kconfig: turnaround into single .config
Subsystems (10)
v2 cover kconfig: turnaround into single .config
Masahiro Yamada (4):
ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F
kconfig: switch to single .config configuration
kconfig: remove unneeded dependency on !SPL_BUILD
Kconfig | 27 +--- arch/arm/Kconfig | 7 +- arch/arm/cpu/arm1176/bcm2835/Kconfig | 6 +- arch/arm/cpu/armv7/exynos/Kconfig | 29 ++-- arch/arm/cpu/armv7/omap3/Kconfig | 11 +- arch/arm/cpu/armv7/s5pc1xx/Kconfig | 4 +- arch/arm/cpu/armv7/tegra-common/Kconfig | 18 ++- arch/arm/cpu/armv7/uniphier/Kconfig | 5 - arch/x86/Kconfig | 4 +- board/amcc/canyonlands/Kconfig | 4 - 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 | 11 +- 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 +------------------------------- 33 files changed, 184 insertions(+), 492 deletions(-) create mode 100644 scripts/Makefile.uncmd_spl
Signature · 1 line
1.9.1
PATCH v2 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 v2: None
arch/arm/cpu/armv7/uniphier/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/uniphier/Kconfig +1 -1
@@ -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
PATCH v2 1/4 ARM: UniPhier: set CONFIG_SYS_MALLOC_F to the global default value
Quoted 11 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
0x400works well.Signed-off-by Masahiro Yamada <[email protected]>---
Changes in v2: None
arch/arm/cpu/armv7/uniphier/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH v2 2/4 malloc_f: fix broken .config caused by CONFIG_SYS_MALLOC_F
In reply to Masahiro YamadaSince commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig), the ".config" created by the configuration has been wrong.
For example, the following is a snippet of the ".config" generated by "make beaver_defconfig":
--------------->8-----------------
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_SYS_MALLOC_F is not set
CONFIG_SYS_MALLOC_F_LEN=0x1800
# CONFIG_EXPERT is not set
---------------8<-----------------
CONFIG_SYS_MALLOC_F_LEN is supposed to depend on CONFIG_SYS_MALLOC_F (see the top level Kconfig), but the ".config" above is not actually following that dependency.
This is caused by two mistakes of commit b724bd7d6349.
[1] Wrong default value of CONFIG_SYS_MALLOC_F CONFIG_SYS_MALLOC_F is a boolean option, but its default value is set to 0x400.
[2] Missing "if SYS_MALLOC_F" in the default setting in each Kconfig For example, arch/arm/cpu/armv7/tegra-common/Kconfig has the line "default 0x1800" for SYS_MALLOC_F_LEN. It must be described as "default 0x1800 if SYS_MALLOC_F" to follow the dependency.
Those two bugs together create such a broken ".config".
Unfortunately, even if we correct both [1] and [2], the value of CONFIG_SYS_MALLOC_F_LEN is not set as we expect.
The "default 0x1800 if SYS_MALLOC_F" would be simply ignored because the "default 0x400" in the top level Kconfig is parsed first.
Notice that if multiple default lines appear for the same CONFIG, the first one takes precedence.
So, this commit correct [1] and [2], also leaves some comments in arch/arm/cpu/armv7/tegra-common/Kconfig and arch/x86/Kconfig to notify not-working default values.
If you want to change the default value of CONFIG_SYS_MALLOC_F_LEN, the easiest way would be to specify it in each *_defconfig.
It is true that describing SoC-common default values in each Kconfig seems handy, but it often introduces nasty problems.
If you do not understand well how Kconfig works, as you see above, you could easily create a broken .config file.
The default value 0x400 is redundant for OMAP, Exynos, UniPhier, etc. They can be simply removed.
There are still redundant "CONFIG_SYS_MALLOC_F_LEN=0x400" in many defconfig files, but this commit is not touching them.
---
Changes in v2: None
Kconfig | 1 - arch/arm/cpu/armv7/exynos/Kconfig | 3 --- arch/arm/cpu/armv7/omap3/Kconfig | 3 --- arch/arm/cpu/armv7/tegra-common/Kconfig | 4 +++- arch/arm/cpu/armv7/uniphier/Kconfig | 3 --- arch/x86/Kconfig | 4 +++- board/amcc/canyonlands/Kconfig | 4 ---- board/ti/am335x/Kconfig | 3 --- 8 files changed, 6 insertions(+), 19 deletions(-)
Kconfig +0 -1
@@ -58,7 +58,6 @@ config CC_OPTIMIZE_FOR_SIZE config SYS_MALLOC_F bool "Enable malloc() pool before relocation" - default 0x400 help Before relocation memory is very limited on many platforms. Still, we can provide a small malloc() pool if needed. Driver model in
arch/arm/cpu/armv7/exynos/Kconfig +0 -3
@@ -83,9 +83,6 @@ config DM_GPIO config SYS_MALLOC_F default y if !SPL_BUILD -config SYS_MALLOC_F_LEN - default 0x400 if !SPL_BUILD - source "board/samsung/smdkv310/Kconfig" source "board/samsung/trats/Kconfig" source "board/samsung/universal_c210/Kconfig"
arch/arm/cpu/armv7/omap3/Kconfig +0 -3
@@ -105,9 +105,6 @@ config DM_SERIAL config SYS_MALLOC_F default y if DM && !SPL_BUILD -config SYS_MALLOC_F_LEN - default 0x400 if DM && !SPL_BUILD - config SYS_SOC default "omap3"
arch/arm/cpu/armv7/tegra-common/Kconfig +3 -1
@@ -20,8 +20,10 @@ endchoice config SYS_MALLOC_F default y +# This is meaningless. +# "default 0x400" in the top level Kconfig is used in stead. config SYS_MALLOC_F_LEN - default 0x1800 + default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC default y if SPL_BUILD
arch/arm/cpu/armv7/uniphier/Kconfig +0 -3
@@ -51,9 +51,6 @@ endchoice config SYS_MALLOC_F default y -config SYS_MALLOC_F_LEN - default 0x400 - config CMD_PINMON bool "Enable boot mode pins monitor command" default y
arch/x86/Kconfig +3 -1
@@ -79,8 +79,10 @@ config DM_SERIAL config SYS_MALLOC_F default y +# This is meaningless. +# "default 0x400" in the top level Kconfig is used in stead. config SYS_MALLOC_F_LEN - default 0x800 + default 0x800 if SYS_MALLOC_F config RAMBASE hex
board/amcc/canyonlands/Kconfig +0 -4
@@ -43,8 +43,4 @@ config SYS_MALLOC_F bool default y -config SYS_MALLOC_F_LEN - hex - default 0x400 - endif
board/ti/am335x/Kconfig +0 -3
@@ -50,7 +50,4 @@ config DM_SERIAL config SYS_MALLOC_F default y if DM && !SPL_BUILD -config SYS_MALLOC_F_LEN - default 0x400 if DM && !SPL_BUILD - endif
Signature · 1 line
1.9.1
PATCH v2 3/4 kconfig: switch to single .config configuration
In reply to Masahiro YamadaWhen 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 v2:
- Fix typos in commit description
Kconfig | 14 -- arch/arm/cpu/armv7/tegra-common/Kconfig | 2 +- arch/arm/cpu/armv7/uniphier/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/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
@@ -8,10 +8,6 @@ config UBOOTVERSION string option env="UBOOTVERSION" -config KCONFIG_OBJDIR - string - option env="KCONFIG_OBJDIR" - menu "General setup" config LOCALVERSION
@@ -86,16 +82,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/tegra-common/Kconfig +1 -1
@@ -26,7 +26,7 @@ config SYS_MALLOC_F_LEN default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC - default y if SPL_BUILD + default y config DM default y if !SPL_BUILD
arch/arm/cpu/armv7/uniphier/Kconfig +0 -1
@@ -68,7 +68,6 @@ config CMD_DDRPHY_DUMP choice prompt "DDR3 Frequency select" - depends on SPL_BUILD config DDR_FREQ_1600 bool "DDR3 1600"
config.mk +5 -0
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,16 @@ +# Makefile version of include/config_uncmd_spl.h +# +# 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
PATCH v2 3/4 kconfig: switch to single .config configuration
Quoted 68 lines · Masahiro Yamada
When
Kconfigfor 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
Kconfigis 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 enableCONFIG_SPL_FELon 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]
Kconfigfiles are getting ugly and difficult to understand. Commitb724bd7d6349(dm:Kconfig: MoveCONFIG_SYS_MALLOC_F_LENtoKconfig) has sprinkled "if !SPL_BUILD" over theKconfigfiles.[4] The build system got more complicated than it should be. To adjust Linux-originated
Kconfigto 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 inscripts/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.shThis 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.hand the new filescripts/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.
arch/arm/cpu/armv7/tegra-common/Kconfig +0
-0
arch/arm/cpu/armv7/tegra-common/Kconfig config SYS_MALLOC_F_LEN · line 32
Quoted 8 lines
arch/arm/cpu/armv7/tegra-common/Kconfig +1
-1@@ -26,7 +26,7 @@ config SYS_MALLOC_F_LEN default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC - default y if SPL_BUILD + default y config DM default y if !SPL_BUILD
I think the above patch demonstrates the problem very nicely; it changes the semantics from having CONFIG_USE_PRIVATE_LIBGCC enabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be. For example, how do we disabled MMC support in SPL? We have to introduce separate CONFIG_MMC and CONFIG_SPL_MMC don't we? That doesn't seem any better than having separate defconfig files for SPL/non-SPL, or using ifdefs in a single defconfig file. What happened to the ability of one defconfig file to include another, so options could be shared between the two?
PATCH v2 3/4 kconfig: switch to single .config configuration
Hi Stephen,
2015-02-20 6:13 GMT+09:00 Stephen Warren <[email protected]>:
Quoted 78 lines · Masahiro Yamada
Quoted 77 lines
When
Kconfigfor 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
Kconfigis 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 enableCONFIG_SPL_FELon 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]
Kconfigfiles are getting ugly and difficult to understand. Commitb724bd7d6349(dm:Kconfig: MoveCONFIG_SYS_MALLOC_F_LENtoKconfig) has sprinkled "if !SPL_BUILD" over theKconfigfiles.[4] The build system got more complicated than it should be. To adjust Linux-originated
Kconfigto 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 inscripts/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.shThis 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.hand the new filescripts/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.
arch/arm/cpu/armv7/tegra-common/Kconfig +1
-1@@ -26,7 +26,7 @@ config SYS_MALLOC_F_LEN default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC - default y if SPL_BUILD + default y
Quoted 9 lines
arch/arm/cpu/armv7/tegra-common/Kconfig config SYS_MALLOC_F_LEN · line 32
Quoted 2 lines
arch/arm/cpu/armv7/tegra-common/Kconfig +0
-0config DM default y if !SPL_BUILDI think the above patch demonstrates the problem very nicely; it changes the semantics from having
CONFIG_USE_PRIVATE_LIBGCCenabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be.
Right. This is the disadvantage of the single .config strategy. That's why I chose separate .config at first.
Quoted 2 lines
For example, how do we disabled MMC support in SPL?
We have to introduce separateCONFIG_MMCandCONFIG_SPL_MMCdon't we?
Yes, I expect this.
We already haveCONFIG_SPL_MTD_SUPPORTCONFIG_SPL_NAND_SUPPORTCONFIG_SPL_NET_SUPPORTCONFIG_SPL_USB_HOST_SUPPORT
etc.
Quoted 4 lines
That doesn't seem any better than having separate defconfig files for SPL/non-SPL, or using ifdefs in a single defconfig file. What happened to the ability of one defconfig file to include another, so options could be shared between the two?
What you are saying is right, but
we are suffering from various problems that are ascribed to the multi .config way.
I cannot suggest any solution but the single .config.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH v2 3/4 kconfig: switch to single .config configuration
Quoted 11 lines · Masahiro YAMADA
2015-02-20 6:13 GMT+09:00 Stephen Warren <[email protected]>:
Quoted 7 lines · Masahiro Yamada
I think the above patch demonstrates the problem very nicely; it changes the semantics from having
CONFIG_USE_PRIVATE_LIBGCCenabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be.Right. This is the disadvantage of the single .config strategy. That's why I chose separate .config at first.
Just a random thought, maybe it's unworkable, but...
Would it be possible to retain the 2x .config schema but only ever require the user to edit the top level one? For example by having every fooconfig target do something like:
run fooconfig on top level .config as normal ( echo CONFIG_SPL_BUILD=y ; cat .config ) > spl/.config make -C spl <some-sort-of-forced-update>
IOW whenever the user changes .config it is automatically propagated to the spl (or tpl) .config, so we have 2x .config but one of them is non-user-serviceable.
That falls apart for "vi .config" though, so perhaps the echo+cat +forced-update would be better done as part of the recursion into spl/tpl at build time.
Ian.
PATCH v2 3/4 kconfig: switch to single .config configuration
Hi Ian,
Quoted 23 lines · On Sat, 21 Feb 2015 10:38:26 +0000 Ian Campbell <[email protected]> wrote:
Quoted 11 lines · Masahiro YAMADA
2015-02-20 6:13 GMT+09:00 Stephen Warren <[email protected]>:
Quoted 7 lines · Masahiro Yamada
I think the above patch demonstrates the problem very nicely; it changes the semantics from having
CONFIG_USE_PRIVATE_LIBGCCenabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be.Right. This is the disadvantage of the single .config strategy. That's why I chose separate .config at first.
Just a random thought, maybe it's unworkable, but...
Would it be possible to retain the 2x .config schema but only ever require the user to edit the top level one? For example by having every fooconfig target do something like:
run fooconfig on top level .config as normal ( echo
CONFIG_SPL_BUILD=y; cat .config ) > spl/.config make -C spl <some-sort-of-forced-update>
Quoted 7 lines
IOW whenever the user changes .config it is automatically propagated to the spl (or tpl) .config, so we have 2x .config but one of them is non-user-serviceable.
That falls apart for "vi .config" though, so perhaps the echo+cat +forced-update would be better done as part of the recursion into spl/tpl at build time.
Thanks for your comments.
Actually, I posted a similar idea before:
http://lists.denx.de/pipermail/u-boot/2014-May/180357.html
This series adopted
the single editable .config + forcible-update for SPL/TPL as you suggested.
As for boolean options, it can enable or disable particular options for SPL/TPL. But it cannot set hex or int type options independently.
So, I think we still have CONFIG_SYS_TEXT_BASE, CONFIG_SPL_TEXT_BASE, CONFIG_TPL_TEXT_BASE for example.
I do not think this way has significant advantages against the pure single .config strategy.
Best Regards
Masahiro Yamada
PATCH v2 3/4 kconfig: switch to single .config configuration
In reply to Stephen WarrenHi Stephen,
Quoted 78 lines · Stephen Warren
Quoted 77 lines · Masahiro Yamada
When
Kconfigfor 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
Kconfigis 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 enableCONFIG_SPL_FELon 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]
Kconfigfiles are getting ugly and difficult to understand. Commitb724bd7d6349(dm:Kconfig: MoveCONFIG_SYS_MALLOC_F_LENtoKconfig) has sprinkled "if !SPL_BUILD" over theKconfigfiles.[4] The build system got more complicated than it should be. To adjust Linux-originated
Kconfigto 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 inscripts/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.shThis 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.hand the new filescripts/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.
arch/arm/cpu/armv7/tegra-common/Kconfig +1
-1@@ -26,7 +26,7 @@ config SYS_MALLOC_F_LEN default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC - default y if SPL_BUILD + default y
Quoted 14 lines
arch/arm/cpu/armv7/tegra-common/Kconfig config SYS_MALLOC_F_LEN · line 32
Quoted 2 lines
arch/arm/cpu/armv7/tegra-common/Kconfig +0
-0config DM default y if !SPL_BUILDI think the above patch demonstrates the problem very nicely; it changes the semantics from having
CONFIG_USE_PRIVATE_LIBGCCenabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be. For example, how do we disabled MMC support in SPL? We have to introduce separateCONFIG_MMCandCONFIG_SPL_MMCdon't we? That doesn't seem any better than having separate defconfig files for SPL/non-SPL, or using ifdefs in a single defconfig file. What happened to the ability of one defconfig file to include another, so options could be shared between the two?
We use separate options for normal and SPL now. Currently we have CONFIG_SPL_MMC_SUPPORT. So it already works this way.
If we can move to a world where SPL and U-Boot are more similar that will be good.
What I don't understand about this change is why we cannot have 'default y if SPL_BUILD' in a rule if we want to. It seems like that would be useful.
Regards,
Simon
PATCH v2 3/4 kconfig: switch to single .config configuration
Hi Simon,
2015-02-21 4:20 GMT+09:00 Simon Glass <[email protected]>:
Quoted 99 lines
Hi Stephen,
Quoted 78 lines · Stephen Warren
Quoted 77 lines · Masahiro Yamada
When
Kconfigfor 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
Kconfigis 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 enableCONFIG_SPL_FELon 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]
Kconfigfiles are getting ugly and difficult to understand. Commitb724bd7d6349(dm:Kconfig: MoveCONFIG_SYS_MALLOC_F_LENtoKconfig) has sprinkled "if !SPL_BUILD" over theKconfigfiles.[4] The build system got more complicated than it should be. To adjust Linux-originated
Kconfigto 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 inscripts/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.shThis 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.hand the new filescripts/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.
arch/arm/cpu/armv7/tegra-common/Kconfig +1
-1@@ -26,7 +26,7 @@ config SYS_MALLOC_F_LEN default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC - default y if SPL_BUILD + default yQuoted 14 lines
arch/arm/cpu/armv7/tegra-common/Kconfig config SYS_MALLOC_F_LEN · line 32
Quoted 2 lines
arch/arm/cpu/armv7/tegra-common/Kconfig +0
-0config DM default y if !SPL_BUILDI think the above patch demonstrates the problem very nicely; it changes the semantics from having
CONFIG_USE_PRIVATE_LIBGCCenabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be. For example, how do we disabled MMC support in SPL? We have to introduce separateCONFIG_MMCandCONFIG_SPL_MMCdon't we? That doesn't seem any better than having separate defconfig files for SPL/non-SPL, or using ifdefs in a single defconfig file. What happened to the ability of one defconfig file to include another, so options could be shared between the two?We use separate options for normal and SPL now. Currently we have
CONFIG_SPL_MMC_SUPPORT. So it already works this way.
Quoted 6 lines
If we can move to a world where SPL and U-Boot are more similar that will be good.
What I don't understand about this change is why we cannot have 'default y if
SPL_BUILD' in a rule if we want to. It seems like that would be useful.
CONFIG_SPL_BUILD is not defined in Kconfig any more, i.e. we can not use the "if SPL_BUILD" conditonal.
It is given when descending into the spl directory, like the pre-kconfig build.
Here in scripts/Makefile.spl
-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
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH v2 3/4 kconfig: switch to single .config configuration
Hi Masahiro,
Quoted 121 lines · Masahiro YAMADA
Hi Simon,
2015-02-21 4:20 GMT+09:00 Simon Glass <[email protected]>:
Quoted 99 lines
Hi Stephen,
Quoted 78 lines · Stephen Warren
Quoted 77 lines · Masahiro Yamada
When
Kconfigfor 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
Kconfigis 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 enableCONFIG_SPL_FELon 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]
Kconfigfiles are getting ugly and difficult to understand. Commitb724bd7d6349(dm:Kconfig: MoveCONFIG_SYS_MALLOC_F_LENtoKconfig) has sprinkled "if !SPL_BUILD" over theKconfigfiles.[4] The build system got more complicated than it should be. To adjust Linux-originated
Kconfigto 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 inscripts/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.shThis 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.hand the new filescripts/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.
arch/arm/cpu/armv7/tegra-common/Kconfig +1
-1@@ -26,7 +26,7 @@ config SYS_MALLOC_F_LEN default 0x1800 if SYS_MALLOC_F config USE_PRIVATE_LIBGCC - default y if SPL_BUILD + default yQuoted 14 lines
arch/arm/cpu/armv7/tegra-common/Kconfig config SYS_MALLOC_F_LEN · line 32
Quoted 2 lines
arch/arm/cpu/armv7/tegra-common/Kconfig +0
-0config DM default y if !SPL_BUILDI think the above patch demonstrates the problem very nicely; it changes the semantics from having
CONFIG_USE_PRIVATE_LIBGCCenabled only in SPL build to having it enabled everywhere. While that particular change shouldn't be an issue, I think that requiring that all config options to have the same value in main/SPL/TPL will be. For example, how do we disabled MMC support in SPL? We have to introduce separateCONFIG_MMCandCONFIG_SPL_MMCdon't we? That doesn't seem any better than having separate defconfig files for SPL/non-SPL, or using ifdefs in a single defconfig file. What happened to the ability of one defconfig file to include another, so options could be shared between the two?We use separate options for normal and SPL now. Currently we have
CONFIG_SPL_MMC_SUPPORT. So it already works this way.Quoted 6 lines
If we can move to a world where SPL and U-Boot are more similar that will be good.
What I don't understand about this change is why we cannot have 'default y if
SPL_BUILD' in a rule if we want to. It seems like that would be useful.
CONFIG_SPL_BUILDis not defined inKconfigany more, i.e. we can not use the "ifSPL_BUILD" conditonal.It is given when descending into the spl directory, like the pre-kconfig build.
Here in
scripts/Makefile.spl(quoted diff) +0
-2-include include/config/auto.conf -include $(obj)/include/autoconf.mk
Quoted 4 lines
KBUILD_CPPFLAGS+= -DCONFIG_SPL_BUILD
ifeq ($(CONFIG_TPL_BUILD),y)KBUILD_CPPFLAGS+= -DCONFIG_TPL_BUILD
endif
Thanks for explaining this.
Regards,
Simon
PATCH v2 4/4 kconfig: remove unneeded dependency on !SPL_BUILD
In reply to Masahiro YamadaNow CONFIG_SPL_BUILD is not defined in Kconfig, so "!depends on SPL_BUILD" and "if !SPL_BUILD" are redundant.
---
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 | 26 +++++++++++++------------- arch/arm/cpu/armv7/omap3/Kconfig | 8 ++++---- arch/arm/cpu/armv7/s5pc1xx/Kconfig | 4 ++-- arch/arm/cpu/armv7/tegra-common/Kconfig | 12 ++++++------ arch/arm/cpu/armv7/uniphier/Kconfig | 1 - 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 | 8 ++++---- 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 | 4 +++- 22 files changed, 71 insertions(+), 85 deletions(-)
Kconfig +2 -10
@@ -12,7 +12,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.
@@ -23,7 +22,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
@@ -44,7 +42,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
@@ -91,23 +88,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
@@ -131,7 +124,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
@@ -739,9 +739,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"
@@ -833,7 +832,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
@@ -1,12 +1,12 @@ if TARGET_RPI 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 +13 -13
@@ -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,22 +66,22 @@ 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 source "board/samsung/smdkv310/Kconfig" source "board/samsung/trats/Kconfig"
arch/arm/cpu/armv7/omap3/Kconfig +4 -4
@@ -94,16 +94,16 @@ 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_SOC default "omap3"
arch/arm/cpu/armv7/s5pc1xx/Kconfig +2 -2
@@ -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/tegra-common/Kconfig +6 -6
@@ -29,22 +29,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/cpu/armv7/tegra20/Kconfig" source "arch/arm/cpu/armv7/tegra30/Kconfig"
arch/arm/cpu/armv7/uniphier/Kconfig +0 -1
@@ -61,7 +61,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.
board/compulab/cm_t335/Kconfig +3 -3
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 +4 -4
@@ -39,15 +39,15 @@ 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 endif
common/Kconfig +0 -1
@@ -1,5 +1,4 @@ menu "Command line interface" - depends on !SPL_BUILD config HUSH_PARSER bool "Use hush shell"
drivers/core/Kconfig +6 -10
@@ -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
@@ -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
@@ -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
@@ -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 +3 -1
@@ -1,6 +1,6 @@ # Makefile version of include/config_uncmd_spl.h # -# Invent a better way +# TODO: Invent a better way ifdef CONFIG_SPL_BUILD CONFIG_OF_CONTROL=
@@ -13,4 +13,6 @@ CONFIG_DM_SPI= CONFIG_DM_SPI_FLASH= endif +CONFIG_DM_DEVICE_REMOVE= + endif
Signature · 1 line
1.9.1