Search notes:

make defconfig

make defconfig creates a new configuration file (typically .config) with default values from arch/$SRCARCH/configs/defconfig or arch/$SRCARCH/configs/${PLATFORM}_defconfig, depending on the architecture.
The .config file is created by the makefile calling scripts/kconfig/conf with the --defconfig option.
$ git clone --depth 1 -b master https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ~/linux-defconfig-test
$ cd ~/linux-defconfig-test
$ ls -la .config
ls: cannot access '.config': No such file or directory
$ make V=1 defconfig
…
scripts/kconfig/conf  --defconfig=arch/x86/configs/x86_64_defconfig Kconfig
#
# configuration written to .config
#

Fix two incompatible options

The config symbols X86_32 and X86_64 cannot both be enabled because they're mutually exclusive. make defconfig detects and fixes this, which is demonstrated in the following.
Get the most recent Linux sources:
$ git clone --depth 1 -b master https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
$ cd linux
Enable the two incompatible config symbols:
$ scripts/config --enable X86_32
$ scripts/config --enable X86_64
Verify that both options are set in .config:
$ grep -P '^CONFIG_X86_(32|64)=' .config
CONFIG_X86_64=y
CONFIG_X86_32=y
Fix the incompatiblity:
$ make defconfig
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#
The wrong option X86_32 is now gone:
$ grep -P '^CONFIG_X86_(32|64)=' .config
CONFIG_X86_64=y

See also

The variable KBUILD_DEFCONFIG (defined in arch/$SRCARCH/Makefile).

Index