Commit f4d9cf5b authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: allow architectures to specify defconfig file with KBUILD_DEFCONFIG

For some architectures is does not make sense to maintain a single default
configuration - arm is a good example here.
KBUILD_DEFCONFIG is introduced allowing relevant architectures to point out
a configuration kept in arch/$(ARCH)/configs as the configuration
to be used when executing 'make defconfig'.
This patch selects versatile_defconfig as the default configuration for arm.

The reason to keep defconfig is that is has proved valuable in many testing
scenarios when one are doing a cross architecture build of the kernel to
do a simple compile-time check of some changes.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 7928d90e
......@@ -440,6 +440,12 @@ ifeq ($(config-targets),1)
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
include $(srctree)/arch/$(ARCH)/Makefile
export KBUILD_DEFCONFIG
config: scripts_basic outputmakefile FORCE
$(Q)$(MAKE) $(build)=scripts/kconfig $@
%config: scripts_basic outputmakefile FORCE
......
......@@ -13,6 +13,10 @@ OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
GZFLAGS :=-9
#CFLAGS +=-pipe
# Do not use arch/arm/defconfig - it's always outdated.
# Select a platform tht is kept up-to-date
KBUILD_DEFCONFIG := versatile_defconfig
ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
endif
......
This diff is collapsed.
......@@ -38,7 +38,12 @@ allmodconfig: $(obj)/conf
$< -m arch/$(ARCH)/Kconfig
defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
$< -d arch/$(ARCH)/Kconfig
else
@echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
$(Q)$< -D arch/$(ARCH)/configs/$(KBUILD_DEFCONFIG) arch/$(ARCH)/Kconfig
endif
%_defconfig: $(obj)/conf
$(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment