xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: keir@xen.org, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com
Subject: [PATCH v2 4/4] Clone and build Seabios by default
Date: Thu, 8 Sep 2011 18:47:18 +0100	[thread overview]
Message-ID: <1315504038-21733-4-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <1315504038-21733-1-git-send-email-stefano.stabellini@eu.citrix.com>

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

diff -r ef27b472d4f3 Config.mk
--- a/Config.mk	Thu Sep 08 17:19:12 2011 +0000
+++ b/Config.mk	Thu Sep 08 17:29:50 2011 +0000
@@ -195,6 +195,8 @@ endif
 # Only available through the git protocol at the moment
 QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/people/sstabellini/qemu-dm.git
 QEMU_UPSTREAM_TAG ?= origin/xen-stable-0.15
+SEABIOS_UPSTREAM_URL=git://git.qemu.org/seabios.git
+SEABIOS_UPSTREAM_TAG ?= 7fc039e9c262b4199fab497f3e12f4e425c37560
 
 # Specify which qemu-dm to use. This may be `ioemu' to use the old
 # Mercurial in-tree version, or a local directory, or a git URL.
@@ -208,15 +210,6 @@ QEMU_TAG ?= cd776ee9408ff127f934a707c1a3
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.
 
-# SeaBIOS integration is a work in progress. Before enabling this
-# option you must clone git://git.qemu.org/seabios.git/, possibly add
-# some development patches and then build it yourself before pointing
-# this variable to it (using an absolute path).
-#
-# Note that using SeaBIOS requires the use the upstream qemu as the
-# device model.
-SEABIOS_DIR ?= 
-
 # Optional components
 XENSTAT_XENTOP     ?= y
 VTPM_TOOLS         ?= n
diff -r ef27b472d4f3 tools/firmware/Makefile
--- a/tools/firmware/Makefile	Thu Sep 08 17:19:12 2011 +0000
+++ b/tools/firmware/Makefile	Thu Sep 08 17:29:50 2011 +0000
@@ -4,15 +4,35 @@ include $(XEN_ROOT)/tools/Rules.mk
 # hvmloader is a 32-bit protected mode binary.
 TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
+SEABIOS_DIR := seabios-dir
 
 SUBDIRS :=
+SUBDIRS += $(SEABIOS_DIR)
 SUBDIRS += rombios
 SUBDIRS += vgabios
 SUBDIRS += etherboot
 SUBDIRS += hvmloader
 
+$(SEABIOS_DIR):
+	set -ex; \
+	if [ ! -d seabios-remote ]; then \
+		rm -rf seabios-remote seabios-remote.tmp; \
+		mkdir seabios-remote.tmp; rmdir seabios-remote.tmp; \
+		$(GIT) clone $(SEABIOS_UPSTREAM_URL) seabios-remote.tmp; \
+		if [ "$(SEABIOS_UPSTREAM_TAG)" ]; then			\
+			cd seabios-remote.tmp;			\
+			$(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
+			$(GIT) checkout -b dummy $(SEABIOS_UPSTREAM_TAG);	\
+			cd ..;					\
+		fi;						\
+		mv seabios-remote.tmp seabios-remote; \
+	fi; \
+	rm -f seabios-dir; \
+	ln -sf seabios-remote seabios-dir; \
+	cp seabios-config seabios-dir/.config;
+
 .PHONY: all
-all:
+all: $(SEABIOS_DIR)
 	@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 "==========================================================================="; \
 	echo "Require dev86 rpm or bin86 & bcc debs version >= 0.16.14 to build firmware!"; \
@@ -35,4 +55,7 @@ clean: subdirs-clean
 distclean: subdirs-distclean
 
 subdir-distclean-etherboot: .phony
-	$(MAKE) -C etherboot distclean
\ No newline at end of file
+	$(MAKE) -C etherboot distclean
+
+subdir-distclean-$(SEABIOS_DIR): .phony
+	rm -rf seabios-dir seabios-remote
diff -r ef27b472d4f3 tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile	Thu Sep 08 17:19:12 2011 +0000
+++ b/tools/firmware/hvmloader/Makefile	Thu Sep 08 17:29:50 2011 +0000
@@ -47,7 +47,7 @@ endif
 ifneq ($(SEABIOS_DIR),)
 OBJS += seabios.o
 CFLAGS += -DENABLE_SEABIOS
-SEABIOS_ROM := $(SEABIOS_DIR)/out/bios.bin
+SEABIOS_ROM := ../$(SEABIOS_DIR)/out/bios.bin
 endif
 
 STDVGA_ROM    := ../vgabios/VGABIOS-lgpl-latest.bin
diff -r ef27b472d4f3 tools/firmware/seabios-config
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/seabios-config	Thu Sep 08 17:29:50 2011 +0000
@@ -0,0 +1,73 @@
+#
+# Automatically generated make config: don't edit
+# SeaBIOS Configuration
+# Wed Sep  7 13:03:21 2011
+#
+
+#
+# General Features
+#
+# CONFIG_COREBOOT is not set
+CONFIG_XEN=y
+CONFIG_THREADS=y
+# CONFIG_THREAD_OPTIONROMS is not set
+CONFIG_RELOCATE_INIT=y
+CONFIG_BOOTMENU=y
+# CONFIG_BOOTSPLASH is not set
+CONFIG_BOOTORDER=y
+
+#
+# Hardware support
+#
+CONFIG_ATA=y
+CONFIG_ATA_DMA=y
+CONFIG_ATA_PIO32=y
+CONFIG_AHCI=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_FLOPPY=y
+CONFIG_PS2PORT=y
+CONFIG_USB=y
+CONFIG_USB_UHCI=y
+CONFIG_USB_OHCI=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_MSC=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_MTRR_INIT=y
+
+#
+# BIOS interfaces
+#
+CONFIG_DRIVES=y
+CONFIG_CDROM_BOOT=y
+CONFIG_CDROM_EMU=y
+CONFIG_PCIBIOS=y
+CONFIG_APMBIOS=y
+CONFIG_PNPBIOS=y
+CONFIG_OPTIONROMS=y
+# CONFIG_OPTIONROMS_DEPLOYED is not set
+CONFIG_PMM=y
+CONFIG_BOOT=y
+CONFIG_KEYBOARD=y
+CONFIG_KBD_CALL_INT15_4F=y
+CONFIG_MOUSE=y
+CONFIG_S3_RESUME=y
+# CONFIG_DISABLE_A20 is not set
+
+#
+# BIOS Tables
+#
+CONFIG_PIRTABLE=y
+CONFIG_MPTABLE=y
+CONFIG_SMBIOS=y
+CONFIG_ACPI=y
+
+#
+# Debugging
+#
+CONFIG_DEBUG_LEVEL=1
+# CONFIG_DEBUG_SERIAL is not set

  parent reply	other threads:[~2011-09-08 17:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 17:47 [PATCH v2 1/4] Move the ioemu-dir-find shell script to an external file stefano.stabellini
2011-09-08 17:47 ` [PATCH v2 2/4] Rename ioemu-dir as qemu-xen-traditional-dir stefano.stabellini
2011-09-08 17:47 ` [PATCH v2 3/4] Clone and build upstream Qemu by default stefano.stabellini
2011-09-08 17:56   ` Ian Campbell
2011-09-09 10:18     ` Stefano Stabellini
2011-09-09 13:59       ` Ian Campbell
2011-09-09 14:31         ` Ian Campbell
2011-09-09 16:43         ` Stefano Stabellini
2011-09-09 17:18           ` Ian Campbell
2011-09-08 17:47 ` stefano.stabellini [this message]
2011-09-08 18:00   ` [PATCH v2 4/4] Clone and build Seabios " Ian Campbell
2011-09-09 10:19     ` Stefano Stabellini
2011-09-09 10:36       ` George Dunlap
2011-09-09 10:46         ` Stefano Stabellini
2011-09-09 11:23           ` Keir Fraser
2011-09-09 14:13       ` Ian Campbell
2011-09-09 14:32         ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315504038-21733-4-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).