[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH V5 3/4] tools: enable OVMF build for Linux by default



Now OVMF can build on Linux, but not NetBSD. I suspect it won't build on
FreeBSD either. Even if we fix OVMF build script, it requires upstream
QEMU, which to the best of my knowledge is not available in *BSD Xen
build at the moment. So the simple thing to do is to only enable OVMF
build for Linux.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>
---
 tools/configure    |   24 +++++++++++++-----------
 tools/configure.ac |   17 ++++++++++++++++-
 2 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/tools/configure b/tools/configure
index ff82b32..0bcc922 100755
--- a/tools/configure
+++ b/tools/configure
@@ -1422,7 +1422,8 @@ Optional Features:
   --enable-xenapi         Enable Xen API Bindings (default is DISABLED)
   --disable-ocamltools    Disable Ocaml tools (default is ENABLED)
   --disable-xsmpolicy     Disable XSM policy compilation (default is ENABLED)
-  --enable-ovmf           Enable OVMF (default is DISABLED)
+  --enable-ovmf           Enable OVMF build, (DEFAULT is on for Linux,
+                          otherwise off)
   --disable-rombios       Disable ROM BIOS (default is ENABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
   --disable-debug         Disable debug build of tools (default is ENABLED)
@@ -3571,23 +3572,24 @@ xsmpolicy=$ax_cv_xsmpolicy
 # Check whether --enable-ovmf was given.
 if test "${enable_ovmf+set}" = set; then :
   enableval=$enable_ovmf;
-fi
-
-
-if test "x$enable_ovmf" = "xno"; then :
+else
 
-    ax_cv_ovmf="n"
+    case $host_os in
+        linux*)
+           enable_ovmf="yes";;
+        *) enable_ovmf="no";;
+    esac
 
-elif test "x$enable_ovmf" = "xyes"; then :
+fi
 
-    ax_cv_ovmf="y"
+if test "x$enable_ovmf" = "xyes"; then :
 
-elif test -z $ax_cv_ovmf; then :
+    ovmf=y
+else
 
-    ax_cv_ovmf="n"
+    ovmf=n
 
 fi
-ovmf=$ax_cv_ovmf
 
 
 
diff --git a/tools/configure.ac b/tools/configure.ac
index b2941a4..c317932 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -53,7 +53,22 @@ AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and 
xentop monitoring tools])
 AX_ARG_DEFAULT_DISABLE([xenapi], [Enable Xen API Bindings])
 AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
 AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
-AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
+
+AC_ARG_ENABLE([ovmf],
+    AS_HELP_STRING([--enable-ovmf],
+                   [Enable OVMF build, (DEFAULT is on for Linux, otherwise 
off)]),,[
+    case $host_os in
+        linux*)
+           enable_ovmf="yes";;
+        *) enable_ovmf="no";;
+    esac
+])
+AS_IF([test "x$enable_ovmf" = "xyes"], [
+    ovmf=y],[
+    ovmf=n
+])
+AC_SUBST(ovmf)
+
 AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
 AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.