[PATCH 1/2] x86, platform, kconfig: move kvmconfig functionality to a helper
From: Josh Triplett
Date: Wed Aug 06 2014 - 18:30:48 EST
The new mergeconfig helper makes it easier to add other partial
configurations similar to kvmconfig.
Based on a patch by Luis R. Rodriguez <mcgrof@xxxxxxxx>.
Originally-Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxx>
Modified to make the helper name more general than just virtualization,
and factor out more of the common file path.
Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
Hopefully the above changelog message makes the origin of this patch
clear; it didn't seem appropriate to keep a Signed-off-by when modifying
the patch, but I wanted to preserve the credit.
arch/x86/Makefile | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c65fd96..1568678 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -247,11 +247,15 @@ archclean:
$(Q)$(MAKE) $(clean)=$(boot)
$(Q)$(MAKE) $(clean)=arch/x86/tools
+define mergeconfig
+$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
+$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/$(1).config
+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
+endef
+
PHONY += kvmconfig
kvmconfig:
- $(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
- $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config
- $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
+ $(call mergeconfig,kvm_guest)
define archhelp
echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
--
2.1.0.rc1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/