kconfig: add KCONFIG_ALLCONFIG support for tinyconfig
PATCH v2 1/1 kconfig: add KCONFIG_ALLCONFIG support for tinyconfig
Since f8f0d06438e5, tinyconfig overrides KCONFIG_ALLCONFIG to include kernel/configs/tiny-base.config. However, this ignores user's preset if defined.
This modification checks if the user has set KCONFIG_ALLCONFIG and if so, concatenates it with kernel/configs/tiny-base.config to be used as preset config symbols.
Changes in v2:
- Remove <(echo) in the cat command as it is not portable
- Add $(srctree) in presets' path to make it compatible with O=<dir>
--- scripts/kconfig/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
scripts/kconfig/Makefile +6 -0
@@ -102,7 +102,13 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c PHONY += tinyconfig tinyconfig: +ifeq ($(KCONFIG_ALLCONFIG),) $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f $(srctree)/Makefile allnoconfig +else + $(Q)cat $(srctree)/$(KCONFIG_ALLCONFIG) $(srctree)/kernel/configs/tiny-base.config > $(srctree)/.tmp.config + $(Q)KCONFIG_ALLCONFIG=$(srctree)/.tmp.config $(MAKE) -f $(srctree)/Makefile allnoconfig + $(Q)rm -f $(srctree)/.tmp.config +endif $(Q)$(MAKE) -f $(srctree)/Makefile tiny.config # CHECK: -o cache_dir=<path> working?
Signature · 1 line
2.34.1
Quoted 23 lines · Randrianaina Georges Aaron
Since
f8f0d06438e5, tinyconfig overridesKCONFIG_ALLCONFIGto includekernel/configs/tiny-base.config. However, this ignores user's preset if defined.This modification checks if the user has set
KCONFIG_ALLCONFIGand if so, concatenates it withkernel/configs/tiny-base.configto be used as preset config symbols.Changes in v2:
- Remove<(echo)in the cat command as it is not portable
- Add $(srctree) in presets' path to make it compatible with O=<dir>Signed-off-by Randrianaina Georges Aaron <[email protected]>--- scripts/kconfig/Makefile | 6 ++++++ 1 file changed, 6 insertions(+)scripts/kconfig/Makefile +0
-0
scripts/kconfig/Makefile configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c · line 108
Quoted 7 lines
scripts/kconfig/Makefile +3
-0@@ -102,7 +102,13 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c PHONY += tinyconfig tinyconfig: +ifeq ($(KCONFIG_ALLCONFIG),) $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f $(srctree)/Makefile allnoconfig +else + $(Q)cat $(srctree)/$(KCONFIG_ALLCONFIG) $(srctree)/kernel/configs/tiny-base.config > $(srctree)/.tmp.config
No. Please remove $(srctree)/ from .tmp.config
You should never ever write anything to $(srctree) when O= is given.
$(srctree)/$(KCONFIG_ALLCONFIG) does not work well. It works only when KCONFIG_ALLCOFIG is relative to $(srctree). It does not work if it is absolute for example.
Quoted 8 lines
scripts/kconfig/Makefile +3
-1+ $(Q)KCONFIG_ALLCONFIG=$(srctree)/.tmp.config $(MAKE) -f $(srctree)/Makefile allnoconfig + $(Q)rm -f $(srctree)/.tmp.config +endif $(Q)$(MAKE) -f $(srctree)/Makefile tiny.config # CHECK: -o cache_dir=<path> working? --2.34.1
Signature · 2 lines
Best Regards Masahiro Yamada