|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] x86, platform, xen, kconfig: add xen defconfig helper
On Fri, 6 Jun 2014, Luis R. Rodriguez wrote:
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 37621ac..9db34e2 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -256,6 +256,12 @@ kvmconfig:
> $(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
>
> +PHONY += xenconfig
> +xenconfig:
> + $(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/xen.config
> + $(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
> +
> define archhelp
> echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
> echo ' install - Install kernel using'
> @@ -270,4 +276,5 @@ define archhelp
> echo ' FDARGS="..." arguments for the booted kernel'
> echo ' FDINITRD=file initrd for the booted kernel'
> echo ' kvmconfig - Enable additional options for kvm guest kernel
> support'
> + echo ' xenconfig - Enable additional options for xen dom0 and guest
> kernel support'
> endef
I suppose it would be easier to generalize the functionality and do
something like this instead since the two are otherwise identical:
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -250,11 +250,19 @@ archclean:
$(Q)$(MAKE) $(clean)=$(boot)
$(Q)$(MAKE) $(clean)=arch/x86/tools
+define build-virtconfig
+$(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)
+$(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 build-virtconfig,kvm_guest.config)
+
+PHONY += xenconfig
+xenconfig:
+ $(call build-virtconfig,xen.config)
define archhelp
echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |