tools: support system supplied ovmf binary
authorIan Campbell <ian.campbell@citrix.com>
Tue, 29 Oct 2013 11:39:50 +0000 (11:39 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 11 Nov 2013 13:38:57 +0000 (13:38 +0000)
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
tools/configure
tools/configure.ac
tools/firmware/Makefile
tools/firmware/hvmloader/Makefile

index 67f57824cfcb6222d18d51d79b6e8ea4c9e7bcd0..d9d32398d8589566300d50619df12f02b8a3af29 100644 (file)
@@ -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@
index 1da8652587b24697e838e34918da9dbb04e7a9b3..ff82b3205ea6fb173ef0bfd99d928f37cbcd0ef7 100755 (executable)
@@ -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
@@ -3772,6 +3777,19 @@ 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
+
+
+
+
 
 
 
index 4f3c33a306c5603a867a3def4623f6902088e215..b2941a4e6a9dbaf38164ab1aab211dd164cb5e58 100644 (file)
@@ -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],
index 8633748df0b630a3e26f58349c60118a9acf3d6c..cb13212da3ba7ff5c8358c80b8c360b0c93691a6 100644 (file)
@@ -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
index e27e457d395007e15c9e95ea723dd7fc3031566a..00ee952c2d2a39a4d815d22e3895469628414140 100644 (file)
@@ -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