Skip to contentSkip to conversation

Added optional build configs for qemu upstream

PATCH In review Fabio Fantoni 2 participants 2 messages Mar 7, 2012 – Mar 13, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Added optional build configs for qemu upstream

Added optional build configs for qemu upstream:
CONFIG_QEMUU_DEBUG to enable debug, disabled by default CONFIG_QEMUU_SPICE to enable spice, setting by autoconf
Added to README requirements for spice-enabled qemu upstream build (optional)

Changes from v2:
tools/Makefile: fix qemu upstream build parameters

Changes from v1:
Does checks with autoconf: if spice requirements are meet, then build with spice is enabled, otherwise no

Patch attached.

# HG changeset patch
# User Fabio Fantoni
# Date 1331047324 -3600
# Node ID 72a4403915504ca36f53cc69979e2ac9e6a857b1
# Parent 185f1deebf490932b3f905d587f8c44668dc25e4
Added optional build configs for qemu upstream:
CONFIG_QEMUU_DEBUG to enable debug, disabled by default CONFIG_QEMUU_SPICE to enable spice, setting by autoconf
Added to README requirements for spice-enabled qemu upstream build (optional)

Changes from v2:
tools/Makefile: fix qemu upstream build parameters

Changes from v1:
Does checks with autoconf: if spice requirements are meet, then build with spice is enabled, otherwise no

README +3 -0
diff -r 185f1deebf49 -r 72a440391550 README
@@ -60,6 +60,9 @@
     * 16-bit x86 assembler, loader and compiler (dev86 rpm or bin86 & bcc debs)
     * ACPI ASL compiler (iasl)
     * markdown
+    Optionals:
+    * Dev of spice protocol (e.g. libspice-protocol-dev >=0.10)
+    * Dev of spice server (e.g. libspice-server-dev >=0.10)
 
 Second, you need to acquire a suitable kernel for use in domain 0. If
 possible you should use a kernel provided by your OS distributor. If
config/Tools.mk.in +2 -0
diff -r 185f1deebf49 -r 72a440391550 config/Tools.mk.in
@@ -37,6 +37,8 @@
 OCAML_TOOLS         := @ocamltools@
 CONFIG_MINITERM     := @miniterm@
 CONFIG_LOMOUNT      := @lomount@
+CONFIG_QEMUU_SPICE  := @qemuuspice@
+CONFIG_QEMUU_DEBUG  := @qemuudebug@
 
 #System options
 CONFIG_SYSTEM_LIBAIO:= @system_aio@
tools/Makefile +9 -0
diff -r 185f1deebf49 -r 72a440391550 tools/Makefile
@@ -87,6 +87,14 @@
 			 --interp-prefix=$(CROSS_SYS_ROOT)
 endif
 
+ifeq ($(CONFIG_QEMUU_DEBUG),y)
+QEMU_OPTIONAL_CONFIGS += --enable-debug
+endif
+
+ifeq ($(CONFIG_QEMUU_SPICE),y)
+QEMU_OPTIONAL_CONFIGS += --enable-spice
+endif
+
 QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
 ifneq ($(QEMU_ROOT),.)
 export QEMU_ROOT
@@ -157,6 +165,7 @@
 		--bindir=$(LIBEXEC) \
 		--disable-kvm \
 		--python=$(PYTHON) \
+		$(QEMU_OPTIONAL_CONFIGS) \
 		$(IOEMU_CONFIGURE_CROSS); \
 	$(MAKE) install
 
tools/configure +471 -265

1,897 lines not on this page · raw message

tools/configure.ac +8 -0
diff -r 185f1deebf49 -r 72a440391550 tools/configure.ac
@@ -45,6 +45,7 @@
 AX_ARG_ENABLE_AND_EXPORT([miniterm], [Enable miniterm])
 AX_ARG_ENABLE_AND_EXPORT([lomount], [Enable lomount])
 AX_ARG_DISABLE_AND_EXPORT([debug], [Disable debug build of tools])
+AX_ARG_ENABLE_AND_EXPORT([qemuudebug], [Enable debug build of Qemu upstream])
 
 AC_ARG_VAR([PREPEND_INCLUDES],
     [List of include folders to prepend to CFLAGS (without -I)])
@@ -99,6 +100,13 @@
 AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext])
 AX_CHECK_UUID
 PKG_CHECK_MODULES(glib, glib-2.0)
+PKG_CHECK_MODULES(spice_protocol, spice-protocol >= 0.10, [have_spice_protocol=y], [libspice-protocol=n])
+PKG_CHECK_MODULES(spice_server, spice-server >= 0.10, [have_spice_server=y], [libspice-server=n])
+AS_IF([test "x$have_spice_protocol" = "xy" -a "x$have_spice_server" = "xy"], 
+	[qemuuspice="y"],
+	[qemuuspice="n"]
+)
+AC_SUBST(qemuuspice)
 
 # Check library path
 AX_DEFAULT_LIB

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

Fabio Fantoni writes ("[Xen-devel] [PATCH v3] Added optional build configs for qemu upstream"):

Quoted 5 lines

Added optional build configs for qemu upstream:
CONFIG_QEMUU_DEBUG to enable debug, disabled by default CONFIG_QEMUU_SPICE to enable spice, setting by autoconf Added to README requirements for spice-enabled qemu upstream build (optional)

I'm kind of uncomfortable with this because ultimately it will end up with us replicating all of the functionality from the qemu upstream configure script in our own.

Perhaps it would be better to instead provide a generic option for our configure script which can be used to pass arbitrary options to the qemu one ? Obviously that means that perhaps failures will be deferred because the qemu configure script runs later but I think that's a reasonable price to pay (in non-default scenarios) for not trying to have our configure script know about every qemu option.

Thanks,
Ian.