aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2014-08-06 18:21:00 -0400
committerJosh Triplett <josh@joshtriplett.org>2014-08-08 19:27:14 -0400
commit3aaefce10351fecab348f5e06857f44cafc61a62 (patch)
treeab63e13c6a3300bc7df97c2a8f486b5d4a922931
parent85417aef44fc58b08773117ceb1bc6ca5684e973 (diff)
x86, platform, kconfig: move kvmconfig functionality to a helper
The new mergeconfig helper makes it easier to add other partial configurations similar to kvmconfig. Architecture-independent portions of those partial configurations should go in kernel/configs/${name}.config, and architecture-dependent portions should go in arch/${arch}/configs/${name}.config. Based on a patch by Luis R. Rodriguez <mcgrof@suse.com>. Originally-Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Modified to make the helper name more general than just virtualization, support architecture-dependent and architecture-independent partial configurations, move the helper and kvmconfig to scripts/kconfig/Makefile, and factor out more of the common file path. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r--arch/x86/Makefile7
-rw-r--r--scripts/kconfig/Makefile14
2 files changed, 14 insertions, 7 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c65fd9650467..fcc74b7aabb0 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -247,12 +247,6 @@ archclean:
247 $(Q)$(MAKE) $(clean)=$(boot) 247 $(Q)$(MAKE) $(clean)=$(boot)
248 $(Q)$(MAKE) $(clean)=arch/x86/tools 248 $(Q)$(MAKE) $(clean)=arch/x86/tools
249 249
250PHONY += kvmconfig
251kvmconfig:
252 $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
253 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config
254 $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
255
256define archhelp 250define archhelp
257 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 251 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
258 echo ' install - Install kernel using' 252 echo ' install - Install kernel using'
@@ -266,5 +260,4 @@ define archhelp
266 echo ' bzdisk/fdimage*/isoimage also accept:' 260 echo ' bzdisk/fdimage*/isoimage also accept:'
267 echo ' FDARGS="..." arguments for the booted kernel' 261 echo ' FDARGS="..." arguments for the booted kernel'
268 echo ' FDINITRD=file initrd for the booted kernel' 262 echo ' FDINITRD=file initrd for the booted kernel'
269 echo ' kvmconfig - Enable additional options for guest kernel support'
270endef 263endef
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 9c4d2412fb72..8083b94b45ee 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -104,6 +104,19 @@ endif
104%_defconfig: $(obj)/conf 104%_defconfig: $(obj)/conf
105 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) 105 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
106 106
107configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config)
108
109define mergeconfig
110$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
111$(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture))
112$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1))
113$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
114endef
115
116PHONY += kvmconfig
117kvmconfig:
118 $(call mergeconfig,kvm_guest)
119
107# Help text used by make help 120# Help text used by make help
108help: 121help:
109 @echo ' config - Update current config utilising a line-oriented program' 122 @echo ' config - Update current config utilising a line-oriented program'
@@ -124,6 +137,7 @@ help:
124 @echo ' randconfig - New config with random answer to all options' 137 @echo ' randconfig - New config with random answer to all options'
125 @echo ' listnewconfig - List new options' 138 @echo ' listnewconfig - List new options'
126 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' 139 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
140 @echo ' kvmconfig - Enable additional options for guest kernel support'
127 141
128# lxdialog stuff 142# lxdialog stuff
129check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh 143check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh