tools: allow user to specify a system seabios binary
authorFabio Fantoni <fabio.fantoni@m2r.biz>
Thu, 5 Sep 2013 10:40:01 +0000 (12:40 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 9 Sep 2013 13:48:51 +0000 (14:48 +0100)
If this option is given don't bother building seabios ourselves.
Likely to be handy for distros who have an existing seabios
package which they want to reuse.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
config/Tools.mk.in
tools/configure
tools/configure.ac
tools/firmware/Makefile
tools/firmware/hvmloader/Makefile

index e388e4289f71669f1c011df3397561d7b4fbbc23..67f57824cfcb6222d18d51d79b6e8ea4c9e7bcd0 100644 (file)
@@ -23,6 +23,7 @@ LD86                := @LD86@
 BCC                 := @BCC@
 IASL                := @IASL@
 FETCHER             := @FETCHER@
+SEABIOS_PATH        := @seabios_path@
 
 # Extra folder for libs/includes
 PREPEND_INCLUDES    := @PREPEND_INCLUDES@
index 4be39fca3444a91c7689903620c6b1e82558cbb8..d916cb61ad3b7d7b6ba47a5a3b6b1733dcae05e4 100755 (executable)
@@ -654,6 +654,7 @@ APPEND_LIB
 APPEND_INCLUDES
 PREPEND_LIB
 PREPEND_INCLUDES
+seabios_path
 qemu_xen
 qemu_traditional
 blktap1
@@ -738,6 +739,7 @@ enable_xend
 enable_blktap1
 enable_qemu_traditional
 with_system_qemu
+with_system_seabios
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1409,6 +1411,9 @@ Optional Packages:
                           Use system supplied qemu PATH or qemu (taken from
                           $PATH) as qemu-xen device model instead of building
                           and installing our own version
+  --with-system-seabios[=PATH]
+                          Use system supplied seabios PATH instead of building
+                          and installing our own version
 
 Some influential environment variables:
   CC          C compiler command
@@ -3727,6 +3732,19 @@ fi
 
 
 
+# Check whether --with-system-seabios was given.
+if test "${with_system_seabios+set}" = set; then :
+  withval=$with_system_seabios;
+    case $withval in
+        no) seabios_path= ;;
+        *)  seabios_path=$withval ;;
+    esac
+
+fi
+
+
+
+
 
 
 
index 1f576819a85d34315371c64bd5c904c53029bb8b..2e57bfc0a099d25f3db6b46b3826bfddd40cf412 100644 (file)
@@ -97,6 +97,17 @@ AS_IF([test "x$qemu_xen" = "xn"], [
 ])
 AC_SUBST(qemu_xen)
 
+AC_ARG_WITH([system-seabios],
+    AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
+       [Use system supplied seabios PATH instead of building and installing
+        our own version]),[
+    case $withval in
+        no) seabios_path= ;;
+        *)  seabios_path=$withval ;;
+    esac
+],[])
+AC_SUBST(seabios_path)
+
 AC_ARG_VAR([PREPEND_INCLUDES],
     [List of include folders to prepend to CFLAGS (without -I)])
 AC_ARG_VAR([PREPEND_LIB],
index aff8e564e9f7a1e2e0cd10327e5ddc801cfa0e5a..f0647655e2f91e3f8ed8d4928d287b55df0c2dc8 100644 (file)
@@ -7,7 +7,9 @@ INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_OVMF) += ovmf
+ifeq ($(SEABIOS_PATH),)
 SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
+endif
 SUBDIRS-$(CONFIG_ROMBIOS) += rombios
 SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
 SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
index c6e73762749f286fb8708a6f94eb39fa0afbaad1..8ab1429cccbc193708ee51b1871c7a46d8d78ee2 100644 (file)
@@ -70,7 +70,11 @@ endif
 ifeq ($(CONFIG_SEABIOS),y)
 OBJS += seabios.o
 CFLAGS += -DENABLE_SEABIOS
-SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
+ifeq ($(SEABIOS_PATH),)
+       SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
+else
+       SEABIOS_ROM := $(SEABIOS_PATH)
+endif
 ROMS += $(SEABIOS_ROM)
 endif