Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH] Fetch the OVMF repository from specific git mirror and enable it

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


attilio.rao at citrix

Feb 29, 2012, 11:37 AM

Post #1 of 4 (109 views)
Permalink
[PATCH] Fetch the OVMF repository from specific git mirror and enable it

- Fetch the OVMF parent tree from: http://github.com/tianocore/edk2.git
- Add a simple Makefile to edk2 that automagically runs the right scripts
to build OVMF and setles the resulting binary properly

Signed-off-by: Attilio Rao <attilio.rao [at] citrix>

diff -r d7fe4cd831a0 -r 7bdf0747c170 Config.mk
--- a/Config.mk Wed Feb 29 17:01:41 2012 +0000
+++ b/Config.mk Wed Feb 29 19:37:29 2012 +0000
@@ -187,12 +187,15 @@ QEMU_REMOTE=git://xenbits.xensource.com/
endif

ifeq ($(GIT_HTTP),y)
+OVMF_UPSTREAM_URL ?= http://github.com/tianocore/edk2.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://github.com/tianocore/edk2.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 ?= master
QEMU_UPSTREAM_REVISION ?= master
SEABIOS_UPSTREAM_TAG ?= c69e288adfe6c273df4b1f3d9c223d8a4fb613cd
# Wed Feb 8 20:23:36 2012 -0500
@@ -200,7 +203,7 @@ SEABIOS_UPSTREAM_TAG ?= c69e288adfe6c273

ETHERBOOT_NICS ?= rtl8139 8086100e

-CONFIG_OVMF ?= n
+CONFIG_OVMF ?= y
CONFIG_ROMBIOS ?= y
CONFIG_SEABIOS ?= y

diff -r d7fe4cd831a0 -r 7bdf0747c170 tools/firmware/Makefile
--- a/tools/firmware/Makefile Wed Feb 29 17:01:41 2012 +0000
+++ b/tools/firmware/Makefile Wed Feb 29 19:37:29 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,21 @@ 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-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
+
.PHONY: seabios-dir-force-update
seabios-dir-force-update:
set -ex; \
diff -r d7fe4cd831a0 -r 7bdf0747c170 tools/firmware/ovmf-makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/ovmf-makefile Wed Feb 29 19:37:29 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/*

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Mar 1, 2012, 12:09 AM

Post #2 of 4 (96 views)
Permalink
Re: [PATCH] Fetch the OVMF repository from specific git mirror and enable it [In reply to]

On Wed, 2012-02-29 at 19:37 +0000, Attilio Rao wrote:
> - Fetch the OVMF parent tree from: http://github.com/tianocore/edk2.git
> - Add a simple Makefile to edk2 that automagically runs the right scripts
> to build OVMF and setles the resulting binary properly
>
> Signed-off-by: Attilio Rao <attilio.rao [at] citrix>

This looks good to me but we would usually mirror the git tree on
xenbits to avoid consuming 3rd party resources.

Do we want to track upstream's master branch, which would require us to
have a staging->tested push gateway, or have a particular tag which we
update in order to upgrade? In the latter case ideally it would be a
meaningful tag (e.g. a stable release) but if none such exist (which
appears to be the case) then we could just pick some reasonable point in
the development history.

Ian.

>
> diff -r d7fe4cd831a0 -r 7bdf0747c170 Config.mk
> --- a/Config.mk Wed Feb 29 17:01:41 2012 +0000
> +++ b/Config.mk Wed Feb 29 19:37:29 2012 +0000
> @@ -187,12 +187,15 @@ QEMU_REMOTE=git://xenbits.xensource.com/
> endif
>
> ifeq ($(GIT_HTTP),y)
> +OVMF_UPSTREAM_URL ?= http://github.com/tianocore/edk2.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://github.com/tianocore/edk2.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 ?= master
> QEMU_UPSTREAM_REVISION ?= master
> SEABIOS_UPSTREAM_TAG ?= c69e288adfe6c273df4b1f3d9c223d8a4fb613cd
> # Wed Feb 8 20:23:36 2012 -0500
> @@ -200,7 +203,7 @@ SEABIOS_UPSTREAM_TAG ?= c69e288adfe6c273
>
> ETHERBOOT_NICS ?= rtl8139 8086100e
>
> -CONFIG_OVMF ?= n
> +CONFIG_OVMF ?= y
> CONFIG_ROMBIOS ?= y
> CONFIG_SEABIOS ?= y
>
> diff -r d7fe4cd831a0 -r 7bdf0747c170 tools/firmware/Makefile
> --- a/tools/firmware/Makefile Wed Feb 29 17:01:41 2012 +0000
> +++ b/tools/firmware/Makefile Wed Feb 29 19:37:29 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,21 @@ 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-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
> +
> .PHONY: seabios-dir-force-update
> seabios-dir-force-update:
> set -ex; \
> diff -r d7fe4cd831a0 -r 7bdf0747c170 tools/firmware/ovmf-makefile
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/tools/firmware/ovmf-makefile Wed Feb 29 19:37:29 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/*
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel [at] lists
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


attilio.rao at citrix

Mar 1, 2012, 2:30 AM

Post #3 of 4 (97 views)
Permalink
Re: [PATCH] Fetch the OVMF repository from specific git mirror and enable it [In reply to]

On 01/03/12 08:09, Ian Campbell wrote:
> On Wed, 2012-02-29 at 19:37 +0000, Attilio Rao wrote:
>
>> - Fetch the OVMF parent tree from: http://github.com/tianocore/edk2.git
>> - Add a simple Makefile to edk2 that automagically runs the right scripts
>> to build OVMF and setles the resulting binary properly
>>
>> Signed-off-by: Attilio Rao<attilio.rao [at] citrix>
>>
> This looks good to me but we would usually mirror the git tree on
> xenbits to avoid consuming 3rd party resources.
>
>

When we informally spoke about it I had the impression we had to prefer
using their git repo.
However I'm fine with mirroring their git repo, how can I find
instructions on how to set it up?

> Do we want to track upstream's master branch, which would require us to
> have a staging->tested push gateway, or have a particular tag which we
> update in order to upgrade? In the latter case ideally it would be a
> meaningful tag (e.g. a stable release) but if none such exist (which
> appears to be the case) then we could just pick some reasonable point in
> the development history.
>

I've personally just tested the current master branch, not sure if there
is any instability we should worry about, so the current snapshot could
be a good starting point.
There doesn't seem to be any stable branch, however, thus we should just
go with master or consider working snapshot from it.

How do you prefer to proceed then?

Attilio


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Mar 1, 2012, 2:41 AM

Post #4 of 4 (98 views)
Permalink
Re: [PATCH] Fetch the OVMF repository from specific git mirror and enable it [In reply to]

On Thu, 2012-03-01 at 10:30 +0000, Attilio Rao wrote:
> On 01/03/12 08:09, Ian Campbell wrote:
> > On Wed, 2012-02-29 at 19:37 +0000, Attilio Rao wrote:
> >
> >> - Fetch the OVMF parent tree from: http://github.com/tianocore/edk2.git
> >> - Add a simple Makefile to edk2 that automagically runs the right scripts
> >> to build OVMF and setles the resulting binary properly
> >>
> >> Signed-off-by: Attilio Rao<attilio.rao [at] citrix>
> >>
> > This looks good to me but we would usually mirror the git tree on
> > xenbits to avoid consuming 3rd party resources.
> >
> >
>
> When we informally spoke about it I had the impression we had to prefer
> using their git repo.

I meant to use their "history" so to speak, as opposed to generating our
own git history with different commit ids etc, rather than literally
their repo.

> However I'm fine with mirroring their git repo, how can I find
> instructions on how to set it up?

You'll need an account on xenbits. Lets set that up offline.

> > Do we want to track upstream's master branch, which would require us to
> > have a staging->tested push gateway, or have a particular tag which we
> > update in order to upgrade? In the latter case ideally it would be a
> > meaningful tag (e.g. a stable release) but if none such exist (which
> > appears to be the case) then we could just pick some reasonable point in
> > the development history.
> >
>
> I've personally just tested the current master branch, not sure if there
> is any instability we should worry about, so the current snapshot could
> be a good starting point.
> There doesn't seem to be any stable branch, however, thus we should just
> go with master or consider working snapshot from it.
>
> How do you prefer to proceed then?

I think we should nominate whichever change set you tested and use it as
$OVMF_UPSTREAM_REVISION

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.