Stefano Stabellini
2012-Jan-16 16:52 UTC
[PATCH v10 0/7] build upstream qemu and seabios by default
Hi all, this is the tenth version of the patch series to introduce upstream qemu and seabios in the xen-unstable build system. Changes to v9: - rename QEMU_UPSTREAM_TAG to QEMU_UPSTREAM_REVISION: we are going to use it with a branch name by default; - set QEMU_UPSTREAM_REVISION to "master" by default; - set SEABIOS_UPSTREAM_URL to git://xenbits.xen.org/seabios.git by default; - add a patch to update MAINTAINERS. Changes to v8: - build upstream qemu out of tree; - add a tools/qemu-xen-dir-force-update target; - add a tools/firmware/seabios-dir-force-update target; - call make install from subdir-all and subdir-install qemu-xen-traditional and qemu-xen targets; - fix a typo in patch #5; Changes to v7: - call upstream qemu''s configure script right before building qemu and after building libxc and xenstore because it needs them; - introduce a new patch to move the call to xen-setup after building libxc and xenstore for consistency with upstream qemu; - fix a typo in tools/Makefile (patch #4); Changes to v6: - add "set -e" to git-checkout.sh; - add argument count check to git-checkout.sh; - remove spurious semicolons in git-checkout.sh. Changes to v5: - use $GIT in git-checkout.sh; - add an http mirror for seabios; - use $(LIBEXEC) to configure upstream qemu; - append a patch for libxenlight to find the upstream qemu binary under $(LIBEXEC). Changes to v4: - remove an obsolete comment; - use /bin/sh to execute git-checkout.sh rathen than /bin/bash. 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
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 1/7] Introduce git-checkout.sh
From: stefano.stabellini@eu.citrix.com <stefano.stabellini@eu.citrix.com> 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> --- .hgignore | 2 +- scripts/git-checkout.sh | 27 +++++++++++++++++++++++++++ tools/Makefile | 20 ++++---------------- 3 files changed, 32 insertions(+), 17 deletions(-) create mode 100755 scripts/git-checkout.sh diff --git a/.hgignore b/.hgignore index 87d8ef7..3145eee 100644 --- a/.hgignore +++ b/.hgignore @@ -296,7 +296,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 index 0000000..15b3ce9 --- /dev/null +++ b/scripts/git-checkout.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +if test $# -lt 3; then + echo "Usage: $0 <tree> <tag> <dir>" + exit 1 +fi + +TREE=$1 +TAG=$2 +DIR=$3 + +set -e + +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 index 443ee7f..7f5ee3e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -75,7 +75,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) \ @@ -93,20 +93,8 @@ 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; \ + export GIT=$(GIT); \ + $(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) ioemu-dir; \ fi set -e; \ $(buildmakevars2shellvars); \ @@ -117,7 +105,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 -- 1.7.2.5
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 2/7] Rename ioemu-dir as qemu-xen-traditional-dir
From: stefano.stabellini@eu.citrix.com <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- .hgignore | 4 ++-- Makefile | 14 +++++++------- stubdom/Makefile | 8 ++++---- tools/Makefile | 26 +++++++++++++------------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.hgignore b/.hgignore index 3145eee..4b773c3 100644 --- a/.hgignore +++ b/.hgignore @@ -296,8 +296,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 --git a/Makefile b/Makefile index 31e8795..c0197a5 100644 --- a/Makefile +++ b/Makefile @@ -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 --git a/stubdom/Makefile b/stubdom/Makefile index 3705059..e9dbf02 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -218,15 +218,15 @@ $(CROSS_ROOT): cross-newlib cross-zlib cross-libpci 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 --git a/tools/Makefile b/tools/Makefile index 7f5ee3e..14e6d07 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -35,7 +35,7 @@ SUBDIRS-y += libvchan # 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 @@ -75,7 +75,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) \ @@ -88,34 +88,34 @@ 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 \ export GIT=$(GIT); \ - $(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 -- 1.7.2.5
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 3/7] move the call to xen-setup after libxc and xenstore are built
From: stefano.stabellini@eu.citrix.com <stefano.stabellini@eu.citrix.com> Move the call to xen-setup, the wrapper script to configure qemu-xen-traditional, right before building qemu-xen-traditional and after libxc and xenstore are already built. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- tools/Makefile | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 14e6d07..3ff1ed1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -96,10 +96,6 @@ qemu-xen-traditional-dir-find: export GIT=$(GIT); \ $(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir; \ fi - set -e; \ - $(buildmakevars2shellvars); \ - cd qemu-xen-traditional-dir; \ - $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS) .PHONY: qemu-xen-traditional-dir-force-update qemu-xen-traditional-dir-force-update: @@ -111,6 +107,11 @@ qemu-xen-traditional-dir-force-update: fi subdir-all-qemu-xen-traditional-dir subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find + set -e; \ + $(buildmakevars2shellvars); \ + cd qemu-xen-traditional-dir; \ + $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS); \ + $(MAKE) install subdir-clean-qemu-xen-traditional-dir: set -e; if test -d qemu-xen-traditional-dir/.; then \ -- 1.7.2.5
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 4/7] Clone and build upstream Qemu by default
From: stefano.stabellini@eu.citrix.com <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- .hgignore | 2 ++ Config.mk | 7 +++++++ Makefile | 9 ++++++++- tools/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletions(-) diff --git a/.hgignore b/.hgignore index 4b773c3..cbcc0f5 100644 --- a/.hgignore +++ b/.hgignore @@ -298,6 +298,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 --git a/Config.mk b/Config.mk index 1c229c0..d229ab6 100644 --- a/Config.mk +++ b/Config.mk @@ -202,6 +202,13 @@ else QEMU_REMOTE=git://xenbits.xensource.com/qemu-xen-unstable.git endif +ifeq ($(GIT_HTTP),y) +QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git +else +QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git +endif +QEMU_UPSTREAM_REVISION ?= master + # 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 --git a/Makefile b/Makefile index c0197a5..edc5e3d 100644 --- a/Makefile +++ b/Makefile @@ -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,13 @@ 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: tools/qemu-xen-dir-force-update +tools/qemu-xen-dir-force-update: + $(MAKE) -C tools qemu-xen-dir-force-update + .PHONY: install-docs install-docs: sh ./docs/check_pkgs && $(MAKE) -C docs install || true diff --git a/tools/Makefile b/tools/Makefile index 3ff1ed1..03ac66f 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -36,6 +36,7 @@ SUBDIRS-y += libvchan # 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 @@ -76,6 +77,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) \ @@ -97,6 +99,14 @@ qemu-xen-traditional-dir-find: $(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir; \ fi +qemu-xen-dir-find: + if test -d $(QEMU_UPSTREAM_URL) ; then \ + mkdir -p qemu-xen-dir; \ + else \ + export GIT=$(GIT); \ + $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_URL) $(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \ + fi + .PHONY: qemu-xen-traditional-dir-force-update qemu-xen-traditional-dir-force-update: set -ex; \ @@ -119,6 +129,40 @@ subdir-clean-qemu-xen-traditional-dir: $(MAKE) -C qemu-xen-traditional-dir clean; \ fi +.PHONY: qemu-xen-dir-force-update +qemu-xen-dir-force-update: + set -ex; \ + if [ "$(QEMU_UPSTREAM_REVISION)" ]; then \ + cd qemu-xen-dir-remote; \ + $(GIT) fetch origin; \ + $(GIT) reset --hard $(QEMU_UPSTREAM_REVISION); \ + fi + +subdir-all-qemu-xen-dir subdir-install-qemu-xen-dir: qemu-xen-dir-find + if test -d $(QEMU_UPSTREAM_URL) ; then \ + source=$(QEMU_UPSTREAM_URL); \ + else \ + source=.; \ + fi; \ + cd qemu-xen-dir; \ + $$source/configure --enable-xen --target-list=i386-softmmu \ + --source-path=$$source \ + --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/xenstore" \ + --bindir=$(LIBEXEC) \ + --disable-kvm \ + $(IOEMU_CONFIGURE_CROSS); \ + $(MAKE) install + +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 -- 1.7.2.5
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 5/7] Clone and build Seabios by default
From: stefano.stabellini@eu.citrix.com <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- .hgignore | 2 + Config.mk | 12 ++----- Makefile | 4 ++ tools/firmware/Makefile | 21 ++++++++++- tools/firmware/hvmloader/Makefile | 1 + tools/firmware/seabios-config | 73 +++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 11 deletions(-) create mode 100644 tools/firmware/seabios-config diff --git a/.hgignore b/.hgignore index cbcc0f5..64b440e 100644 --- a/.hgignore +++ b/.hgignore @@ -300,6 +300,8 @@ ^tools/qemu-xen-traditional-dir$ ^tools/qemu-xen-dir-remote ^tools/qemu-xen-dir$ +^tools/firmware/seabios-dir-remote +^tools/firmware/seabios-dir$ ^tools/ocaml/.*/.*\.annot$ ^tools/ocaml/.*/.*\.cmx?a$ ^tools/ocaml/.*/META$ diff --git a/Config.mk b/Config.mk index d229ab6..152c783 100644 --- a/Config.mk +++ b/Config.mk @@ -204,10 +204,13 @@ endif ifeq ($(GIT_HTTP),y) QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git +SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git else QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git +SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git endif QEMU_UPSTREAM_REVISION ?= master +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. @@ -221,15 +224,6 @@ QEMU_TAG ?= bb36d632e4cabf47882adff07a45c6702c4a5b30 # 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 --git a/Makefile b/Makefile index edc5e3d..8edea0d 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,10 @@ tools/qemu-xen-dir: tools/qemu-xen-dir-force-update: $(MAKE) -C tools qemu-xen-dir-force-update +.PHONY: tools/firmware/seabios-dir-force-update +tools/firmware/seabios-dir-force-update: + $(MAKE) -C tools/firmware seabios-dir-force-update + .PHONY: install-docs install-docs: sh ./docs/check_pkgs && $(MAKE) -C docs install || true diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile index 4b6d144..c3ec9a0 100644 --- a/tools/firmware/Makefile +++ b/tools/firmware/Makefile @@ -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: + GIT=$(GIT) $(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,16 @@ 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 + +.PHONY: seabios-dir-force-update +seabios-dir-force-update: + set -ex; \ + if [ "$(SEABIOS_UPSTREAM_TAG)" ]; then \ + cd seabios-dir-remote; \ + $(GIT) fetch origin; \ + $(GIT) reset --hard $(SEABIOS_UPSTREAM_TAG); \ + fi diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index ec33155..41a4369 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -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 --git a/tools/firmware/seabios-config b/tools/firmware/seabios-config new file mode 100644 index 0000000..202d15f --- /dev/null +++ b/tools/firmware/seabios-config @@ -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 -- 1.7.2.5
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 6/7] libxl: use new qemu at the location where xen-unstable installs it
From: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- tools/libxl/libxl_dm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 97d91b4..9d84b6f 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -58,7 +58,7 @@ const char *libxl__domain_device_model(libxl__gc *gc, dm = libxl__abs_path(gc, "qemu-dm", libxl_libexec_path()); break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: - dm = libxl__strdup(gc, "/usr/bin/qemu"); + dm = libxl__abs_path(gc, "qemu", libxl_libexec_path()); break; default: LIBXL__LOG(ctx, LIBXL__LOG_ERROR, -- 1.7.2.5
<stefano.stabellini@eu.citrix.com>
2012-Jan-16 16:52 UTC
[PATCH v10 7/7] update MAINTAINERS file
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Add Ian as Seabios maintainer and myself as upstream Qemu maintainer. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- MAINTAINERS | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 60f724d..cd0d71d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -176,6 +176,11 @@ M: Ian Jackson <ian.jackson@eu.citrix.com> S: Supported T: git git://xenbits.xen.org/qemu-xen-*.git +QEMU UPSTREAM +M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> +S: Supported +T: git git://xenbits.xen.org/qemu-upstream-*.git + REMUS M: Shriram Rajagopalan <rshriram@cs.ubc.ca> S: Maintained @@ -190,6 +195,11 @@ M: George Dunlap <george.dunlap@eu.citrix.com> S: Supported F: xen/common/sched* +SEABIOS UPSTREAM +M: Ian Campbell <ian.campbell@citrix.com> +S: Supported +T: git git://xenbits.xen.org/seabios.git + STUB DOMAINS M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> S: Supported -- 1.7.2.5
Ian Jackson
2012-Jan-16 16:56 UTC
Re: [PATCH v10 0/7] build upstream qemu and seabios by default
Stefano Stabellini writes ("[PATCH v10 0/7] build upstream qemu and seabios by default"):> this is the tenth version of the patch series to introduce upstream qemu > and seabios in the xen-unstable build system.Thanks. This all looks good and I intend to apply it as soon as we get a push in xen-unstable. (Until then I''ll wait in case it breaks the build and makes it harder to get a push.) Ian.
On Mon, 2012-01-16 at 16:52 +0000, stefano.stabellini@eu.citrix.com wrote:> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > Add Ian as Seabios maintainer and myself as upstream Qemu maintainer. > > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Ian Campbell <ian.campbell@citrix.com>> --- > MAINTAINERS | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 60f724d..cd0d71d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -176,6 +176,11 @@ M: Ian Jackson <ian.jackson@eu.citrix.com> > S: Supported > T: git git://xenbits.xen.org/qemu-xen-*.git > > +QEMU UPSTREAM > +M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > +S: Supported > +T: git git://xenbits.xen.org/qemu-upstream-*.git > + > REMUS > M: Shriram Rajagopalan <rshriram@cs.ubc.ca> > S: Maintained > @@ -190,6 +195,11 @@ M: George Dunlap <george.dunlap@eu.citrix.com> > S: Supported > F: xen/common/sched* > > +SEABIOS UPSTREAM > +M: Ian Campbell <ian.campbell@citrix.com> > +S: Supported > +T: git git://xenbits.xen.org/seabios.git > + > STUB DOMAINS > M: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > S: Supported
On Mon, 2012-01-16 at 16:52 +0000, stefano.stabellini@eu.citrix.com wrote:> From: stefano.stabellini@eu.citrix.com <stefano.stabellini@eu.citrix.com>Something is weird in your git metadata here..> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Ian Campbell <ian.campbell@citrix.com>> --- > .hgignore | 2 + > Config.mk | 12 ++----- > Makefile | 4 ++ > tools/firmware/Makefile | 21 ++++++++++- > tools/firmware/hvmloader/Makefile | 1 + > tools/firmware/seabios-config | 73 +++++++++++++++++++++++++++++++++++++ > 6 files changed, 102 insertions(+), 11 deletions(-) > create mode 100644 tools/firmware/seabios-config > > diff --git a/.hgignore b/.hgignore > index cbcc0f5..64b440e 100644 > --- a/.hgignore > +++ b/.hgignore > @@ -300,6 +300,8 @@ > ^tools/qemu-xen-traditional-dir$ > ^tools/qemu-xen-dir-remote > ^tools/qemu-xen-dir$ > +^tools/firmware/seabios-dir-remote > +^tools/firmware/seabios-dir$ > ^tools/ocaml/.*/.*\.annot$ > ^tools/ocaml/.*/.*\.cmx?a$ > ^tools/ocaml/.*/META$ > diff --git a/Config.mk b/Config.mk > index d229ab6..152c783 100644 > --- a/Config.mk > +++ b/Config.mk > @@ -204,10 +204,13 @@ endif > > ifeq ($(GIT_HTTP),y) > QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git > +SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git > else > QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git > +SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git > endif > QEMU_UPSTREAM_REVISION ?= master > +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. > @@ -221,15 +224,6 @@ QEMU_TAG ?= bb36d632e4cabf47882adff07a45c6702c4a5b30 > # 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 --git a/Makefile b/Makefile > index edc5e3d..8edea0d 100644 > --- a/Makefile > +++ b/Makefile > @@ -98,6 +98,10 @@ tools/qemu-xen-dir: > tools/qemu-xen-dir-force-update: > $(MAKE) -C tools qemu-xen-dir-force-update > > +.PHONY: tools/firmware/seabios-dir-force-update > +tools/firmware/seabios-dir-force-update: > + $(MAKE) -C tools/firmware seabios-dir-force-update > + > .PHONY: install-docs > install-docs: > sh ./docs/check_pkgs && $(MAKE) -C docs install || true > diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile > index 4b6d144..c3ec9a0 100644 > --- a/tools/firmware/Makefile > +++ b/tools/firmware/Makefile > @@ -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: > + GIT=$(GIT) $(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,16 @@ 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 > + > +.PHONY: seabios-dir-force-update > +seabios-dir-force-update: > + set -ex; \ > + if [ "$(SEABIOS_UPSTREAM_TAG)" ]; then \ > + cd seabios-dir-remote; \ > + $(GIT) fetch origin; \ > + $(GIT) reset --hard $(SEABIOS_UPSTREAM_TAG); \ > + fi > diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile > index ec33155..41a4369 100644 > --- a/tools/firmware/hvmloader/Makefile > +++ b/tools/firmware/hvmloader/Makefile > @@ -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 --git a/tools/firmware/seabios-config b/tools/firmware/seabios-config > new file mode 100644 > index 0000000..202d15f > --- /dev/null > +++ b/tools/firmware/seabios-config > @@ -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
Ian Jackson
2012-Jan-24 15:23 UTC
Re: [PATCH v10 0/7] build upstream qemu and seabios by default
Stefano Stabellini writes ("[Xen-devel] [PATCH v10 0/7] build upstream qemu and seabios by default"):> this is the tenth version of the patch series to introduce upstream qemu > and seabios in the xen-unstable build system.I have successfully build-tested and hence applied this series, thanks. Ian.
Ian Campbell
2012-Jan-25 16:29 UTC
Re: [PATCH v10 6/7] libxl: use new qemu at the location where xen-unstable installs it
On Mon, 2012-01-16 at 16:52 +0000, stefano.stabellini@eu.citrix.com wrote:> From: Ian Campbell <ian.campbell@citrix.com> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > --- > tools/libxl/libxl_dm.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index 97d91b4..9d84b6f 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -58,7 +58,7 @@ const char *libxl__domain_device_model(libxl__gc *gc, > dm = libxl__abs_path(gc, "qemu-dm", libxl_libexec_path()); > break; > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: > - dm = libxl__strdup(gc, "/usr/bin/qemu"); > + dm = libxl__abs_path(gc, "qemu", libxl_libexec_path());The actual installed path (in staging tree now) is /usr/lib/xen/bin/qemu-system-i386 so if I boot a guest with device_model_version="qemu-xen" then, as you might expect, I get: libxl: error: libxl_dm.c:809:libxl__create_device_model: device model /usr/lib/xen/bin/qemu is not executable: No such file or directory libxl: error: libxl_create.c:579:do_domain_create: failed to create device model: -3 libxl: error: libxl_dm.c:926:libxl__destroy_device_model: Couldn''t find device model''s pid: No such file or directory libxl: error: libxl.c:796:libxl_domain_destroy: libxl__destroy_device_model failed for 21 I can add device_model_override="/usr/lib/xen/bin/qemu-system-i386" and then things work as expected. Presumably if I build my tools for 64 bit it will be qemu-system-amd64. So, should we fix libxl, the qemu build or our build integration? Ian.
Stefano Stabellini
2012-Jan-25 16:37 UTC
Re: [PATCH v10 6/7] libxl: use new qemu at the location where xen-unstable installs it
On Wed, 25 Jan 2012, Ian Campbell wrote:> On Mon, 2012-01-16 at 16:52 +0000, stefano.stabellini@eu.citrix.com > wrote: > > From: Ian Campbell <ian.campbell@citrix.com> > > > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > > --- > > tools/libxl/libxl_dm.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > > index 97d91b4..9d84b6f 100644 > > --- a/tools/libxl/libxl_dm.c > > +++ b/tools/libxl/libxl_dm.c > > @@ -58,7 +58,7 @@ const char *libxl__domain_device_model(libxl__gc *gc, > > dm = libxl__abs_path(gc, "qemu-dm", libxl_libexec_path()); > > break; > > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: > > - dm = libxl__strdup(gc, "/usr/bin/qemu"); > > + dm = libxl__abs_path(gc, "qemu", libxl_libexec_path()); > > The actual installed path (in staging tree now) > is /usr/lib/xen/bin/qemu-system-i386 so if I boot a guest with > device_model_version="qemu-xen" then, as you might expect, I get: > libxl: error: libxl_dm.c:809:libxl__create_device_model: device model /usr/lib/xen/bin/qemu is not executable: No such file or directory > libxl: error: libxl_create.c:579:do_domain_create: failed to create device model: -3 > libxl: error: libxl_dm.c:926:libxl__destroy_device_model: Couldn''t find device model''s pid: No such file or directory > libxl: error: libxl.c:796:libxl_domain_destroy: libxl__destroy_device_model failed for 21 > > I can add device_model_override="/usr/lib/xen/bin/qemu-system-i386" and > then things work as expected. > > Presumably if I build my tools for 64 bit it will be qemu-system-amd64.It is always qemu-system-i386, unless we change the target in the configure line. Of course it doesn''t really matter for us because we don''t use it for cpu emulation.> So, should we fix libxl, the qemu build or our build integration?The binary name changed for the 1.0 release, I don''t expect it to change again. I think we should update libxl.
Seemingly Similar Threads
- [PATCH v2 0/3] hvmloader: Make ROM dependencies optional
- libxl: error: libxl_dm.c:1212:device_model_spawn_outcome: domain 1 device model: spawn failed (rc=-3) when creating VM using upstream qemu on Xen 4.2.
- LSI SAS2008 Option Rom Failure
- [PATCH] tools: specify datadir for qemu-xen build to fix firmware loading
- [PATCH v3 0/5] hvmloader: Make ROM dependencies optional