xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	ian.jackson@eu.citrix.com, ian.campbell@citrix.com
Subject: [PATCH V3 4/5] tools: support system supplied ovmf binary
Date: Tue, 29 Oct 2013 11:39:50 +0000	[thread overview]
Message-ID: <1383046791-1256-5-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1383046791-1256-1-git-send-email-wei.liu2@citrix.com>

From: Ian Campbell <ian.campbell@citrix.com>

Debian Jessie at least contains an ovmf package that includes
/usr/share/ovmf/OVMF.fd. It's also possible that user may want to supply
his/her own ovmf binary.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 config/Tools.mk.in                |    1 +
 tools/configure                   |   16 +++++++++++++---
 tools/configure.ac                |   11 +++++++++++
 tools/firmware/Makefile           |    2 ++
 tools/firmware/hvmloader/Makefile |    6 +++++-
 5 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 67f5782..d9d3239 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -24,6 +24,7 @@ BCC                 := @BCC@
 IASL                := @IASL@
 FETCHER             := @FETCHER@
 SEABIOS_PATH        := @seabios_path@
+OVMF_PATH           := @ovmf_path@
 
 # Extra folder for libs/includes
 PREPEND_INCLUDES    := @PREPEND_INCLUDES@
diff --git a/tools/configure b/tools/configure
index 1da8652..22e74a7 100755
--- a/tools/configure
+++ b/tools/configure
@@ -682,6 +682,7 @@ APPEND_LIB
 APPEND_INCLUDES
 PREPEND_LIB
 PREPEND_INCLUDES
+ovmf_path
 seabios_path
 qemu_xen
 qemu_traditional
@@ -768,6 +769,7 @@ enable_blktap1
 enable_qemu_traditional
 with_system_qemu
 with_system_seabios
+with_system_ovmf
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1440,6 +1442,9 @@ Optional Packages:
   --with-system-seabios[=PATH]
                           Use system supplied seabios PATH instead of building
                           and installing our own version
+  --with-system-ovmf[=PATH]
+                          Use system supplied OVMF PATH instead of building
+                          and installing our own version
 
 Some influential environment variables:
   CC          C compiler command
@@ -3771,9 +3776,14 @@ fi
 
 
 
-
-
-
+# Check whether --with-system-ovmf was given.
+if test "${with_system_ovmf+set}" = set; then :
+  withval=$with_system_ovmf;
+    case $withval in
+        no) ovmf_path= ;;
+        *)  ovmf_path=$withval ;;
+    esac
+fi
 
 
 for cppflag in $PREPEND_INCLUDES
diff --git a/tools/configure.ac b/tools/configure.ac
index 4f3c33a..b2941a4 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -108,6 +108,17 @@ AC_ARG_WITH([system-seabios],
 ],[])
 AC_SUBST(seabios_path)
 
+AC_ARG_WITH([system-ovmf],
+    AS_HELP_STRING([--with-system-ovmf@<:@=PATH@:>@],
+       [Use system supplied OVMF PATH instead of building and installing
+        our own version]),[
+    case $withval in
+        no) ovmf_path= ;;
+        *)  ovmf_path=$withval ;;
+    esac
+],[])
+AC_SUBST(ovmf_path)
+
 AC_ARG_VAR([PREPEND_INCLUDES],
     [List of include folders to prepend to CFLAGS (without -I)])
 AC_ARG_VAR([PREPEND_LIB],
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 8633748..cb13212 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -6,7 +6,9 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
 SUBDIRS-y :=
+ifeq ($(OVMF_PATH),)
 SUBDIRS-$(CONFIG_OVMF) += ovmf-dir
+endif
 ifeq ($(SEABIOS_PATH),)
 SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
 endif
diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
index e27e457..00ee952 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -56,7 +56,11 @@ ROMS :=
 ifeq ($(CONFIG_OVMF),y)
 OBJS += ovmf.o
 CFLAGS += -DENABLE_OVMF
-OVMF_ROM := $(OVMF_DIR)/ovmf.bin
+ifeq ($(OVMF_PATH),)
+	OVMF_ROM := $(OVMF_DIR)/ovmf.bin
+else
+	OVMF_ROM := $(OVMF_PATH)
+endif
 ROMS += $(OVMF_ROM)
 endif
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-10-29 11:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 11:39 [PATCH V3 0/5] Reintroduce OVMF support Wei Liu
2013-10-29 11:39 ` [PATCH V3 1/5] libxl: bump LIBXL_MAXMEM_CONSTANT to 2048 Wei Liu
2013-11-01 11:14   ` George Dunlap
2013-11-01 16:02   ` Ian Campbell
2013-11-01 16:10     ` Wei Liu
2013-11-01 16:23       ` Ian Campbell
2013-11-06 10:32         ` Wei Liu
2013-11-06 10:41           ` Ian Campbell
2013-11-06 18:04             ` Stefano Stabellini
2013-11-07 11:03               ` Ian Campbell
2013-11-07 11:15                 ` Processed: " xen
2013-11-06 12:04   ` Wei Liu
2013-10-29 11:39 ` [PATCH V3 2/5] Config.mk: update OVMF changeset Wei Liu
2013-10-29 14:16   ` Fabio Fantoni
2013-10-29 14:21     ` Wei Liu
2013-10-29 16:15       ` Fabio Fantoni
2013-10-29 16:34         ` Wei Liu
2013-10-30 11:33           ` Fabio Fantoni
2013-10-30 11:50             ` Wei Liu
2013-10-30 12:57               ` Fabio Fantoni
2013-10-30 14:05                 ` Wei Liu
2013-10-30 15:52                   ` Fabio Fantoni
2013-10-30 15:58                     ` Wei Liu
2013-10-31  9:47                       ` Fabio Fantoni
2013-10-31 10:03                         ` Wei Liu
2013-10-31 11:22                           ` Fabio Fantoni
2013-10-31 14:40                             ` Wei Liu
2013-10-31 15:41                               ` Fabio Fantoni
2013-10-30 12:09             ` Wei Liu
2013-10-30 12:42               ` Fabio Fantoni
2013-11-01 16:05   ` Ian Campbell
2013-10-29 11:39 ` [PATCH V3 3/5] tools: clone ovmf to ovmf-dir directory Wei Liu
2013-10-29 11:39 ` Wei Liu [this message]
2013-10-29 11:39 ` [PATCH V3 5/5] tools: Enable OVMF build by default Wei Liu
2013-11-11 14:09 ` [PATCH V3 0/5] Reintroduce OVMF support Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383046791-1256-5-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).