mirror of
https://github.com/torvalds/linux
synced 2024-10-15 15:59:15 +00:00
kconfig: use /boot/config-* etc. as DEFCONFIG_LIST only for native build
When the .config file is missing, 'make config', 'make menuconfig', etc. uses a file listed in DEFCONFIG_LIST, if found, as base configuration. Ususally, /boot/config-$(uname -r) exists, and is used as default. However, when you are cross-compiling the kernel, it does not make sense to use /boot/config-* on the build host. It should default to arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). UML previously did not use DEFCONFIG_LIST at all, but it should be able to use arch/um/configs/$(KBUILD_DEFCONFIG) as a base config file. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
5ee5465940
commit
f02aa48dde
5
Makefile
5
Makefile
|
@ -393,6 +393,11 @@ ifeq ($(ARCH),sh64)
|
||||||
SRCARCH := sh
|
SRCARCH := sh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
export cross_compiling :=
|
||||||
|
ifneq ($(SRCARCH),$(SUBARCH))
|
||||||
|
cross_compiling := 1
|
||||||
|
endif
|
||||||
|
|
||||||
KCONFIG_CONFIG ?= .config
|
KCONFIG_CONFIG ?= .config
|
||||||
export KCONFIG_CONFIG
|
export KCONFIG_CONFIG
|
||||||
|
|
||||||
|
|
|
@ -18,14 +18,14 @@ silent := -s
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export KCONFIG_DEFCONFIG_LIST :=
|
export KCONFIG_DEFCONFIG_LIST :=
|
||||||
ifneq ($(SRCARCH),um)
|
ifndef cross_compiling
|
||||||
kernel-release := $(shell uname -r)
|
kernel-release := $(shell uname -r)
|
||||||
KCONFIG_DEFCONFIG_LIST := \
|
KCONFIG_DEFCONFIG_LIST += \
|
||||||
/lib/modules/$(kernel-release)/.config \
|
/lib/modules/$(kernel-release)/.config \
|
||||||
/etc/kernel-config \
|
/etc/kernel-config \
|
||||||
/boot/config-$(kernel-release) \
|
/boot/config-$(kernel-release)
|
||||||
arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)
|
|
||||||
endif
|
endif
|
||||||
|
KCONFIG_DEFCONFIG_LIST += arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)
|
||||||
|
|
||||||
# We need this, in case the user has it in its environment
|
# We need this, in case the user has it in its environment
|
||||||
unexport CONFIG_
|
unexport CONFIG_
|
||||||
|
|
Loading…
Reference in a new issue