Skip to contentSkip to conversation

tools: Update to SeaBIOS 1.7.1

PATCH In review Ian Campbell 2 participants 4 messages Jan 4, 2013 – Jan 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: Update to SeaBIOS 1.7.1

Only lightly tested with a Linux HVM guest PXE boot.

Accept the defaults for the config options. Many of them are not relevant to Xen but this matches what others (at least the Debian SeaBIOS packages and the binary shipped by Qemu) are doing. The Debian Xen packages are built against Debian's SeaBIOS package so there is value in being similar.

--
I have already pushed the tag to git://xenbits.xen.org/seabios.git

---
 Config.mk                     |    6 +++---
 tools/firmware/seabios-config |   21 +++++++++++++++++++--
 2 files changed, 22 insertions(+), 5 deletions(-)
Config.mk +3 -3
index a7d7f79..910eba9 100644
@@ -209,9 +209,9 @@ SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
 OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
 QEMU_UPSTREAM_REVISION ?= master
-SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
-# Sun Mar 11 09:27:07 2012 -0400
-# Update version to 1.6.3.2
+SEABIOS_UPSTREAM_TAG ?= rel-1.7.1
+# Wed Aug 29 21:27:37 2012 -0400
+# Make iasl option check work with older versions of iasl.
 
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
tools/firmware/seabios-config +19 -2
index 202d15f..3a36fd1 100644
@@ -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
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 1 line · Ian Campbell

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<-----

Quoted 1 line

From ae3598b2488b0cd23b32074f8bd37b3399c9b374 Mon Sep 17 00:00:00 2001

From: Ian Campbell <[email protected]>
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.

---
 .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
.gitignore +1 -0
index f71cff8..4bc07bc 100644
@@ -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
.hgignore +1 -0
index 344792a..41e61c1 100644
@@ -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$
config/Tools.mk.in +1 -1
index 3967e7d..65a4356 100644
@@ -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@
tools/configure +13 -13
index f9d1925..06c8b75 100755
@@ -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
 
 
 
tools/configure.ac +1 -1
index 586313d..1cd4ffa 100644
@@ -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],
tools/firmware/Makefile +14 -2
index aff8e56..5b54bf8 100644
@@ -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
tools/firmware/hvmloader/Makefile +1 -4
index c6e7376..4b5a3cb 100644
@@ -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
tools/firmware/seabios-config +19 -2
index 202d15f..3a36fd1 100644
@@ -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
tools/firmware/seabios.bin_shipped new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..d3130d45a1e6675da38887d7c32099c2455de54e
GIT binary patch

<...snipped...>

Signature · 1 line
1.7.2.5
Acked-by on v1 1/1
#2 lore raw
In reply to Ian Campbell

Ian Campbell writes ("[PATCH] tools: Update to SeaBIOS 1.7.1"):

Quoted 11 lines

Only lightly tested with a Linux HVM guest PXE boot.

Accept the defaults for the config options. Many of them are not relevant to Xen but this matches what others (at least the Debian SeaBIOS packages and the binary shipped by Qemu) are doing. The Debian Xen packages are built against Debian's SeaBIOS package so there is value in being similar.

--
I have already pushed the tag to git://xenbits.xen.org/seabios.git

author Applied
#3 lore raw
Quoted 9 lines · Ian Jackson

Ian Campbell writes ("[PATCH] tools: Update to SeaBIOS 1.7.1"):

Quoted 8 lines

Only lightly tested with a Linux HVM guest PXE boot.

Accept the defaults for the config options. Many of them are not relevant to Xen but this matches what others (at least the Debian SeaBIOS packages and the binary shipped by Qemu) are doing. The Debian Xen packages are built against Debian's SeaBIOS package so there is value in being similar.

Quoted 5 lines
Quoted 3 lines

--
I have already pushed the tag to git://xenbits.xen.org/seabios.git

Applied, thanks.