[wiki] misleading description of "make defconfig"

Hi,

In https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#diff_file , incremental config handling is suggested. This involves using scripts/diffconfig.sh to get diffs, which is a good piece of advice.

However, to apply a config diff, the instructions there are to concatenate and then call make defconfig, as though the latter somehow worked incrementally on the existing .config and "normalized" it.

But in truth, reading the official documentation for make defconfig e.g. in Documentation/admin-guide/README.rst, it turns out that this command is not incremental at all , and just overwrites or creates .config afresh:

     "make defconfig"   Create a ./.config file by using the default
                        symbol values from either arch/$ARCH/configs/defconfig
                        or arch/$ARCH/configs/${PLATFORM}_defconfig,
                        depending on the architecture.

As a consequence, the instructions in that page of the openwrt wiki are misleading. If the purpose is to "renormalize" a concatenation of .config files and diffs, one needs to use one of the truly incremental variants like make menuconfig or make oldconfig. And if minimization is sought, an additional make savedefconfig is a nice addition.

This perception is wrong.

Care to elaborate ? Do you maintain that make defconfig takes the current .config into account ?

You are disputing this, so did you put your theory to a test?

I know what my experiences and those of others have been, without having read the wiki in detail, it matches documentation - and predominantly expectation from upstream kconfig (~= what it should be).

no such file in Openwrt AFAIK. Maybe you are reading the kernel docs? make defconfig works differently there.

The procedure in the OpenWrt wiki works as described, and is a convenient way to maintain and apply a set of local config settings

1 Like

Aha. Indeed I'm referring to the kernel docs. I came across your Wiki by a web search, not a minute expecting that a Linux-based project could fork the behaviour of build tools in an incompatible manner. I stand corrected. However, I suspect many others could be misled by this silent divergence...

Indeed that file is slightly newer than OpenWrt, probably burry your war axe before mass laughs break out.

Not sure what dates you are considering ; what I'd like to find though is the point of divergence (in git history).

No divergence, independent discovery, you barking at the wrong tree.

Independent discovery, you mean there is no common DNA, and OpenWRT wrote from scratch its whole set of make targets without reusing Linux ones, just happening to use the same names with slightly different semantics ?