All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] build upstream qemu and seabios by default
@ 2011-09-15 14:55 Stefano Stabellini
  2011-09-15 14:56 ` # Parent 0312575dc35e4294eb50e365b2c10078914daca8 stefano.stabellini
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Stefano Stabellini @ 2011-09-15 14:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser, Ian Campbell, Stefano Stabellini

Hi all,
this is the fourth version of the patch series to introduce upstream qemu
and seabios in the xen-unstable build system.


Changes to v3:

- reduce the scope of git-checkout.sh, now it only does what the name
says; calling "configure" is responsibility of the caller. As a result
of this change, the build still works when the user specifies a local
directory in the CONFIG_QEMU environmental variable;

- use a more official qemu repository hosted on xenbits;

- use a changeset as QEMU_UPSTREAM_TAG rather than a branch name.



Changes to v2:

- move tools/git-checkout.sh to scripts/git-checkout.sh;

- use git-checkout.sh for seabios;

- improve seabios integration with tools/firmware make system;

- add qemu-xen-traditional, qemu-xen and seabios dir entries to
.hgignore.



Changes to v1:

- always build upstream qemu and seabios, rather than introducing them
as an option.


Cheers,

Stefano

^ permalink raw reply	[flat|nested] 13+ messages in thread

* # Parent 0312575dc35e4294eb50e365b2c10078914daca8
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
@ 2011-09-15 14:56 ` stefano.stabellini
  2011-09-15 14:56 ` stefano.stabellini
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 14:56 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

Subject: [PATCH v3 1/4] Introduce git-checkout.sh

Introduce a script to perform git checkout on an external git tree; use
git-checkout.sh in ioemu-dir-find.

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

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -291,7 +291,7 @@
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^tools/xm-test/tests/.*\.test$
-^tools/ioemu-remote
+^tools/ioemu-dir-remote
 ^tools/ioemu-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
new file mode 100755
--- /dev/null
+++ b/scripts/git-checkout.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+TREE=$1
+TAG=$2
+DIR=$3
+
+
+if test \! -d $DIR-remote; then
+	rm -rf $DIR-remote $DIR-remote.tmp;
+	mkdir $DIR-remote.tmp; rmdir $DIR-remote.tmp;
+	git clone $TREE $DIR-remote.tmp;
+	if test "$TAG" ; then
+		cd $DIR-remote.tmp
+		git branch -D dummy >/dev/null 2>&1 ||:
+		git checkout -b dummy $TAG
+		cd ..
+	fi
+	mv $DIR-remote.tmp $DIR-remote
+fi
+rm -f $DIR
+ln -sf $DIR-remote $DIR
diff --git a/tools/Makefile b/tools/Makefile
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -70,7 +70,7 @@ clean: subdirs-clean
 
 .PHONY: distclean
 distclean: subdirs-distclean
-	rm -rf ioemu-dir ioemu-remote
+	rm -rf ioemu-dir ioemu-dir-remote
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
@@ -88,20 +88,7 @@ ioemu-dir-find:
 	if test -d $(CONFIG_QEMU); then \
 		mkdir -p ioemu-dir; \
 	else \
-		if [ ! -d ioemu-remote ]; then \
-			rm -rf ioemu-remote ioemu-remote.tmp; \
-			mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
-			$(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
-			if [ "$(QEMU_TAG)" ]; then			\
-				cd ioemu-remote.tmp;			\
-				$(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
-				$(GIT) checkout -b dummy $(QEMU_TAG);	\
-				cd ..;					\
-			fi;						\
-			mv ioemu-remote.tmp ioemu-remote; \
-		fi; \
-		rm -f ioemu-dir; \
-		ln -sf ioemu-remote ioemu-dir; \
+		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) ioemu-dir; \
 	fi
 	set -e; \
 		$(buildmakevars2shellvars); \
@@ -112,7 +99,7 @@ ioemu-dir-find:
 ioemu-dir-force-update:
 	set -ex; \
 	if [ "$(QEMU_TAG)" ]; then \
-		cd ioemu-remote; \
+		cd ioemu-dir-remote; \
 		$(GIT) fetch origin; \
 		$(GIT) reset --hard $(QEMU_TAG); \
 	fi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* # Parent 0312575dc35e4294eb50e365b2c10078914daca8
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
  2011-09-15 14:56 ` # Parent 0312575dc35e4294eb50e365b2c10078914daca8 stefano.stabellini
@ 2011-09-15 14:56 ` stefano.stabellini
  2011-09-15 14:56 ` stefano.stabellini
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 14:56 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

Subject: [PATCH v3 2/4] Rename ioemu-dir as qemu-xen-traditional-dir

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

diff -r 1993c6e145b5 .hgignore
--- a/.hgignore	Thu Sep 15 09:38:49 2011 +0000
+++ b/.hgignore	Thu Sep 15 11:08:51 2011 +0000
@@ -291,8 +291,8 @@
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^tools/xm-test/tests/.*\.test$
-^tools/ioemu-dir-remote
-^tools/ioemu-dir$
+^tools/qemu-xen-traditional-dir-remote
+^tools/qemu-xen-traditional-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff -r 1993c6e145b5 Makefile
--- a/Makefile	Thu Sep 15 09:38:49 2011 +0000
+++ b/Makefile	Thu Sep 15 11:08:51 2011 +0000
@@ -70,7 +70,7 @@ install-tools:
 	$(MAKE) -C tools install
 
 ifeq ($(CONFIG_IOEMU),y)
-install-tools: tools/ioemu-dir
+install-tools: tools/qemu-xen-traditional-dir
 endif
 
 .PHONY: install-kernels
@@ -78,18 +78,18 @@ install-kernels:
 	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
-install-stubdom: tools/ioemu-dir install-tools
+install-stubdom: tools/qemu-xen-traditional-dir install-tools
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
 endif
 
-tools/ioemu-dir:
-	$(MAKE) -C tools ioemu-dir-find
+tools/qemu-xen-traditional-dir:
+	$(MAKE) -C tools qemu-xen-traditional-dir-find
 
-.PHONY: tools/ioemu-dir-force-update
-tools/ioemu-dir-force-update:
-	$(MAKE) -C tools ioemu-dir-force-update
+.PHONY: tools/qemu-xen-traditional-dir-force-update
+tools/qemu-xen-traditional-dir-force-update:
+	$(MAKE) -C tools qemu-xen-traditional-dir-force-update
 
 .PHONY: install-docs
 install-docs:
diff -r 1993c6e145b5 stubdom/Makefile
--- a/stubdom/Makefile	Thu Sep 15 09:38:49 2011 +0000
+++ b/stubdom/Makefile	Thu Sep 15 11:08:51 2011 +0000
@@ -218,15 +218,15 @@ cross-ocaml: $(OCAML_STAMPFILE)
 QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
 
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/ioemu-dir:
-	$(CROSS_MAKE) -C $(XEN_ROOT)/tools ioemu-dir-find
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+	$(CROSS_MAKE) -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 
-ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/ioemu-dir
+ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir
 	mkdir -p ioemu
 	set -e;									\
 	$(buildmakevars2shellvars);						\
 	cd ioemu;								\
-	src="$$XEN_ROOT/tools/ioemu-dir"; export src;				\
+	src="$$XEN_ROOT/tools/qemu-xen-traditional-dir"; export src;		\
 	(cd $$src && find * -type d -print) | xargs mkdir -p;			\
 	(cd $$src && find *	! -type l  -type f  $(addprefix ! -name ,	\
 			'*.[oda1]' 'config-*' config.mak qemu-dm qemu-img-xen	\
diff -r 1993c6e145b5 tools/Makefile
--- a/tools/Makefile	Thu Sep 15 09:38:49 2011 +0000
+++ b/tools/Makefile	Thu Sep 15 11:08:51 2011 +0000
@@ -30,7 +30,7 @@ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
 
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"
-SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
+SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-traditional-dir
 endif
 
 SUBDIRS-y += xenpmd
@@ -70,7 +70,7 @@ clean: subdirs-clean
 
 .PHONY: distclean
 distclean: subdirs-distclean
-	rm -rf ioemu-dir ioemu-dir-remote
+	rm -rf qemu-xen-traditional-dir qemu-xen-traditional-dir-remote
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
@@ -83,33 +83,33 @@ ifneq ($(QEMU_ROOT),.)
 export QEMU_ROOT
 endif
 
-ioemu-dir-find:
+qemu-xen-traditional-dir-find:
 	set -ex; \
 	if test -d $(CONFIG_QEMU); then \
-		mkdir -p ioemu-dir; \
+		mkdir -p qemu-xen-traditional-dir; \
 	else \
-		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) ioemu-dir; \
+		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir; \
 	fi
 	set -e; \
 		$(buildmakevars2shellvars); \
-		cd ioemu-dir; \
+		cd qemu-xen-traditional-dir; \
 		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS)
 
-.PHONY: ioemu-dir-force-update
-ioemu-dir-force-update:
+.PHONY: qemu-xen-traditional-dir-force-update
+qemu-xen-traditional-dir-force-update:
 	set -ex; \
 	if [ "$(QEMU_TAG)" ]; then \
-		cd ioemu-dir-remote; \
+		cd qemu-xen-traditional-dir-remote; \
 		$(GIT) fetch origin; \
 		$(GIT) reset --hard $(QEMU_TAG); \
 	fi
 
-subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
+subdir-all-qemu-xen-traditional-dir subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
 
-subdir-clean-ioemu-dir:
-	set -e; if test -d ioemu-dir/.; then \
+subdir-clean-qemu-xen-traditional-dir:
+	set -e; if test -d qemu-xen-traditional-dir/.; then \
 		$(buildmakevars2shellvars); \
-		$(MAKE) -C ioemu-dir clean; \
+		$(MAKE) -C qemu-xen-traditional-dir clean; \
 	fi
 
 subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* # Parent 0312575dc35e4294eb50e365b2c10078914daca8
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
  2011-09-15 14:56 ` # Parent 0312575dc35e4294eb50e365b2c10078914daca8 stefano.stabellini
  2011-09-15 14:56 ` stefano.stabellini
@ 2011-09-15 14:56 ` stefano.stabellini
  2011-09-15 14:56 ` stefano.stabellini
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 14:56 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

Subject: [PATCH v3 2/4] Clone and build upstream Qemu by default

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

diff -r b17ff49b17d1 .hgignore
--- a/.hgignore	Thu Sep 15 11:38:01 2011 +0000
+++ b/.hgignore	Thu Sep 15 14:24:05 2011 +0000
@@ -293,6 +293,8 @@
 ^tools/xm-test/tests/.*\.test$
 ^tools/qemu-xen-traditional-dir-remote
 ^tools/qemu-xen-traditional-dir$
+^tools/qemu-xen-dir-remote
+^tools/qemu-xen-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff -r b17ff49b17d1 Config.mk
--- a/Config.mk	Thu Sep 15 11:38:01 2011 +0000
+++ b/Config.mk	Thu Sep 15 14:24:05 2011 +0000
@@ -192,6 +192,14 @@ else
 QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git
 endif
 
+# Only available through the git protocol at the moment
+ifeq ($(GIT_HTTP),y)
+QEMU_UPSTREAM_URL ?= http://xenbits.xensource.com/git-http/qemu-upstream-unstable.git
+else
+QEMU_UPSTREAM_URL ?= git://xenbits.xensource.com/qemu-upstream-unstable.git
+endif
+QEMU_UPSTREAM_TAG ?= 6dd84c71dff047f9e492d67e7c99928d09202760
+
 # 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.
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
diff -r b17ff49b17d1 Makefile
--- a/Makefile	Thu Sep 15 11:38:01 2011 +0000
+++ b/Makefile	Thu Sep 15 14:24:05 2011 +0000
@@ -70,7 +70,7 @@ install-tools:
 	$(MAKE) -C tools install
 
 ifeq ($(CONFIG_IOEMU),y)
-install-tools: tools/qemu-xen-traditional-dir
+install-tools: tools/qemu-xen-traditional-dir tools/qemu-xen-dir
 endif
 
 .PHONY: install-kernels
@@ -91,6 +91,9 @@ tools/qemu-xen-traditional-dir:
 tools/qemu-xen-traditional-dir-force-update:
 	$(MAKE) -C tools qemu-xen-traditional-dir-force-update
 
+tools/qemu-xen-dir:
+	$(MAKE) -C tools qemu-xen-dir-find
+
 .PHONY: install-docs
 install-docs:
 	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
diff -r b17ff49b17d1 tools/Makefile
--- a/tools/Makefile	Thu Sep 15 11:38:01 2011 +0000
+++ b/tools/Makefile	Thu Sep 15 14:24:05 2011 +0000
@@ -31,6 +31,7 @@ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"
 SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-traditional-dir
+SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-dir
 endif
 
 SUBDIRS-y += xenpmd
@@ -71,6 +72,7 @@ clean: subdirs-clean
 .PHONY: distclean
 distclean: subdirs-distclean
 	rm -rf qemu-xen-traditional-dir qemu-xen-traditional-dir-remote
+	rm -rf qemu-xen-dir qemu-xen-dir-remote
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
@@ -95,6 +97,24 @@ qemu-xen-traditional-dir-find:
 		cd qemu-xen-traditional-dir; \
 		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS)
 
+qemu-xen-dir-find:
+	if test -d $(QEMU_UPSTREAM_URL) ; then \
+		ln -sf $(QEMU_UPSTREAM_URL) qemu-xen-dir; \
+	else \
+		$(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_URL) $(QEMU_UPSTREAM_TAG) qemu-xen-dir ; \
+	fi
+	cd qemu-xen-dir; \
+	./configure --enable-xen --target-list=i386-softmmu \
+		--source-path=$$ROOT \
+		--extra-cflags="-I$(XEN_ROOT)/tools/include \
+		-I$(XEN_ROOT)/tools/libxc \
+		-I$(XEN_ROOT)/tools/xenstore" \
+		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
+		-L$(XEN_ROOT)/tools/libxenstore" \
+		--bindir=/usr/lib/xen/bin \
+		--disable-kvm \
+		$(IOEMU_CONFIGURE_CROSS)
+
 .PHONY: qemu-xen-traditional-dir-force-update
 qemu-xen-traditional-dir-force-update:
 	set -ex; \
@@ -112,6 +132,14 @@ subdir-clean-qemu-xen-traditional-dir:
 		$(MAKE) -C qemu-xen-traditional-dir clean; \
 	fi
 
+subdir-all-qemu-xen-dir subdir-install-qemu-xen-dir: qemu-xen-dir-find
+
+subdir-clean-qemu-xen-dir:
+	set -e; if test -d qemu-xen-dir/.; then \
+		$(buildmakevars2shellvars); \
+		$(MAKE) -C qemu-xen-dir clean; \
+	fi
+
 subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony
 	$(MAKE) -C debugger/gdbsx clean

^ permalink raw reply	[flat|nested] 13+ messages in thread

* # Parent 0312575dc35e4294eb50e365b2c10078914daca8
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
                   ` (2 preceding siblings ...)
  2011-09-15 14:56 ` stefano.stabellini
@ 2011-09-15 14:56 ` stefano.stabellini
  2011-09-15 15:00 ` [PATCH v4 1/4] Introduce git-checkout.sh stefano.stabellini
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 14:56 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

Subject: [PATCH v3 2/4] Clone and build Seabios by default

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

diff -r 9832a4edea7f .hgignore
--- a/.hgignore	Thu Sep 15 14:25:11 2011 +0000
+++ b/.hgignore	Thu Sep 15 14:37:33 2011 +0000
@@ -295,6 +295,8 @@
 ^tools/qemu-xen-traditional-dir$
 ^tools/qemu-xen-dir-remote
 ^tools/qemu-xen-dir$
+^tools/tools/firmware/seabios-dir-remote
+^tools/tools/firmware/seabios-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff -r 9832a4edea7f Config.mk
--- a/Config.mk	Thu Sep 15 14:25:11 2011 +0000
+++ b/Config.mk	Thu Sep 15 14:37:33 2011 +0000
@@ -199,6 +199,8 @@ else
 QEMU_UPSTREAM_URL ?= git://xenbits.xensource.com/qemu-upstream-unstable.git
 endif
 QEMU_UPSTREAM_TAG ?= 6dd84c71dff047f9e492d67e7c99928d09202760
+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.
@@ -212,15 +214,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 9832a4edea7f tools/firmware/Makefile
--- a/tools/firmware/Makefile	Thu Sep 15 14:25:11 2011 +0000
+++ b/tools/firmware/Makefile	Thu Sep 15 14:37:33 2011 +0000
@@ -6,13 +6,18 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
 SUBDIRS :=
+SUBDIRS += seabios-dir
 SUBDIRS += rombios
 SUBDIRS += vgabios
 SUBDIRS += etherboot
 SUBDIRS += hvmloader
 
+seabios-dir:
+	$(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_TAG) 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 +40,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-dir-remote
diff -r 9832a4edea7f tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile	Thu Sep 15 14:25:11 2011 +0000
+++ b/tools/firmware/hvmloader/Makefile	Thu Sep 15 14:37:33 2011 +0000
@@ -44,6 +44,7 @@ CFLAGS += -DENABLE_ROMBIOS
 ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-bochs-latest
 endif
 
+SEABIOS_DIR := ../seabios-dir
 ifneq ($(SEABIOS_DIR),)
 OBJS += seabios.o
 CFLAGS += -DENABLE_SEABIOS
diff -r 9832a4edea7f tools/firmware/seabios-config
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/seabios-config	Thu Sep 15 14:37:33 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 3/4] Clone and build upstream Qemu by default
  2011-09-15 15:00 ` [PATCH v4 3/4] Clone and build upstream Qemu by default stefano.stabellini
@ 2011-09-15 15:00   ` Ian Campbell
  2011-09-21  9:50     ` Stefano Stabellini
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Campbell @ 2011-09-15 15:00 UTC (permalink / raw)
  To: stefano.stabellini@eu.citrix.com
  Cc: Ian Jackson, xen-devel@lists.xensource.com, keir@xen.org

On Thu, 2011-09-15 at 11:00 -0400, stefano.stabellini@eu.citrix.com
wrote:
> 
> +# Only available through the git protocol at the moment

This comment is now out of date...

> +ifeq ($(GIT_HTTP),y)
> +QEMU_UPSTREAM_URL ?= http://xenbits.xensource.com/git-http/qemu-upstream-unstable.git
> +else
> +QEMU_UPSTREAM_URL ?= git://xenbits.xensource.com/qemu-upstream-unstable.git
> +endif
> +QEMU_UPSTREAM_TAG ?= 6dd84c71dff047f9e492d67e7c99928d09202760
> + 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v4 1/4] Introduce git-checkout.sh
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
                   ` (3 preceding siblings ...)
  2011-09-15 14:56 ` stefano.stabellini
@ 2011-09-15 15:00 ` stefano.stabellini
  2011-09-15 15:16   ` Christoph Egger
  2011-09-15 15:00 ` [PATCH v4 2/4] Rename ioemu-dir as qemu-xen-traditional-dir stefano.stabellini
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 15:00 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

Introduce a script to perform git checkout on an external git tree; use
git-checkout.sh in ioemu-dir-find.

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

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -291,7 +291,7 @@
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^tools/xm-test/tests/.*\.test$
-^tools/ioemu-remote
+^tools/ioemu-dir-remote
 ^tools/ioemu-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
new file mode 100755
--- /dev/null
+++ b/scripts/git-checkout.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+TREE=$1
+TAG=$2
+DIR=$3
+
+
+if test \! -d $DIR-remote; then
+	rm -rf $DIR-remote $DIR-remote.tmp;
+	mkdir $DIR-remote.tmp; rmdir $DIR-remote.tmp;
+	git clone $TREE $DIR-remote.tmp;
+	if test "$TAG" ; then
+		cd $DIR-remote.tmp
+		git branch -D dummy >/dev/null 2>&1 ||:
+		git checkout -b dummy $TAG
+		cd ..
+	fi
+	mv $DIR-remote.tmp $DIR-remote
+fi
+rm -f $DIR
+ln -sf $DIR-remote $DIR
diff --git a/tools/Makefile b/tools/Makefile
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -70,7 +70,7 @@ clean: subdirs-clean
 
 .PHONY: distclean
 distclean: subdirs-distclean
-	rm -rf ioemu-dir ioemu-remote
+	rm -rf ioemu-dir ioemu-dir-remote
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
@@ -88,20 +88,7 @@ ioemu-dir-find:
 	if test -d $(CONFIG_QEMU); then \
 		mkdir -p ioemu-dir; \
 	else \
-		if [ ! -d ioemu-remote ]; then \
-			rm -rf ioemu-remote ioemu-remote.tmp; \
-			mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
-			$(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
-			if [ "$(QEMU_TAG)" ]; then			\
-				cd ioemu-remote.tmp;			\
-				$(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
-				$(GIT) checkout -b dummy $(QEMU_TAG);	\
-				cd ..;					\
-			fi;						\
-			mv ioemu-remote.tmp ioemu-remote; \
-		fi; \
-		rm -f ioemu-dir; \
-		ln -sf ioemu-remote ioemu-dir; \
+		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) ioemu-dir; \
 	fi
 	set -e; \
 		$(buildmakevars2shellvars); \
@@ -112,7 +99,7 @@ ioemu-dir-find:
 ioemu-dir-force-update:
 	set -ex; \
 	if [ "$(QEMU_TAG)" ]; then \
-		cd ioemu-remote; \
+		cd ioemu-dir-remote; \
 		$(GIT) fetch origin; \
 		$(GIT) reset --hard $(QEMU_TAG); \
 	fi

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v4 2/4] Rename ioemu-dir as qemu-xen-traditional-dir
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
                   ` (4 preceding siblings ...)
  2011-09-15 15:00 ` [PATCH v4 1/4] Introduce git-checkout.sh stefano.stabellini
@ 2011-09-15 15:00 ` stefano.stabellini
  2011-09-15 15:00 ` [PATCH v4 3/4] Clone and build upstream Qemu by default stefano.stabellini
  2011-09-15 15:00 ` [PATCH v4 4/4] Clone and build Seabios " stefano.stabellini
  7 siblings, 0 replies; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 15:00 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

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

diff -r 1993c6e145b5 .hgignore
--- a/.hgignore	Thu Sep 15 09:38:49 2011 +0000
+++ b/.hgignore	Thu Sep 15 11:08:51 2011 +0000
@@ -291,8 +291,8 @@
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^tools/xm-test/tests/.*\.test$
-^tools/ioemu-dir-remote
-^tools/ioemu-dir$
+^tools/qemu-xen-traditional-dir-remote
+^tools/qemu-xen-traditional-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff -r 1993c6e145b5 Makefile
--- a/Makefile	Thu Sep 15 09:38:49 2011 +0000
+++ b/Makefile	Thu Sep 15 11:08:51 2011 +0000
@@ -70,7 +70,7 @@ install-tools:
 	$(MAKE) -C tools install
 
 ifeq ($(CONFIG_IOEMU),y)
-install-tools: tools/ioemu-dir
+install-tools: tools/qemu-xen-traditional-dir
 endif
 
 .PHONY: install-kernels
@@ -78,18 +78,18 @@ install-kernels:
 	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
-install-stubdom: tools/ioemu-dir install-tools
+install-stubdom: tools/qemu-xen-traditional-dir install-tools
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
 endif
 
-tools/ioemu-dir:
-	$(MAKE) -C tools ioemu-dir-find
+tools/qemu-xen-traditional-dir:
+	$(MAKE) -C tools qemu-xen-traditional-dir-find
 
-.PHONY: tools/ioemu-dir-force-update
-tools/ioemu-dir-force-update:
-	$(MAKE) -C tools ioemu-dir-force-update
+.PHONY: tools/qemu-xen-traditional-dir-force-update
+tools/qemu-xen-traditional-dir-force-update:
+	$(MAKE) -C tools qemu-xen-traditional-dir-force-update
 
 .PHONY: install-docs
 install-docs:
diff -r 1993c6e145b5 stubdom/Makefile
--- a/stubdom/Makefile	Thu Sep 15 09:38:49 2011 +0000
+++ b/stubdom/Makefile	Thu Sep 15 11:08:51 2011 +0000
@@ -218,15 +218,15 @@ cross-ocaml: $(OCAML_STAMPFILE)
 QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
 
 ifeq ($(QEMU_ROOT),.)
-$(XEN_ROOT)/tools/ioemu-dir:
-	$(CROSS_MAKE) -C $(XEN_ROOT)/tools ioemu-dir-find
+$(XEN_ROOT)/tools/qemu-xen-traditional-dir:
+	$(CROSS_MAKE) -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find
 
-ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/ioemu-dir
+ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/qemu-xen-traditional-dir
 	mkdir -p ioemu
 	set -e;									\
 	$(buildmakevars2shellvars);						\
 	cd ioemu;								\
-	src="$$XEN_ROOT/tools/ioemu-dir"; export src;				\
+	src="$$XEN_ROOT/tools/qemu-xen-traditional-dir"; export src;		\
 	(cd $$src && find * -type d -print) | xargs mkdir -p;			\
 	(cd $$src && find *	! -type l  -type f  $(addprefix ! -name ,	\
 			'*.[oda1]' 'config-*' config.mak qemu-dm qemu-img-xen	\
diff -r 1993c6e145b5 tools/Makefile
--- a/tools/Makefile	Thu Sep 15 09:38:49 2011 +0000
+++ b/tools/Makefile	Thu Sep 15 11:08:51 2011 +0000
@@ -30,7 +30,7 @@ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
 
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"
-SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
+SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-traditional-dir
 endif
 
 SUBDIRS-y += xenpmd
@@ -70,7 +70,7 @@ clean: subdirs-clean
 
 .PHONY: distclean
 distclean: subdirs-distclean
-	rm -rf ioemu-dir ioemu-dir-remote
+	rm -rf qemu-xen-traditional-dir qemu-xen-traditional-dir-remote
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
@@ -83,33 +83,33 @@ ifneq ($(QEMU_ROOT),.)
 export QEMU_ROOT
 endif
 
-ioemu-dir-find:
+qemu-xen-traditional-dir-find:
 	set -ex; \
 	if test -d $(CONFIG_QEMU); then \
-		mkdir -p ioemu-dir; \
+		mkdir -p qemu-xen-traditional-dir; \
 	else \
-		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) ioemu-dir; \
+		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir; \
 	fi
 	set -e; \
 		$(buildmakevars2shellvars); \
-		cd ioemu-dir; \
+		cd qemu-xen-traditional-dir; \
 		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS)
 
-.PHONY: ioemu-dir-force-update
-ioemu-dir-force-update:
+.PHONY: qemu-xen-traditional-dir-force-update
+qemu-xen-traditional-dir-force-update:
 	set -ex; \
 	if [ "$(QEMU_TAG)" ]; then \
-		cd ioemu-dir-remote; \
+		cd qemu-xen-traditional-dir-remote; \
 		$(GIT) fetch origin; \
 		$(GIT) reset --hard $(QEMU_TAG); \
 	fi
 
-subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
+subdir-all-qemu-xen-traditional-dir subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
 
-subdir-clean-ioemu-dir:
-	set -e; if test -d ioemu-dir/.; then \
+subdir-clean-qemu-xen-traditional-dir:
+	set -e; if test -d qemu-xen-traditional-dir/.; then \
 		$(buildmakevars2shellvars); \
-		$(MAKE) -C ioemu-dir clean; \
+		$(MAKE) -C qemu-xen-traditional-dir clean; \
 	fi
 
 subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v4 3/4] Clone and build upstream Qemu by default
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
                   ` (5 preceding siblings ...)
  2011-09-15 15:00 ` [PATCH v4 2/4] Rename ioemu-dir as qemu-xen-traditional-dir stefano.stabellini
@ 2011-09-15 15:00 ` stefano.stabellini
  2011-09-15 15:00   ` Ian Campbell
  2011-09-15 15:00 ` [PATCH v4 4/4] Clone and build Seabios " stefano.stabellini
  7 siblings, 1 reply; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 15:00 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

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

diff -r b17ff49b17d1 .hgignore
--- a/.hgignore	Thu Sep 15 11:38:01 2011 +0000
+++ b/.hgignore	Thu Sep 15 14:24:05 2011 +0000
@@ -293,6 +293,8 @@
 ^tools/xm-test/tests/.*\.test$
 ^tools/qemu-xen-traditional-dir-remote
 ^tools/qemu-xen-traditional-dir$
+^tools/qemu-xen-dir-remote
+^tools/qemu-xen-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff -r b17ff49b17d1 Config.mk
--- a/Config.mk	Thu Sep 15 11:38:01 2011 +0000
+++ b/Config.mk	Thu Sep 15 14:24:05 2011 +0000
@@ -192,6 +192,14 @@ else
 QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git
 endif
 
+# Only available through the git protocol at the moment
+ifeq ($(GIT_HTTP),y)
+QEMU_UPSTREAM_URL ?= http://xenbits.xensource.com/git-http/qemu-upstream-unstable.git
+else
+QEMU_UPSTREAM_URL ?= git://xenbits.xensource.com/qemu-upstream-unstable.git
+endif
+QEMU_UPSTREAM_TAG ?= 6dd84c71dff047f9e492d67e7c99928d09202760
+
 # 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.
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
diff -r b17ff49b17d1 Makefile
--- a/Makefile	Thu Sep 15 11:38:01 2011 +0000
+++ b/Makefile	Thu Sep 15 14:24:05 2011 +0000
@@ -70,7 +70,7 @@ install-tools:
 	$(MAKE) -C tools install
 
 ifeq ($(CONFIG_IOEMU),y)
-install-tools: tools/qemu-xen-traditional-dir
+install-tools: tools/qemu-xen-traditional-dir tools/qemu-xen-dir
 endif
 
 .PHONY: install-kernels
@@ -91,6 +91,9 @@ tools/qemu-xen-traditional-dir:
 tools/qemu-xen-traditional-dir-force-update:
 	$(MAKE) -C tools qemu-xen-traditional-dir-force-update
 
+tools/qemu-xen-dir:
+	$(MAKE) -C tools qemu-xen-dir-find
+
 .PHONY: install-docs
 install-docs:
 	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
diff -r b17ff49b17d1 tools/Makefile
--- a/tools/Makefile	Thu Sep 15 11:38:01 2011 +0000
+++ b/tools/Makefile	Thu Sep 15 14:24:05 2011 +0000
@@ -31,6 +31,7 @@ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
 # do not recurse in to a dir we are about to delete
 ifneq "$(MAKECMDGOALS)" "distclean"
 SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-traditional-dir
+SUBDIRS-$(CONFIG_IOEMU) += qemu-xen-dir
 endif
 
 SUBDIRS-y += xenpmd
@@ -71,6 +72,7 @@ clean: subdirs-clean
 .PHONY: distclean
 distclean: subdirs-distclean
 	rm -rf qemu-xen-traditional-dir qemu-xen-traditional-dir-remote
+	rm -rf qemu-xen-dir qemu-xen-dir-remote
 
 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
@@ -95,6 +97,24 @@ qemu-xen-traditional-dir-find:
 		cd qemu-xen-traditional-dir; \
 		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS)
 
+qemu-xen-dir-find:
+	if test -d $(QEMU_UPSTREAM_URL) ; then \
+		ln -sf $(QEMU_UPSTREAM_URL) qemu-xen-dir; \
+	else \
+		$(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_URL) $(QEMU_UPSTREAM_TAG) qemu-xen-dir ; \
+	fi
+	cd qemu-xen-dir; \
+	./configure --enable-xen --target-list=i386-softmmu \
+		--source-path=$$ROOT \
+		--extra-cflags="-I$(XEN_ROOT)/tools/include \
+		-I$(XEN_ROOT)/tools/libxc \
+		-I$(XEN_ROOT)/tools/xenstore" \
+		--extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
+		-L$(XEN_ROOT)/tools/libxenstore" \
+		--bindir=/usr/lib/xen/bin \
+		--disable-kvm \
+		$(IOEMU_CONFIGURE_CROSS)
+
 .PHONY: qemu-xen-traditional-dir-force-update
 qemu-xen-traditional-dir-force-update:
 	set -ex; \
@@ -112,6 +132,14 @@ subdir-clean-qemu-xen-traditional-dir:
 		$(MAKE) -C qemu-xen-traditional-dir clean; \
 	fi
 
+subdir-all-qemu-xen-dir subdir-install-qemu-xen-dir: qemu-xen-dir-find
+
+subdir-clean-qemu-xen-dir:
+	set -e; if test -d qemu-xen-dir/.; then \
+		$(buildmakevars2shellvars); \
+		$(MAKE) -C qemu-xen-dir clean; \
+	fi
+
 subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony
 	$(MAKE) -C debugger/gdbsx clean

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v4 4/4] Clone and build Seabios by default
  2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
                   ` (6 preceding siblings ...)
  2011-09-15 15:00 ` [PATCH v4 3/4] Clone and build upstream Qemu by default stefano.stabellini
@ 2011-09-15 15:00 ` stefano.stabellini
  7 siblings, 0 replies; 13+ messages in thread
From: stefano.stabellini @ 2011-09-15 15:00 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian.Jackson, Stefano Stabellini, keir, Ian.Campbell,
	Stefano.Stabellini

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

diff -r 9832a4edea7f .hgignore
--- a/.hgignore	Thu Sep 15 14:25:11 2011 +0000
+++ b/.hgignore	Thu Sep 15 14:37:33 2011 +0000
@@ -295,6 +295,8 @@
 ^tools/qemu-xen-traditional-dir$
 ^tools/qemu-xen-dir-remote
 ^tools/qemu-xen-dir$
+^tools/tools/firmware/seabios-dir-remote
+^tools/tools/firmware/seabios-dir$
 ^tools/ocaml/.*/.*\.annot$
 ^tools/ocaml/.*/.*\.cmx?a$
 ^tools/ocaml/.*/META$
diff -r 9832a4edea7f Config.mk
--- a/Config.mk	Thu Sep 15 14:25:11 2011 +0000
+++ b/Config.mk	Thu Sep 15 14:37:33 2011 +0000
@@ -199,6 +199,8 @@ else
 QEMU_UPSTREAM_URL ?= git://xenbits.xensource.com/qemu-upstream-unstable.git
 endif
 QEMU_UPSTREAM_TAG ?= 6dd84c71dff047f9e492d67e7c99928d09202760
+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.
@@ -212,15 +214,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 9832a4edea7f tools/firmware/Makefile
--- a/tools/firmware/Makefile	Thu Sep 15 14:25:11 2011 +0000
+++ b/tools/firmware/Makefile	Thu Sep 15 14:37:33 2011 +0000
@@ -6,13 +6,18 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 
 SUBDIRS :=
+SUBDIRS += seabios-dir
 SUBDIRS += rombios
 SUBDIRS += vgabios
 SUBDIRS += etherboot
 SUBDIRS += hvmloader
 
+seabios-dir:
+	$(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_TAG) 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 +40,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-dir-remote
diff -r 9832a4edea7f tools/firmware/hvmloader/Makefile
--- a/tools/firmware/hvmloader/Makefile	Thu Sep 15 14:25:11 2011 +0000
+++ b/tools/firmware/hvmloader/Makefile	Thu Sep 15 14:37:33 2011 +0000
@@ -44,6 +44,7 @@ CFLAGS += -DENABLE_ROMBIOS
 ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-bochs-latest
 endif
 
+SEABIOS_DIR := ../seabios-dir
 ifneq ($(SEABIOS_DIR),)
 OBJS += seabios.o
 CFLAGS += -DENABLE_SEABIOS
diff -r 9832a4edea7f tools/firmware/seabios-config
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/seabios-config	Thu Sep 15 14:37:33 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 1/4] Introduce git-checkout.sh
  2011-09-15 15:00 ` [PATCH v4 1/4] Introduce git-checkout.sh stefano.stabellini
@ 2011-09-15 15:16   ` Christoph Egger
  2011-09-21  9:50     ` Stefano Stabellini
  0 siblings, 1 reply; 13+ messages in thread
From: Christoph Egger @ 2011-09-15 15:16 UTC (permalink / raw)
  To: stefano.stabellini@eu.citrix.com
  Cc: keir@xen.org, xen-devel@lists.xensource.com,
	Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com

On 09/15/11 17:00, stefano.stabellini@eu.citrix.com wrote:
> Introduce a script to perform git checkout on an external git tree; use
> git-checkout.sh in ioemu-dir-find.
>
> Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
>
> diff --git a/.hgignore b/.hgignore
> --- a/.hgignore
> +++ b/.hgignore
> @@ -291,7 +291,7 @@
>   ^tools/xm-test/lib/XmTestLib/config.py$
>   ^tools/xm-test/lib/XmTestReport/xmtest.py$
>   ^tools/xm-test/tests/.*\.test$
> -^tools/ioemu-remote
> +^tools/ioemu-dir-remote
>   ^tools/ioemu-dir$
>   ^tools/ocaml/.*/.*\.annot$
>   ^tools/ocaml/.*/.*\.cmx?a$
> diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
> new file mode 100755
> --- /dev/null
> +++ b/scripts/git-checkout.sh
> @@ -0,0 +1,21 @@
> +#!/bin/bash

This should be #!/bin/sh .

Christoph


> +
> +TREE=$1
> +TAG=$2
> +DIR=$3
> +
> +
> +if test \! -d $DIR-remote; then
> +	rm -rf $DIR-remote $DIR-remote.tmp;
> +	mkdir $DIR-remote.tmp; rmdir $DIR-remote.tmp;
> +	git clone $TREE $DIR-remote.tmp;
> +	if test "$TAG" ; then
> +		cd $DIR-remote.tmp
> +		git branch -D dummy>/dev/null 2>&1 ||:
> +		git checkout -b dummy $TAG
> +		cd ..
> +	fi
> +	mv $DIR-remote.tmp $DIR-remote
> +fi
> +rm -f $DIR
> +ln -sf $DIR-remote $DIR
> diff --git a/tools/Makefile b/tools/Makefile
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -70,7 +70,7 @@ clean: subdirs-clean
>
>   .PHONY: distclean
>   distclean: subdirs-distclean
> -	rm -rf ioemu-dir ioemu-remote
> +	rm -rf ioemu-dir ioemu-dir-remote
>
>   ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
>   IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
> @@ -88,20 +88,7 @@ ioemu-dir-find:
>   	if test -d $(CONFIG_QEMU); then \
>   		mkdir -p ioemu-dir; \
>   	else \
> -		if [ ! -d ioemu-remote ]; then \
> -			rm -rf ioemu-remote ioemu-remote.tmp; \
> -			mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
> -			$(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
> -			if [ "$(QEMU_TAG)" ]; then			\
> -				cd ioemu-remote.tmp;			\
> -				$(GIT) branch -D dummy>/dev/null 2>&1 ||:; \
> -				$(GIT) checkout -b dummy $(QEMU_TAG);	\
> -				cd ..;					\
> -			fi;						\
> -			mv ioemu-remote.tmp ioemu-remote; \
> -		fi; \
> -		rm -f ioemu-dir; \
> -		ln -sf ioemu-remote ioemu-dir; \
> +		$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) ioemu-dir; \
>   	fi
>   	set -e; \
>   		$(buildmakevars2shellvars); \
> @@ -112,7 +99,7 @@ ioemu-dir-find:
>   ioemu-dir-force-update:
>   	set -ex; \
>   	if [ "$(QEMU_TAG)" ]; then \
> -		cd ioemu-remote; \
> +		cd ioemu-dir-remote; \
>   		$(GIT) fetch origin; \
>   		$(GIT) reset --hard $(QEMU_TAG); \
>   	fi
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 3/4] Clone and build upstream Qemu by default
  2011-09-15 15:00   ` Ian Campbell
@ 2011-09-21  9:50     ` Stefano Stabellini
  0 siblings, 0 replies; 13+ messages in thread
From: Stefano Stabellini @ 2011-09-21  9:50 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Ian Jackson, xen-devel@lists.xensource.com, keir@xen.org,
	Stefano Stabellini

On Thu, 15 Sep 2011, Ian Campbell wrote:
> On Thu, 2011-09-15 at 11:00 -0400, stefano.stabellini@eu.citrix.com
> wrote:
> > 
> > +# Only available through the git protocol at the moment
> 
> This comment is now out of date...

comment removed

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v4 1/4] Introduce git-checkout.sh
  2011-09-15 15:16   ` Christoph Egger
@ 2011-09-21  9:50     ` Stefano Stabellini
  0 siblings, 0 replies; 13+ messages in thread
From: Stefano Stabellini @ 2011-09-21  9:50 UTC (permalink / raw)
  To: Christoph Egger
  Cc: Ian Campbell, keir@xen.org, xen-devel@lists.xensource.com,
	Ian Jackson, Stefano Stabellini

On Thu, 15 Sep 2011, Christoph Egger wrote:
> On 09/15/11 17:00, stefano.stabellini@eu.citrix.com wrote:
> > Introduce a script to perform git checkout on an external git tree; use
> > git-checkout.sh in ioemu-dir-find.
> >
> > Signed-off-by: Stefano Stabellini<stefano.stabellini@eu.citrix.com>
> >
> > diff --git a/.hgignore b/.hgignore
> > --- a/.hgignore
> > +++ b/.hgignore
> > @@ -291,7 +291,7 @@
> >   ^tools/xm-test/lib/XmTestLib/config.py$
> >   ^tools/xm-test/lib/XmTestReport/xmtest.py$
> >   ^tools/xm-test/tests/.*\.test$
> > -^tools/ioemu-remote
> > +^tools/ioemu-dir-remote
> >   ^tools/ioemu-dir$
> >   ^tools/ocaml/.*/.*\.annot$
> >   ^tools/ocaml/.*/.*\.cmx?a$
> > diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
> > new file mode 100755
> > --- /dev/null
> > +++ b/scripts/git-checkout.sh
> > @@ -0,0 +1,21 @@
> > +#!/bin/bash
> 
> This should be #!/bin/sh .

fixed

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-21  9:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-15 14:55 [PATCH v4] build upstream qemu and seabios by default Stefano Stabellini
2011-09-15 14:56 ` # Parent 0312575dc35e4294eb50e365b2c10078914daca8 stefano.stabellini
2011-09-15 14:56 ` stefano.stabellini
2011-09-15 14:56 ` stefano.stabellini
2011-09-15 14:56 ` stefano.stabellini
2011-09-15 15:00 ` [PATCH v4 1/4] Introduce git-checkout.sh stefano.stabellini
2011-09-15 15:16   ` Christoph Egger
2011-09-21  9:50     ` Stefano Stabellini
2011-09-15 15:00 ` [PATCH v4 2/4] Rename ioemu-dir as qemu-xen-traditional-dir stefano.stabellini
2011-09-15 15:00 ` [PATCH v4 3/4] Clone and build upstream Qemu by default stefano.stabellini
2011-09-15 15:00   ` Ian Campbell
2011-09-21  9:50     ` Stefano Stabellini
2011-09-15 15:00 ` [PATCH v4 4/4] Clone and build Seabios " stefano.stabellini

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.