Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* make olddefconfig surprises
@ 2026-01-23 18:21 Song Liu
  2026-01-23 20:53 ` Nathan Chancellor
  0 siblings, 1 reply; 9+ messages in thread
From: Song Liu @ 2026-01-23 18:21 UTC (permalink / raw)
  To: linux-kbuild, Nathan Chancellor, Nicolas Schier

Hi,

I was surprised by "make olddefconfig". Reporting here in case this is
something worth fixing/changing.

Here is what I see:

With make defconfig, CONFIG_DEVTMPFS is enabled:

$ make defconfig
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
$ grep CONFIG_DEVTMPFS .config
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_DEVTMPFS_SAFE is not set

But with make olddefconfig and an empty .config file,
CONFIG_DEVTMPFS is disabled:

$ echo > .config
$ make olddefconfig
#
# configuration written to .config
#
$ grep CONFIG_DEVTMPFS .config
# CONFIG_DEVTMPFS is not set

In the meanwhile, CONFIG_DEVTMPFS is enabled in my /proc/config.gz
and /boot/config*

I checked with a few folks. They were also surprised by this.

I think the logic of "make olddefconfig" is: With a .config, olddefconfig will
not look at other defaults (x86_64_defconfig, /proc/config.gz, /boot/config*,
etc.). Instead, olddefconfig only follows Kconfig files. If a config doesn't
have "default=y" in Kconfig files, it will be disabled.

This is confusing to users. For example, selftests users often have
a config file in "tools/testing/selftests/*/config" showing which configs are
needed for the tests to pass. The expectation is: default config with these
changes will work. However, this is actually not the case. Many of these
config files actually have "CONFIG_DEVTMPFS=y" to make it work.

So, the question is, shall we change the behavior of olddefconfig so
that it still honors defaults in x86_64_defconfig?

Thanks,
Song

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-01-26 19:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 18:21 make olddefconfig surprises Song Liu
2026-01-23 20:53 ` Nathan Chancellor
2026-01-23 22:54   ` Song Liu
2026-01-23 23:44     ` Nathan Chancellor
2026-01-23 23:57       ` Song Liu
2026-01-24 19:36         ` Nicolas Schier
2026-01-26 17:17           ` Song Liu
2026-01-26 17:52             ` Randy Dunlap
2026-01-26 19:15               ` Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox