From dcbc297aea6a159f2f5fad5de84666f23c2d17ad Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 14 Sep 2011 11:38:13 +0100 Subject: tools: Revert seabios and upstream qemu build changes These have broken the build and it seems to be difficult to fix. So we will revert the whole lot for now, and await corrected patch(es). Revert "fix the build when CONFIG_QEMU is specified by the user" Revert "tools: fix permissions of git-checkout.sh" Revert "scripts/git-checkout.sh: Is not bash specific. Invoke with /bin/sh." Revert "Clone and build Seabios by default" Revert "Clone and build upstream Qemu by default" Revert "Rename ioemu-dir as qemu-xen-traditional-dir" Revert "Move the ioemu-dir-find shell script to an external file" Signed-off-by: Ian Jackson --- tools/Makefile | 64 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 25 deletions(-) (limited to 'tools/Makefile') diff --git a/tools/Makefile b/tools/Makefile index ede96db9b0..df6270c352 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -30,8 +30,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 +SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir endif SUBDIRS-y += xenpmd @@ -71,8 +70,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 + rm -rf ioemu-dir ioemu-remote ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \ @@ -80,35 +78,51 @@ IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \ --interp-prefix=$(CROSS_SYS_ROOT) endif -qemu-xen-traditional-dir-find: - $(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir - -qemu-xen-dir-find: - $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_URL) $(QEMU_UPSTREAM_TAG) qemu-xen-dir - -.PHONY: qemu-xen-traditional-dir-force-update -qemu-xen-traditional-dir-force-update: +QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi) +ifneq ($(QEMU_ROOT),.) +export QEMU_ROOT +endif + +ioemu-dir-find: + set -ex; \ + 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; \ + fi + set -e; \ + $(buildmakevars2shellvars); \ + cd ioemu-dir; \ + $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS) + +.PHONY: ioemu-dir-force-update +ioemu-dir-force-update: set -ex; \ if [ "$(QEMU_TAG)" ]; then \ - cd qemu-xen-traditional-dir-remote; \ + cd ioemu-remote; \ $(GIT) fetch origin; \ $(GIT) reset --hard $(QEMU_TAG); \ fi -subdir-all-qemu-xen-traditional-dir subdir-install-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find - -subdir-clean-qemu-xen-traditional-dir: - set -e; if test -d qemu-xen-traditional-dir/.; then \ - $(buildmakevars2shellvars); \ - $(MAKE) -C qemu-xen-traditional-dir clean; \ - fi - -subdir-all-qemu-xen-dir subdir-install-qemu-xen-dir: qemu-xen-dir-find +subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find -subdir-clean-qemu-xen-dir: - set -e; if test -d qemu-xen-dir/.; then \ +subdir-clean-ioemu-dir: + set -e; if test -d ioemu-dir/.; then \ $(buildmakevars2shellvars); \ - $(MAKE) -C qemu-xen-dir clean; \ + $(MAKE) -C ioemu-dir clean; \ fi subdir-clean-debugger/gdbsx subdir-distclean-debugger/gdbsx: .phony -- cgit v1.2.3