Skip to content

Commit

Permalink
kconfig: do not use allnoconfig_y option
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
masahir0y committed Apr 14, 2021
1 parent dd46599 commit f8f0d06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions kernel/configs/tiny-base.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_EMBEDDED=y
3 changes: 2 additions & 1 deletion scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8f0d06

Please sign in to comment.