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

[Xen-devel] [PATCH v3] tools: allow user to specify a system seabios binary



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@xxxxxxx>
---
 config/Tools.mk.in                |    1 +
 tools/configure                   |   18 ++++++++++++++++++
 tools/configure.ac                |   11 +++++++++++
 tools/firmware/Makefile           |    2 ++
 tools/firmware/hvmloader/Makefile |    6 +++++-
 5 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index e388e42..67f5782 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -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@
diff --git a/tools/configure b/tools/configure
index 4be39fc..d916cb6 100755
--- a/tools/configure
+++ b/tools/configure
@@ -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
+
+
+
+
 
 
 
diff --git a/tools/configure.ac b/tools/configure.ac
index 1f57681..2e57bfc 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -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],
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index aff8e56..f064765 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -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
diff --git a/tools/firmware/hvmloader/Makefile 
b/tools/firmware/hvmloader/Makefile
index c6e7376..8ab1429 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -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
 
-- 
1.7.9.5


_______________________________________________
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®.