xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [PATCH v4] Fetch the OVMF repository from specific git mirror and enable it
@ 2012-03-20 15:20 Attilio Rao
  0 siblings, 0 replies; 4+ messages in thread
From: Attilio Rao @ 2012-03-20 15:20 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.campbell

Signed-off-by: Attilio Rao <attilio.rao@citrix.com>

---
Changed since v3:
- Only enabled on Linux as OVMF does not build yet on BSD flavours
- Added subdir-clean-ovmf
- The Linux build may be busted for userland compiled as i486, i586 and
  i786. The following OVMF fix, not yet upstreamed, should fix this:
  http://xenbits.xen.org/people/attilio/edk2/edk2-linux-ix86.patch

diff -r 4e1d091d10d8 -r 4b4bd0c568ac .hgignore
--- a/.hgignore	Fri Mar 16 15:24:25 2012 +0000
+++ b/.hgignore	Tue Mar 20 15:16:06 2012 +0000
@@ -289,6 +289,8 @@
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^tools/xm-test/tests/.*\.test$
+^tools/firmware/ovmf-remote
+^tools/firmware/ovmf$
 ^tools/qemu-xen-traditional-dir-remote
 ^tools/qemu-xen-traditional-dir$
 ^tools/qemu-xen-dir-remote
diff -r 4e1d091d10d8 -r 4b4bd0c568ac Config.mk
--- a/Config.mk	Fri Mar 16 15:24:25 2012 +0000
+++ b/Config.mk	Tue Mar 20 15:16:06 2012 +0000
@@ -191,12 +191,15 @@ QEMU_REMOTE=git://xenbits.xensource.com/
 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
 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
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
+OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
 QEMU_UPSTREAM_REVISION ?= master
 SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
 # Sun Mar 11 09:27:07 2012 -0400
@@ -204,7 +207,11 @@ SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
 
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
+ifeq ($(CONFIG_Linux),y)
+CONFIG_OVMF ?= y
+else
 CONFIG_OVMF ?= n
+endif
 CONFIG_ROMBIOS ?= y
 CONFIG_SEABIOS ?= y
 
diff -r 4e1d091d10d8 -r 4b4bd0c568ac tools/firmware/Makefile
--- a/tools/firmware/Makefile	Fri Mar 16 15:24:25 2012 +0000
+++ b/tools/firmware/Makefile	Tue Mar 20 15:16:06 2012 +0000
@@ -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; \

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

* [PATCH] [PATCH v4] Fetch the OVMF repository from specific git mirror and enable it
@ 2012-03-20 15:43 Attilio Rao
  2012-03-20 15:49 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Attilio Rao @ 2012-03-20 15:43 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.campbell

Resending the patch as the last one was missing an added file.

Signed-off-by: Attilio Rao <attilio.rao@citrix.com>

---
Changed since v3:
- Only enabled on Linux as OVMF does not build yet on BSD flavours
- Added subdir-clean-ovmf
- The Linux build may be busted for userland compiled as i486, i586 and
  i786. The following OVMF fix, not yet upstreamed, should fix this:
  http://xenbits.xen.org/people/attilio/edk2/edk2-linux-ix86.patch

diff -r 4e1d091d10d8 -r ee290b19fe14 .hgignore
--- a/.hgignore	Fri Mar 16 15:24:25 2012 +0000
+++ b/.hgignore	Tue Mar 20 15:42:54 2012 +0000
@@ -289,6 +289,8 @@
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^tools/xm-test/tests/.*\.test$
+^tools/firmware/ovmf-remote
+^tools/firmware/ovmf$
 ^tools/qemu-xen-traditional-dir-remote
 ^tools/qemu-xen-traditional-dir$
 ^tools/qemu-xen-dir-remote
diff -r 4e1d091d10d8 -r ee290b19fe14 Config.mk
--- a/Config.mk	Fri Mar 16 15:24:25 2012 +0000
+++ b/Config.mk	Tue Mar 20 15:42:54 2012 +0000
@@ -191,12 +191,15 @@ QEMU_REMOTE=git://xenbits.xensource.com/
 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
 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
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 endif
+OVMF_UPSTREAM_REVISION ?= b0855f925c6e2e0b21fbb03fab4b5fb5b6876871
 QEMU_UPSTREAM_REVISION ?= master
 SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
 # Sun Mar 11 09:27:07 2012 -0400
@@ -204,7 +207,11 @@ SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
 
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
+ifeq ($(CONFIG_Linux),y)
+CONFIG_OVMF ?= y
+else
 CONFIG_OVMF ?= n
+endif
 CONFIG_ROMBIOS ?= y
 CONFIG_SEABIOS ?= y
 
diff -r 4e1d091d10d8 -r ee290b19fe14 tools/firmware/Makefile
--- a/tools/firmware/Makefile	Fri Mar 16 15:24:25 2012 +0000
+++ b/tools/firmware/Makefile	Tue Mar 20 15:42:54 2012 +0000
@@ -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 -r 4e1d091d10d8 -r ee290b19fe14 tools/firmware/ovmf-makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/ovmf-makefile	Tue Mar 20 15:42:54 2012 +0000
@@ -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/*

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

* Re: [PATCH] [PATCH v4] Fetch the OVMF repository from specific git mirror and enable it
  2012-03-20 15:43 [PATCH] [PATCH v4] Fetch the OVMF repository from specific git mirror and enable it Attilio Rao
@ 2012-03-20 15:49 ` Jan Beulich
  2012-03-20 15:51   ` Attilio Rao
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2012-03-20 15:49 UTC (permalink / raw)
  To: Attilio Rao; +Cc: ian.campbell, xen-devel

>>> On 20.03.12 at 16:43, Attilio Rao <attilio.rao@citrix.com> wrote:
> @@ -204,7 +207,11 @@ SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
>  
>  ETHERBOOT_NICS ?= rtl8139 8086100e
>  
> +ifeq ($(CONFIG_Linux),y)
> +CONFIG_OVMF ?= y
> +else
>  CONFIG_OVMF ?= n
> +endif

CONFIG_OVMF ?= $(CONFIG_Linux)

>  CONFIG_ROMBIOS ?= y
>  CONFIG_SEABIOS ?= y
>  

Jan

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

* Re: [PATCH] [PATCH v4] Fetch the OVMF repository from specific git mirror and enable it
  2012-03-20 15:49 ` Jan Beulich
@ 2012-03-20 15:51   ` Attilio Rao
  0 siblings, 0 replies; 4+ messages in thread
From: Attilio Rao @ 2012-03-20 15:51 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ian Campbell, xen-devel

On 20/03/12 15:49, Jan Beulich wrote:
>>>> On 20.03.12 at 16:43, Attilio Rao<attilio.rao@citrix.com>  wrote:
>>>>          
>> @@ -204,7 +207,11 @@ SEABIOS_UPSTREAM_TAG ?= rel-1.6.3.2
>>
>>   ETHERBOOT_NICS ?= rtl8139 8086100e
>>
>> +ifeq ($(CONFIG_Linux),y)
>> +CONFIG_OVMF ?= y
>> +else
>>   CONFIG_OVMF ?= n
>> +endif
>>      
> CONFIG_OVMF ?= $(CONFIG_Linux)
>
>    

I've followed what other places do, really, but that sounds like a good 
idea.

Attilio

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

end of thread, other threads:[~2012-03-20 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 15:43 [PATCH] [PATCH v4] Fetch the OVMF repository from specific git mirror and enable it Attilio Rao
2012-03-20 15:49 ` Jan Beulich
2012-03-20 15:51   ` Attilio Rao
  -- strict thread matches above, loose matches on Subject: below --
2012-03-20 15:20 Attilio Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).