kconfig: do not use allnoconfig_y option
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 13 Mar 2021 19:48:34 +0000 (04:48 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 14 Apr 2021 06:22:49 +0000 (15:22 +0900)
allnoconfig_y is an ugly hack that sets a symbol to 'y' by allnoconfig.

allnoconfig does not mean a minimal set of CONFIG options because a
bunch of prompts are hidden by 'if EMBEDDED' or 'if EXPERT', but I do
not like to hack Kconfig this way.

Use the pre-existing feature, KCONFIG_ALLCONFIG, to provide a one
liner config fragment. CONFIG_EMBEDDED=y is still forced when
allnoconfig is invoked as a part of tinyconfig.

No change in the .config file produced by 'make tinyconfig'.

The output of 'make allnoconfig' will be changed; we will get
CONFIG_EMBEDDED=n because allnoconfig literally sets all symbols to n.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
init/Kconfig
kernel/configs/tiny-base.config [new file with mode: 0644]
scripts/kconfig/Makefile

index 8578c60..b5c6565 100644 (file)
@@ -1768,7 +1768,6 @@ config DEBUG_RSEQ
 
 config EMBEDDED
        bool "Embedded system"
-       option allnoconfig_y
        select EXPERT
        help
          This option should be enabled if compiling the kernel for
diff --git a/kernel/configs/tiny-base.config b/kernel/configs/tiny-base.config
new file mode 100644 (file)
index 0000000..2f0e6bf
--- /dev/null
@@ -0,0 +1 @@
+CONFIG_EMBEDDED=y
index 7df3c0e..46f2465 100644 (file)
@@ -102,7 +102,8 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c
 
 PHONY += tinyconfig
 tinyconfig:
-       $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
+       $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f $(srctree)/Makefile allnoconfig
+       $(Q)$(MAKE) -f $(srctree)/Makefile tiny.config
 
 # CHECK: -o cache_dir=<path> working?
 PHONY += testconfig