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

Re: [Xen-devel] [PATCH] tools: Update to SeaBIOS 1.7.1



On Fri, 2013-01-04 at 14:18 +0000, Ian Campbell wrote:
> Only lightly tested with a Linux HVM guest PXE boot.

When I tried this update last year (probably to 1.7.0 rather than .1) I
had issues with SeaBIOS being particular about the compiler/linker used.
In particular it failed with the Debian Squeeze compiler (which bothers
me personally but also affects the test system).

At the time I concluded that we should ship a pre-build binary, as qemu
does. However when I came to revisit this now I found that
compiler/linker issue had gone away, but by the time I noticed this I
had already written the patch below.

Not to be applied but just to have in the archives if we eventually need
to go down this path anyway at some point. I've snipped the bit which
adds the tools/firmware/seabios.bin_shipped binary to save space, it
would need rebuilding anyhow if we resurrected this approach and I
thought it was a bit antisocial to post something so large when it's not
actually to be applied.

Ian.

8<-----

>From ae3598b2488b0cd23b32074f8bd37b3399c9b374 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 3 Jan 2013 14:51:15 +0000
Subject: [PATCH] tools: add a prebuilt SeaBIOS binary

SeaBIOS is quite picky about the compiler/linker used to build it and in
particular is not happy with ld on Debian Squeeze.

Include a binary and add a configure option which enables rebuilding.

QEMU also includes a prebuilt binary for this reason.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 .gitignore                         |    1 +
 .hgignore                          |    1 +
 config/Tools.mk.in                 |    2 +-
 tools/configure                    |   26 +++++++++++++-------------
 tools/configure.ac                 |    2 +-
 tools/firmware/Makefile            |   16 ++++++++++++++--
 tools/firmware/hvmloader/Makefile  |    5 +----
 tools/firmware/seabios-config      |   21 +++++++++++++++++++--
 tools/firmware/seabios.bin_shipped |  Bin 0 -> 131072 bytes
 9 files changed, 51 insertions(+), 23 deletions(-)
 create mode 100644 tools/firmware/seabios.bin_shipped

diff --git a/.gitignore b/.gitignore
index f71cff8..4bc07bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -331,6 +331,7 @@ tools/qemu-xen-traditional-dir
 
 tools/firmware/seabios-dir-remote
 tools/firmware/seabios-dir
+tools/firmware/seabios.bin
 
 tools/firmware/rombios/_rombios_.c
 tools/firmware/rombios/rombios.s
diff --git a/.hgignore b/.hgignore
index 344792a..41e61c1 100644
--- a/.hgignore
+++ b/.hgignore
@@ -295,6 +295,7 @@
 ^tools/qemu-xen-dir$
 ^tools/firmware/seabios-dir-remote
 ^tools/firmware/seabios-dir$
+^tools/firmware/seabios\.bin$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 3967e7d..65a4356 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -50,7 +50,7 @@ CONFIG_MINITERM     := @miniterm@
 CONFIG_LOMOUNT      := @lomount@
 CONFIG_OVMF         := @ovmf@
 CONFIG_ROMBIOS      := @rombios@
-CONFIG_SEABIOS      := @seabios@
+CONFIG_REBUILDSEABIOS := @rebuildseabios@
 
 #System options
 CONFIG_SYSTEM_LIBAIO:= @system_aio@
diff --git a/tools/configure b/tools/configure
index f9d1925..06c8b75 100755
--- a/tools/configure
+++ b/tools/configure
@@ -661,7 +661,7 @@ APPEND_INCLUDES
 PREPEND_LIB
 PREPEND_INCLUDES
 debug
-seabios
+rebuildseabios
 rombios
 ovmf
 lomount
@@ -727,7 +727,7 @@ enable_miniterm
 enable_lomount
 enable_ovmf
 enable_rombios
-enable_seabios
+enable_rebuildseabios
 enable_debug
 '
       ac_precious_vars='build_alias
@@ -1385,7 +1385,7 @@ Optional Features:
   --enable-lomount        Enable lomount (default is DISABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
   --disable-rombios       Disable ROM BIOS (default is ENABLED)
-  --disable-seabios       Disable SeaBIOS (default is ENABLED)
+  --enable-rebuildseabios Rebuild SeaBIOS (default is DISABLED)
   --disable-debug         Disable debug build of tools (default is ENABLED)
 
 Some influential environment variables:
@@ -2579,26 +2579,26 @@ rombios=$ax_cv_rombios
 
 
 
-# Check whether --enable-seabios was given.
-if test "${enable_seabios+set}" = set; then :
-  enableval=$enable_seabios;
+# Check whether --enable-rebuildseabios was given.
+if test "${enable_rebuildseabios+set}" = set; then :
+  enableval=$enable_rebuildseabios;
 fi
 
 
-if test "x$enable_seabios" = "xno"; then :
+if test "x$enable_rebuildseabios" = "xno"; then :
 
-    ax_cv_seabios="n"
+    ax_cv_rebuildseabios="n"
 
-elif test "x$enable_seabios" = "xyes"; then :
+elif test "x$enable_rebuildseabios" = "xyes"; then :
 
-    ax_cv_seabios="y"
+    ax_cv_rebuildseabios="y"
 
-elif test -z $ax_cv_seabios; then :
+elif test -z $ax_cv_rebuildseabios; then :
 
-    ax_cv_seabios="y"
+    ax_cv_rebuildseabios="n"
 
 fi
-seabios=$ax_cv_seabios
+rebuildseabios=$ax_cv_rebuildseabios
 
 
 
diff --git a/tools/configure.ac b/tools/configure.ac
index 586313d..1cd4ffa 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -46,7 +46,7 @@ AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
 AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
 AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
 AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
-AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
+AX_ARG_DEFAULT_DISABLE([rebuildseabios], [Rebuild SeaBIOS])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
 
 AC_ARG_VAR([PREPEND_INCLUDES],
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index aff8e56..5b54bf8 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -7,7 +7,7 @@ INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_OVMF) += ovmf
-SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
+SUBDIRS-$(CONFIG_REBUILDSEABIOS) += seabios-dir
 SUBDIRS-$(CONFIG_ROMBIOS) += rombios
 SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
 SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
@@ -22,7 +22,7 @@ seabios-dir:
        cp seabios-config seabios-dir/.config;
 
 .PHONY: all
-all: $(SUBDIRS-y)
+all: $(SUBDIRS-y) seabios.bin
 ifeq ($(CONFIG_ROMBIOS),y)
        @set -e; if [ $$((`( bcc -v 2>&1 | grep version || echo 0.0.0 ) | cut 
-d' ' -f 3 | awk -F. '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -lt 
$$((0x00100e)) ] ; then \
        echo 
"==========================================================================="; \
@@ -34,6 +34,18 @@ ifeq ($(CONFIG_ROMBIOS),y)
 endif
        $(MAKE) PYTHON=$(PYTHON) subdirs-$@
 
+ifeq ($(CONFIG_REBUILDSEABIOS),y)
+SEABIOS_BIN := seabios-dir/out/bios.bin
+else
+SEABIOS_BIN := seabios.bin_shipped
+endif
+
+subdir-all-seabios-dir: seabios-dir
+
+seabios-dir/out/bios.bin: subdir-all-seabios-dir
+
+seabios.bin: $(SEABIOS_BIN)
+       cp $< $@
 
 .PHONY: install
 install: all
diff --git a/tools/firmware/hvmloader/Makefile 
b/tools/firmware/hvmloader/Makefile
index c6e7376..4b5a3cb 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -39,7 +39,6 @@ CIRRUSVGA_DEBUG ?= n
 
 OVMF_DIR := ../ovmf
 ROMBIOS_DIR := ../rombios
-SEABIOS_DIR := ../seabios-dir
 
 ifeq ($(CONFIG_ROMBIOS),y)
 STDVGA_ROM    := ../vgabios/VGABIOS-lgpl-latest.bin
@@ -67,12 +66,10 @@ ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-bochs-latest
 ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) $(ETHERBOOT_ROMS)
 endif
 
-ifeq ($(CONFIG_SEABIOS),y)
 OBJS += seabios.o
 CFLAGS += -DENABLE_SEABIOS
-SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
+SEABIOS_ROM := ../seabios.bin
 ROMS += $(SEABIOS_ROM)
-endif
 
 .PHONY: all
 all: subdirs-all
diff --git a/tools/firmware/seabios-config b/tools/firmware/seabios-config
index 202d15f..3a36fd1 100644
--- a/tools/firmware/seabios-config
+++ b/tools/firmware/seabios-config
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # SeaBIOS Configuration
-# Wed Sep  7 13:03:21 2011
+# Thu Jan  3 17:25:45 2013
 #
 
 #
@@ -24,6 +24,9 @@ CONFIG_ATA_DMA=y
 CONFIG_ATA_PIO32=y
 CONFIG_AHCI=y
 CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_SCSI=y
+CONFIG_ESP_SCSI=y
+CONFIG_LSI_SCSI=y
 CONFIG_FLOPPY=y
 CONFIG_PS2PORT=y
 CONFIG_USB=y
@@ -31,12 +34,13 @@ CONFIG_USB_UHCI=y
 CONFIG_USB_OHCI=y
 CONFIG_USB_EHCI=y
 CONFIG_USB_MSC=y
+CONFIG_USB_UAS=y
 CONFIG_USB_HUB=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_USB_MOUSE=y
 CONFIG_SERIAL=y
 CONFIG_LPT=y
-# CONFIG_USE_SMM is not set
+CONFIG_USE_SMM=y
 CONFIG_MTRR_INIT=y
 
 #
@@ -56,6 +60,7 @@ CONFIG_KEYBOARD=y
 CONFIG_KBD_CALL_INT15_4F=y
 CONFIG_MOUSE=y
 CONFIG_S3_RESUME=y
+CONFIG_VGAHOOKS=y
 # CONFIG_DISABLE_A20 is not set
 
 #
@@ -67,7 +72,19 @@ CONFIG_SMBIOS=y
 CONFIG_ACPI=y
 
 #
+# VGA ROM
+#
+CONFIG_NO_VGABIOS=y
+# CONFIG_VGA_STANDARD_VGA is not set
+# CONFIG_VGA_CIRRUS is not set
+# CONFIG_VGA_BOCHS is not set
+# CONFIG_VGA_GEODEGX2 is not set
+# CONFIG_VGA_GEODELX is not set
+# CONFIG_BUILD_VGABIOS is not set
+
+#
 # Debugging
 #
 CONFIG_DEBUG_LEVEL=1
 # CONFIG_DEBUG_SERIAL is not set
+CONFIG_DEBUG_IO=y
diff --git a/tools/firmware/seabios.bin_shipped 
b/tools/firmware/seabios.bin_shipped
new file mode 100644
index 
0000000000000000000000000000000000000000..d3130d45a1e6675da38887d7c32099c2455de54e
GIT binary patch
literal 131072
zcmeFadwf$>)<3+HoVID3_5?_=NQ62DEkhk!MWq%rZQ61vXrSB_1azD}5pYCE00p7(
zwA$Tcp3(6#<BZP8s5AZ?Mv-x7se(-lNx@qIF9?nnL_8%x%S9*!$@^XVq@gfA&-?!V
zc>gOOR?j*6zSnK9z4zKXjP?EN!$2Pf`Y_Okfj$iMVW1BKeHiG&KpzJBFwlpAJ`D6>
<...snipped...>

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