* [PATCH RFC] tools: allow user to specify a system seabios binary
@ 2013-08-28 13:06 Fabio Fantoni
0 siblings, 0 replies; only message in thread
From: Fabio Fantoni @ 2013-08-28 13:06 UTC (permalink / raw)
To: xen-devel
Cc: George.Dunlap, Fabio Fantoni, Ian.Jackson, Ian.Campbell,
Stefano.Stabellini
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.
NOTE: this patch is incomplete, configure update with autoconf
is missed.
I have doubts about the method used to manage seabios compile
on makefiles perhaps incomplete or non-optimal.
Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
---
config/Tools.mk.in | 1 +
tools/config.h.in | 3 +++
tools/configure.ac | 16 ++++++++++++++++
tools/firmware/Makefile | 4 +++-
tools/firmware/hvmloader/Makefile | 4 ++++
5 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index e388e42..ce73b91 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -52,6 +52,7 @@ CONFIG_ROMBIOS := @rombios@
CONFIG_SEABIOS := @seabios@
CONFIG_QEMU_TRAD := @qemu_traditional@
CONFIG_QEMU_XEN := @qemu_xen@
+CONFIG_SEABIOS_COMP := @seabios_compile@
CONFIG_XEND := @xend@
CONFIG_BLKTAP1 := @blktap1@
diff --git a/tools/config.h.in b/tools/config.h.in
index aaa1027..88fdaeb 100644
--- a/tools/config.h.in
+++ b/tools/config.h.in
@@ -78,6 +78,9 @@
/* Qemu Xen path */
#undef QEMU_XEN_PATH
+/* Seabios path */
+#undef SEABIOS_PATH
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
diff --git a/tools/configure.ac b/tools/configure.ac
index 1f57681..7823221 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -97,6 +97,22 @@ 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_compile=y ; seabios_path= ;;
+ *) seabios_compile=n ; seabios_path=$withval ;;
+ esac
+],[
+ seabios_compile=y
+])
+AS_IF([test "x$seabios_compile" = "xn"], [
+ AC_DEFINE_UNQUOTED([SEABIOS_PATH], ["$seabios_path"], [Seabios path])
+])
+AC_SUBST(seabios_compile)
+
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..fe56036 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -7,7 +7,9 @@ INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
SUBDIRS-y :=
SUBDIRS-$(CONFIG_OVMF) += ovmf
-SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
+ifeq ($(CONFIG_SEABIOS),y)
+SUBDIRS-$(CONFIG_SEABIOS_COMP) += 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..6b7c64c 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -71,7 +71,11 @@ ifeq ($(CONFIG_SEABIOS),y)
OBJS += seabios.o
CFLAGS += -DENABLE_SEABIOS
SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
+ifeq ($(CONFIG_SEABIOS_COMP),y)
ROMS += $(SEABIOS_ROM)
+else
+ROMS += $(SEABIOS_PATH)
+endif
endif
.PHONY: all
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-08-28 13:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-28 13:06 [PATCH RFC] tools: allow user to specify a system seabios binary Fabio Fantoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.