make: Normalize config options for external trees

We have four different external trees, and four different naming
conventions for specifying the URL, where they live, and what revision
to check out.

Normalize config options on the following bases:
 - QEMU_UPSTREAM
 - QEMU_TRADITIONAL
 - SEABIOS_UPSTREAM
 - OVMF_UPSTREAM

The following suffixes for all trees:
 - _URL : A remote repository to clone from
 - _REVISION : The revision to check out

And the following suffixes for the qemu trees:
 - _INTREE : The location of an inlined tree (for tarball releases)
 - _LOC : Where to actually look (either a directory or a URL)

The following parameters are still supported for backwards
compatibility:
 - CONFIG_QEMU          (=> QEMU_TRADITIONAL_LOC)
 - QEMU_REMOTE          (=> QEMU_TRADITIONAL_URL)
 - QEMU_TAG             (=> QEMU_TRADITIONAL_REVISION)
 - SEABIOS_UPSTREAM_TAG (=> SEABIOS_UPSTREAM_REVISION)

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
George Dunlap authored and Ian Campbell committed 2014-07-18 11:20:56 +01:00
1 parent ffbf089357
commit 8962a8f951
3 files changed
+39 -28

No files matched your search

+27 -16
View File
@@ -218,49 +218,60 @@ XEN_EXTFILES_URL ?= http://xenbits.xen.org/xen-extfiles
# the internet. The original download URL is preserved as a comment
# near the place in the Xen Makefiles where the file is used.
ifeq ($(GIT_HTTP),y)
QEMU_REMOTE ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git
else
QEMU_REMOTE ?= git://xenbits.xen.org/qemu-xen-unstable.git
endif
# Where to look for inlined subtrees (for example, from a tarball)
QEMU_UPSTREAM_INTREE ?= $(XEN_ROOT)/tools/qemu-xen
QEMU_TRADITIONAL_INTREE ?= $(XEN_ROOT)/tools/qemu-xen-traditional
# 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
CONFIG_QEMU ?= $(or $(wildcard $(QEMU_TRADITIONAL_INTREE)),\
$(QEMU_REMOTE))
ifneq (,$(wildcard $(QEMU_UPSTREAM_INTREE)))
QEMU_UPSTREAM_URL ?= $(QEMU_UPSTREAM_INTREE)
# Handle legacy options
ifneq (,$(SEABIOS_UPSTREAM_TAG))
SEABIOS_UPSTREAM_REVISION ?= $(SEABIOS_UPSTREAM_TAG)
endif
ifneq (,$(QEMU_REMOTE))
QEMU_TRADITIONAL_URL ?= $(QEMU_REMOTE)
endif
ifneq (,$(CONFIG_QEMU))
QEMU_TRADITIONAL_LOC ?= $(CONFIG_QEMU)
endif
ifneq (,$(QEMU_TAG))
QEMU_TRADITIONAL_REVISION ?= $(QEMU_TAG)
endif
ifeq ($(GIT_HTTP),y)
OVMF_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/ovmf.git
QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git
QEMU_TRADITIONAL_URL ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git
SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git
else
OVMF_UPSTREAM_URL ?= git://xenbits.xen.org/ovmf.git
QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git
QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-unstable.git
SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
endif
OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423
QEMU_UPSTREAM_REVISION ?= master
SEABIOS_UPSTREAM_TAG ?= rel-1.7.5
SEABIOS_UPSTREAM_REVISION ?= rel-1.7.5
# Thu May 22 16:59:16 2014 -0400
# python3 fixes for vgabios and csm builds.
ETHERBOOT_NICS ?= rtl8139 8086100e
QEMU_TAG ?= d0395cc49b2ec6d1723c01f1daf2394b9264ca29
QEMU_TRADITIONAL_REVISION ?= d0395cc49b2ec6d1723c01f1daf2394b9264ca29
# Tue Apr 8 16:50:06 2014 +0000
# qemu-xen-trad: free all the pirqs for msi/msix when driver unloads
# 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.
# QEMU_UPSTREAM_LOC ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
# Defaults for subtree locations
QEMU_TRADITIONAL_LOC ?= $(or $(wildcard $(QEMU_TRADITIONAL_INTREE)),\
$(QEMU_TRADITIONAL_URL))
QEMU_UPSTREAM_LOC ?= $(or $(wildcard $(QEMU_UPSTREAM_INTREE)),\
$(QEMU_UPSTREAM_URL))
# Short answer -- do not enable this unless you know what you are
# doing and are prepared for some pain.
+9 -9
View File
@@ -111,35 +111,35 @@ IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
--interp-prefix=$(CROSS_SYS_ROOT)
endif
QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
QEMU_ROOT := $(shell if [ -d "$(QEMU_TRADITIONAL_LOC)" ]; then echo "$(QEMU_TRADITIONAL_LOC)"; else echo .; fi)
ifneq ($(QEMU_ROOT),.)
export QEMU_ROOT
endif
qemu-xen-traditional-dir-find:
set -ex; \
if test -d $(CONFIG_QEMU); then \
if test -d $(QEMU_TRADITIONAL_LOC); then \
mkdir -p qemu-xen-traditional-dir; \
else \
export GIT=$(GIT); \
$(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir; \
$(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_TRADITIONAL_LOC) $(QEMU_TRADITIONAL_REVISION) qemu-xen-traditional-dir; \
fi
qemu-xen-dir-find:
if test -d $(QEMU_UPSTREAM_URL) ; then \
if test -d $(QEMU_UPSTREAM_LOC) ; 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 ; \
$(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_LOC) $(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \
fi
.PHONY: qemu-xen-traditional-dir-force-update
qemu-xen-traditional-dir-force-update:
set -ex; \
if [ "$(QEMU_TAG)" ]; then \
if [ "$(QEMU_TRADITIONAL_REVISION)" ]; then \
cd qemu-xen-traditional-dir-remote; \
$(GIT) fetch origin; \
$(GIT) reset --hard $(QEMU_TAG); \
$(GIT) reset --hard $(QEMU_TRADITIONAL_REVISION); \
fi
subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
@@ -179,8 +179,8 @@ QEMU_XEN_ENABLE_DEBUG :=
endif
subdir-all-qemu-xen-dir: qemu-xen-dir-find
if test -d $(QEMU_UPSTREAM_URL) ; then \
source=$(QEMU_UPSTREAM_URL); \
if test -d $(QEMU_UPSTREAM_LOC) ; then \
source=$(QEMU_UPSTREAM_LOC); \
else \
source=.; \
fi; \
+3 -3
View File
@@ -24,7 +24,7 @@ ovmf-dir:
cp ovmf-makefile ovmf-dir/Makefile;
seabios-dir:
GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_TAG) seabios-dir
GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
$(MAKE) -C seabios-dir defconfig
.PHONY: all
@@ -78,10 +78,10 @@ subdir-clean-ovmf:
.PHONY: seabios-dir-force-update
seabios-dir-force-update:
set -ex; \
if [ "$(SEABIOS_UPSTREAM_TAG)" ]; then \
if [ "$(SEABIOS_UPSTREAM_REVISION)" ]; then \
cd seabios-dir-remote; \
$(GIT) fetch origin; \
$(GIT) reset --hard $(SEABIOS_UPSTREAM_TAG); \
$(GIT) reset --hard $(SEABIOS_UPSTREAM_REVISION); \
fi
subdir-clean-seabios-dir:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.