From 62ed20c3f5b3a10161706d36c452775c32dcc70b Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Thu, 22 Mar 2012 10:26:03 +0000 Subject: Fetch the OVMF repository from specific git mirror and enable it Signed-off-by: Attilio Rao Committed-by: Keir Fraser --- tools/firmware/Makefile | 31 +++++++++++++++++++++++++++++++ tools/firmware/ovmf-makefile | 17 +++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tools/firmware/ovmf-makefile (limited to 'tools/firmware') diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile index 696c7afc67..bfef1ab5b3 100644 --- a/tools/firmware/Makefile +++ b/tools/firmware/Makefile @@ -6,12 +6,17 @@ TARGET := hvmloader/hvmloader INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR) SUBDIRS-y := +SUBDIRS-$(CONFIG_OVMF) += ovmf SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir SUBDIRS-$(CONFIG_ROMBIOS) += rombios SUBDIRS-$(CONFIG_ROMBIOS) += vgabios SUBDIRS-$(CONFIG_ROMBIOS) += etherboot SUBDIRS-y += hvmloader +ovmf: + GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) $(OVMF_UPSTREAM_REVISION) ovmf + cp ovmf-makefile ovmf/Makefile; + seabios-dir: GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_TAG) seabios-dir cp seabios-config seabios-dir/.config; @@ -44,9 +49,35 @@ distclean: subdirs-distclean subdir-distclean-etherboot: .phony $(MAKE) -C etherboot distclean +subdir-distclean-ovmf: .phony + rm -rf ovmf ovmf-remote + subdir-distclean-seabios-dir: .phony rm -rf seabios-dir seabios-dir-remote +.PHONY: ovmf-find +ovmf-find: + if test -d $(OVMF_UPSTREAM_URL) ; then \ + mkdir -p ovmf; \ + else \ + export GIT=$(GIT); \ + $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) $(OVMF_UPSTREAM_REVISION) ovmf ; \ + fi + +.PHONY: ovmf-force-update +ovmf-force-update: + set -ex; \ + if [ "$(OVMF_UPSTREAM_REVISION)" ]; then \ + cd ovmf-remote; \ + $(GIT) fetch origin; \ + $(GIT) reset --hard $(OVMF_UPSTREAM_REVISION); \ + fi + +subdir-clean-ovmf: + set -e; if test -d ovmf/.; then \ + $(MAKE) -C ovmf clean; \ + fi + .PHONY: seabios-dir-force-update seabios-dir-force-update: set -ex; \ diff --git a/tools/firmware/ovmf-makefile b/tools/firmware/ovmf-makefile new file mode 100644 index 0000000000..c3cd4663c8 --- /dev/null +++ b/tools/firmware/ovmf-makefile @@ -0,0 +1,17 @@ +# OVMF building system is not ready yet to run in parallel. +# Force it to be serial in order to exploit parallelism for neighbors. + +.NOTPARALLEL: +MAKEFLAGS += -j1 + +.PHONY: all +all: ovmf.bin + +.PHONY: ovmf.bin +ovmf.bin: + OvmfPkg/build.sh -a X64 + cp Build/OvmfX64/DEBUG_GCC44/FV/OVMF.fd ovmf.bin + +.PHONY: clean +clean: + rm -rf ovmf.bin Build/* -- cgit v1.2.3