Attilio Rao
2012-Mar-01 19:28 UTC
[PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
Signed-off-by: Attilio Rao <attilio.rao@citrix.com> --- Differences with previous version: - Add ovmf entries to .hgignore - Add a rule in tools/firmware/Makefile for ovmf-find in order to cope with already cloned git repositories diff -r d7fe4cd831a0 -r 402a1e16b2d8 .hgignore --- a/.hgignore Wed Feb 29 17:01:41 2012 +0000 +++ b/.hgignore Thu Mar 01 19:27:17 2012 +0000 @@ -287,6 +287,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 d7fe4cd831a0 -r 402a1e16b2d8 Config.mk --- a/Config.mk Wed Feb 29 17:01:41 2012 +0000 +++ b/Config.mk Thu Mar 01 19:27:17 2012 +0000 @@ -187,12 +187,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 ?= 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 402a1e16b2d8 tools/firmware/Makefile --- a/tools/firmware/Makefile Wed Feb 29 17:01:41 2012 +0000 +++ b/tools/firmware/Makefile Thu Mar 01 19:27:17 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,30 @@ 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 + .PHONY: seabios-dir-force-update seabios-dir-force-update: set -ex; \ diff -r d7fe4cd831a0 -r 402a1e16b2d8 tools/firmware/ovmf-makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/firmware/ovmf-makefile Thu Mar 01 19:27:17 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/*
Ian Jackson
2012-Mar-14 12:08 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
Attilio Rao writes ("[Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"):> Signed-off-by: Attilio Rao <attilio.rao@citrix.com>cp ovmf-makefile ovmf/Makefile; Switched to a new branch ''dummy'' cp seabios-config seabios-dir/.config; make subdirs-all make[4]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware'' make[5]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware'' make -C ovmf all make[6]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote'' make[6]: warning: -jN forced in submake: disabling jobserver mode. OvmfPkg/build.sh -a X64 Initializing workspace /u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote/BaseTools Unable to find expected bin path under $EDK_TOOLS_PATH!> /u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote/BaseTools/Bin/Linux-i486make[6]: *** [ovmf.bin] Error 1 make[6]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote''
Ian Campbell
2012-Mar-14 13:10 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On Thu, 2012-03-01 at 19:28 +0000, Attilio Rao wrote:> +subdir-distclean-ovmf: .phony > + rm -rf ovmf ovmf-remote > +I think you also want a "subdir-clean-ovmf" which does: set -e; if test -d ovmf-dir/.; then \ $(MAKE) -C ovmf-dir clean; \ fi in order that make clean on a clean tree works. SeaBIOS is also lacking this, see below: 8<-------------------------------------------------- # HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1331730567 0 # Node ID 09de1fcd7acb3d07ee40d2aebbf7b0b0f18a516f # Parent 20c8a7db63d160e95fcf5c8e2f9d31923d336316 tools: Add explicit clean rule for SeaBIOS Since seabios-dir is cloned during build we need to check that it exists before recursing into it for clean, following the pattern used for qemu-*-dir etc. Also remove usage of "buildmakevars2shellvars" except when used to poopulate the environment for qemu-xen-traditional''s xen-setup script, which is the only user. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> diff -r 20c8a7db63d1 -r 09de1fcd7acb tools/Makefile --- a/tools/Makefile Wed Mar 14 11:40:44 2012 +0000 +++ b/tools/Makefile Wed Mar 14 13:09:27 2012 +0000 @@ -127,7 +127,6 @@ subdir-all-qemu-xen-traditional-dir subd 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 @@ -162,7 +161,6 @@ subdir-all-qemu-xen-dir subdir-install-q subdir-clean-qemu-xen-dir: set -e; if test -d qemu-xen-dir/.; then \ - $(buildmakevars2shellvars); \ $(MAKE) -C qemu-xen-dir clean; \ fi diff -r 20c8a7db63d1 -r 09de1fcd7acb tools/firmware/Makefile --- a/tools/firmware/Makefile Wed Mar 14 11:40:44 2012 +0000 +++ b/tools/firmware/Makefile Wed Mar 14 13:09:27 2012 +0000 @@ -55,3 +55,8 @@ seabios-dir-force-update: $(GIT) fetch origin; \ $(GIT) reset --hard $(SEABIOS_UPSTREAM_TAG); \ fi + +subdir-clean-seabios-dir: + set -e; if test -d seabios-dir/.; then \ + $(MAKE) -C seabios-dir clean; \ + fi
Attilio Rao
2012-Mar-14 13:14 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 14/03/12 12:08, Ian Jackson wrote:> Attilio Rao writes ("[Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"): > >> Signed-off-by: Attilio Rao<attilio.rao@citrix.com> >> > cp ovmf-makefile ovmf/Makefile; > Switched to a new branch ''dummy'' > cp seabios-config seabios-dir/.config; > make subdirs-all > make[4]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware'' > make[5]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware'' > make -C ovmf all > make[6]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote'' > make[6]: warning: -jN forced in submake: disabling jobserver mode. > OvmfPkg/build.sh -a X64 > Initializing workspace > /u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote/BaseTools > Unable to find expected bin path under $EDK_TOOLS_PATH! >Interesting, this breakage cames from OVMF build, but I never could reproduce something like that, let me get back to you soon. Attilio
Attilio Rao
2012-Mar-14 13:14 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 14/03/12 13:10, Ian Campbell wrote:> On Thu, 2012-03-01 at 19:28 +0000, Attilio Rao wrote: > > >> +subdir-distclean-ovmf: .phony >> + rm -rf ovmf ovmf-remote >> + >> > I think you also want a "subdir-clean-ovmf" which does: > set -e; if test -d ovmf-dir/.; then \ > $(MAKE) -C ovmf-dir clean; \ > fi > in order that make clean on a clean tree works. > >Yes, I recall this bug for SeaBIOS, I''ll import the fix for ovmf too. Thank you. Attilio
Ian Jackson
2012-Mar-14 14:11 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
Ian Campbell writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"):> tools: Add explicit clean rule for SeaBIOSAcked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> This is unfortunately all rather fiddly. Also even after this, "make clean" on a clean tree (without ./configure) fails: /u/iwj/work/xen-unstable-tools.hg/tools/../tools/Rules.mk:7: /u/iwj/work/xen-unstable-tools.hg/tools/../config/Tools.mk: No such file or directory You have to run ./configure before building or installing the tools I''m not sure if we care about that... Ian.
Ian Campbell
2012-Mar-14 14:21 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On Wed, 2012-03-14 at 14:11 +0000, Ian Jackson wrote:> Ian Campbell writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"): > > tools: Add explicit clean rule for SeaBIOS > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> > Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>Ta!> This is unfortunately all rather fiddly. Also even after this, "make > clean" on a clean tree (without ./configure) fails: > > /u/iwj/work/xen-unstable-tools.hg/tools/../tools/Rules.mk:7: /u/iwj/work/xen-unstable-tools.hg/tools/../config/Tools.mk: No such file or directory > You have to run ./configure before building or installing the tools > > I''m not sure if we care about that...I noticed this too. I think there is unlikely to be much to cleanup if configure hasn''t been run? So I decided that it was sufficient that ./configure && make clean works and that Tools.mk etc are only removed by distclean and not clean (which I confirmed was the case). I''m not sure what the alternatives would be, is there some mechanism by which we could whitelist targets which do not require this include. Does the contents of the subdirs recursed into for clean depend on the result of running configure? I''m happy to leave it as is. I suppose the "you have to run..." error message could be made broader to cover all invocations of make which recurse into tools. Ian.
Attilio Rao
2012-Mar-17 22:33 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 14/03/12 12:08, Ian Jackson wrote:> Attilio Rao writes ("[Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"): > >> Signed-off-by: Attilio Rao<attilio.rao@citrix.com> >> > cp ovmf-makefile ovmf/Makefile; > Switched to a new branch ''dummy'' > cp seabios-config seabios-dir/.config; > make subdirs-all > make[4]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware'' > make[5]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware'' > make -C ovmf all > make[6]: Entering directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote'' > make[6]: warning: -jN forced in submake: disabling jobserver mode. > OvmfPkg/build.sh -a X64 > Initializing workspace > /u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote/BaseTools > Unable to find expected bin path under $EDK_TOOLS_PATH! > >> /u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote/BaseTools/Bin/Linux-i486 >> > make[6]: *** [ovmf.bin] Error 1 > make[6]: Leaving directory `/u/iwj/work/xen-unstable-tools.hg/tools/firmware/ovmf-remote'' >I think I see the issue here. Are you running with i486 as an arch? This is a deficiency of the OVMF support, because it has some wrappers to build appropriately the firmware which are OS and architectures specific and it does support Linux-i686 and Linux-x86_64 but not Linux-i486. I''m not sure about what we should do here, possible options include: - Verify that, on all i486,i586,etc. we can eventually use i686 and unify the script to do that - Check if it is possible (it doesn''t seem to be already present, but I will dig further) if we can "cross-compile" the compiling OS and family and use a mechanism to offer that In any case we should check for the presence of the right wrapper and skip ovmf, spitting out an informative error, if this is really the case. Do you have feedback on the matter? Attilio
Ian Jackson
2012-Mar-19 16:36 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"):> I think I see the issue here. Are you running with i486 as an arch? > This is a deficiency of the OVMF support, because it has some wrappers > to build appropriately the firmware which are OS and architectures > specific and it does support Linux-i686 and Linux-x86_64 but not Linux-i486. > I''m not sure about what we should do here, possible options include: > - Verify that, on all i486,i586,etc. we can eventually use i686 and > unify the script to do thatSurely it''s just wanting to know roughly what architecture to build for. The difference between i686 and i486 isn''t relevant here. (I hope. If it is then we have other problems because this is tested at build-time and might be run on a different kernel to the one it''s built on.) So I think this is the right thing to do. Ian.
Attilio Rao
2012-Mar-19 17:40 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 19/03/12 16:36, Ian Jackson wrote:> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"): > >> I think I see the issue here. Are you running with i486 as an arch? >> This is a deficiency of the OVMF support, because it has some wrappers >> to build appropriately the firmware which are OS and architectures >> specific and it does support Linux-i686 and Linux-x86_64 but not Linux-i486. >> I''m not sure about what we should do here, possible options include: >> - Verify that, on all i486,i586,etc. we can eventually use i686 and >> unify the script to do that >> > Surely it''s just wanting to know roughly what architecture to build > for. The difference between i686 and i486 isn''t relevant here. > (I hope. If it is then we have other problems because this is tested > at build-time and might be run on a different kernel to the one it''s > built on.) > > So I think this is the right thing to do. > >Here is my take on OVMF for what is needed: http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> This should at least fix tianocore to build on all i*86 Linux flavours. Unfortunately I don''t have a NetBSD machine to test it out, so if Christoph and/or Roger can apply this patch to ovmf and try the original patch on this thread (and verify NetBSD can build ok) I''ll propose this patch upstream for TIANOCORE, otherwise I will just send out a patch with OVMF disabled until NetBSD is not tested. Thanks, Attilio _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Attilio Rao
2012-Mar-19 17:50 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 19/03/12 17:40, Attilio Rao wrote:> On 19/03/12 16:36, Ian Jackson wrote: >> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"): >> >>> I think I see the issue here. Are you running with i486 as an arch? >>> This is a deficiency of the OVMF support, because it has some wrappers >>> to build appropriately the firmware which are OS and architectures >>> specific and it does support Linux-i686 and Linux-x86_64 but not Linux-i486. >>> I''m not sure about what we should do here, possible options include: >>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>> unify the script to do that >>> >> Surely it''s just wanting to know roughly what architecture to build >> for. The difference between i686 and i486 isn''t relevant here. >> (I hope. If it is then we have other problems because this is tested >> at build-time and might be run on a different kernel to the one it''s >> built on.) >> >> So I think this is the right thing to do. >> >> > > Here is my take on OVMF for what is needed: > http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch > <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> > > This should at least fix tianocore to build on all i*86 Linux flavours. > Unfortunately I don''t have a NetBSD machine to test it out, so if > Christoph and/or Roger can apply this patch to ovmf and try the > original patch on this thread (and verify NetBSD can build ok) I''ll > propose this patch upstream for TIANOCORE, otherwise I will just send > out a patch with OVMF disabled until NetBSD is not tested. >To be more precise, you don''t even need the patch at the beginning of the thread, all you need to do to test you can build OVMF on NetBSD is: - git clone git://xenbits.xen.org/ovmf.git - apply the patch above - cd ovmf/OvmfPkg/ - $ ./build.sh - $ ./build.sh -a X64 Thanks, Attilio _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Christoph Egger
2012-Mar-20 10:06 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 03/19/12 18:50, Attilio Rao wrote:> On 19/03/12 17:40, Attilio Rao wrote: >> On 19/03/12 16:36, Ian Jackson wrote: >>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>> OVMF repository from specific git mirror and enable it"): >>>> I think I see the issue here. Are you running with i486 as an arch? >>>> This is a deficiency of the OVMF support, because it has some wrappers >>>> to build appropriately the firmware which are OS and architectures >>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>> Linux-i486. >>>> I''m not sure about what we should do here, possible options include: >>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>> unify the script to do that >>> Surely it''s just wanting to know roughly what architecture to build >>> for. The difference between i686 and i486 isn''t relevant here. >>> (I hope. If it is then we have other problems because this is tested >>> at build-time and might be run on a different kernel to the one it''s >>> built on.) >>> >>> So I think this is the right thing to do. >>> >> >> Here is my take on OVMF for what is needed: >> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >> >> This should at least fix tianocore to build on all i*86 Linux flavours. >> Unfortunately I don''t have a NetBSD machine to test it out, so if >> Christoph and/or Roger can apply this patch to ovmf and try the >> original patch on this thread (and verify NetBSD can build ok) I''ll >> propose this patch upstream for TIANOCORE, otherwise I will just send >> out a patch with OVMF disabled until NetBSD is not tested. >> > > To be more precise, you don''t even need the patch at the beginning of > the thread, all you need to do to test you can build OVMF on NetBSD is: > - git clone git://xenbits.xen.org/ovmf.git > - apply the patch above > - cd ovmf/OvmfPkg/ > - $ ./build.sh > - $ ./build.sh -a X64The build fails that build.sh is a bash-script and not a /bin/sh script. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Attilio Rao
2012-Mar-20 10:47 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 20/03/12 10:06, Christoph Egger wrote:> On 03/19/12 18:50, Attilio Rao wrote: > >> On 19/03/12 17:40, Attilio Rao wrote: >> >>> On 19/03/12 16:36, Ian Jackson wrote: >>> >>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>> OVMF repository from specific git mirror and enable it"): >>>> >>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>> This is a deficiency of the OVMF support, because it has some wrappers >>>>> to build appropriately the firmware which are OS and architectures >>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>> Linux-i486. >>>>> I''m not sure about what we should do here, possible options include: >>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>> unify the script to do that >>>>> >>>> Surely it''s just wanting to know roughly what architecture to build >>>> for. The difference between i686 and i486 isn''t relevant here. >>>> (I hope. If it is then we have other problems because this is tested >>>> at build-time and might be run on a different kernel to the one it''s >>>> built on.) >>>> >>>> So I think this is the right thing to do. >>>> >>>> >>> Here is my take on OVMF for what is needed: >>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>> >>> This should at least fix tianocore to build on all i*86 Linux flavours. >>> Unfortunately I don''t have a NetBSD machine to test it out, so if >>> Christoph and/or Roger can apply this patch to ovmf and try the >>> original patch on this thread (and verify NetBSD can build ok) I''ll >>> propose this patch upstream for TIANOCORE, otherwise I will just send >>> out a patch with OVMF disabled until NetBSD is not tested. >>> >>> >> To be more precise, you don''t even need the patch at the beginning of >> the thread, all you need to do to test you can build OVMF on NetBSD is: >> - git clone git://xenbits.xen.org/ovmf.git >> - apply the patch above >> - cd ovmf/OvmfPkg/ >> - $ ./build.sh >> - $ ./build.sh -a X64 >> > The build fails that build.sh is a bash-script and not a /bin/sh script. > >Can you please post me the output please? Attilio
Christoph Egger
2012-Mar-20 11:04 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 03/20/12 11:47, Attilio Rao wrote:> On 20/03/12 10:06, Christoph Egger wrote: >> On 03/19/12 18:50, Attilio Rao wrote: >>> On 19/03/12 17:40, Attilio Rao wrote: >>>> On 19/03/12 16:36, Ian Jackson wrote: >>>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>>> OVMF repository from specific git mirror and enable it"): >>>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>>> This is a deficiency of the OVMF support, because it has some >>>>>> wrappers >>>>>> to build appropriately the firmware which are OS and architectures >>>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>>> Linux-i486. >>>>>> I''m not sure about what we should do here, possible options include: >>>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>>> unify the script to do that >>>>> Surely it''s just wanting to know roughly what architecture to build >>>>> for. The difference between i686 and i486 isn''t relevant here. >>>>> (I hope. If it is then we have other problems because this is tested >>>>> at build-time and might be run on a different kernel to the one it''s >>>>> built on.) >>>>> >>>>> So I think this is the right thing to do. >>>>> >>>> Here is my take on OVMF for what is needed: >>>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>>> >>>> This should at least fix tianocore to build on all i*86 Linux flavours. >>>> Unfortunately I don''t have a NetBSD machine to test it out, so if >>>> Christoph and/or Roger can apply this patch to ovmf and try the >>>> original patch on this thread (and verify NetBSD can build ok) I''ll >>>> propose this patch upstream for TIANOCORE, otherwise I will just send >>>> out a patch with OVMF disabled until NetBSD is not tested. >>>> >>> To be more precise, you don''t even need the patch at the beginning of >>> the thread, all you need to do to test you can build OVMF on NetBSD is: >>> - git clone git://xenbits.xen.org/ovmf.git >>> - apply the patch above >>> - cd ovmf/OvmfPkg/ >>> - $ ./build.sh >>> - $ ./build.sh -a X64 >> The build fails that build.sh is a bash-script and not a /bin/sh script. >> > > Can you please post me the output please?/bin/bash: no such file or directory. replace #!/bin/bash -> #!/bin/sh shopt: not found source: not found -> replace source with ''.'' .: edksetup.sh: not found -> replace edksetup.sh with ../edksetup.sh .: Can''t open ../edksetup.sh Haven''t analyzed it further. Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Attilio Rao
2012-Mar-20 11:09 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 20/03/12 10:06, Christoph Egger wrote:> On 03/19/12 18:50, Attilio Rao wrote: > >> On 19/03/12 17:40, Attilio Rao wrote: >> >>> On 19/03/12 16:36, Ian Jackson wrote: >>> >>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>> OVMF repository from specific git mirror and enable it"): >>>> >>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>> This is a deficiency of the OVMF support, because it has some wrappers >>>>> to build appropriately the firmware which are OS and architectures >>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>> Linux-i486. >>>>> I''m not sure about what we should do here, possible options include: >>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>> unify the script to do that >>>>> >>>> Surely it''s just wanting to know roughly what architecture to build >>>> for. The difference between i686 and i486 isn''t relevant here. >>>> (I hope. If it is then we have other problems because this is tested >>>> at build-time and might be run on a different kernel to the one it''s >>>> built on.) >>>> >>>> So I think this is the right thing to do. >>>> >>>> >>> Here is my take on OVMF for what is needed: >>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>> >>> This should at least fix tianocore to build on all i*86 Linux flavours. >>> Unfortunately I don''t have a NetBSD machine to test it out, so if >>> Christoph and/or Roger can apply this patch to ovmf and try the >>> original patch on this thread (and verify NetBSD can build ok) I''ll >>> propose this patch upstream for TIANOCORE, otherwise I will just send >>> out a patch with OVMF disabled until NetBSD is not tested. >>> >>> >> To be more precise, you don''t even need the patch at the beginning of >> the thread, all you need to do to test you can build OVMF on NetBSD is: >> - git clone git://xenbits.xen.org/ovmf.git >> - apply the patch above >> - cd ovmf/OvmfPkg/ >> - $ ./build.sh >> - $ ./build.sh -a X64 >> > The build fails that build.sh is a bash-script and not a /bin/sh script. > >Please forget my previous e-mail. I''ve updated the patch (same link) and I''d be grateful if you can give it a try now. (Sorry but I really don''t have now a NetBSD machine to test on, so I cannot really catch even silly mistakes). Attilio
Roger Pau Monné
2012-Mar-20 11:11 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
2012/3/20 Christoph Egger <Christoph.Egger@amd.com>:> On 03/20/12 11:47, Attilio Rao wrote: >> >> On 20/03/12 10:06, Christoph Egger wrote: >>> >>> On 03/19/12 18:50, Attilio Rao wrote: >>>> >>>> On 19/03/12 17:40, Attilio Rao wrote: >>>>> >>>>> On 19/03/12 16:36, Ian Jackson wrote: >>>>>> >>>>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>>>> OVMF repository from specific git mirror and enable it"): >>>>>>> >>>>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>>>> This is a deficiency of the OVMF support, because it has some >>>>>>> wrappers >>>>>>> to build appropriately the firmware which are OS and architectures >>>>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>>>> Linux-i486. >>>>>>> I'm not sure about what we should do here, possible options include: >>>>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>>>> unify the script to do that >>>>>> >>>>>> Surely it's just wanting to know roughly what architecture to build >>>>>> for. The difference between i686 and i486 isn't relevant here. >>>>>> (I hope. If it is then we have other problems because this is tested >>>>>> at build-time and might be run on a different kernel to the one it's >>>>>> built on.) >>>>>> >>>>>> So I think this is the right thing to do. >>>>>> >>>>> Here is my take on OVMF for what is needed: >>>>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>>>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>>>> >>>>> This should at least fix tianocore to build on all i*86 Linux flavours. >>>>> Unfortunately I don't have a NetBSD machine to test it out, so if >>>>> Christoph and/or Roger can apply this patch to ovmf and try the >>>>> original patch on this thread (and verify NetBSD can build ok) I'll >>>>> propose this patch upstream for TIANOCORE, otherwise I will just send >>>>> out a patch with OVMF disabled until NetBSD is not tested. >>>>> >>>> To be more precise, you don't even need the patch at the beginning of >>>> the thread, all you need to do to test you can build OVMF on NetBSD is: >>>> - git clone git://xenbits.xen.org/ovmf.git >>>> - apply the patch above >>>> - cd ovmf/OvmfPkg/ >>>> - $ ./build.sh >>>> - $ ./build.sh -a X64 >>> >>> The build fails that build.sh is a bash-script and not a /bin/sh script. >>> >> >> Can you please post me the output please? > > > /bin/bash: no such file or directory. > > replace #!/bin/bash -> #!/bin/shCould you check if that works if you replace #!/bin/bash with #!/usr/bin/env bash (provided that you have bash installed)? Also config/Tools.mk has the bash path defined in $(BASH), isn't there anyway we can pass this to the build script?> shopt: not found > > source: not found -> replace source with '.' > > .: edksetup.sh: not found -> replace edksetup.sh with ../edksetup.sh > > .: Can't open ../edksetup.sh > > Haven't analyzed it further. > > > Christoph > > > -- > ---to satisfy European Law for business letters: > Advanced Micro Devices GmbH > Einsteinring 24, 85689 Dornach b. Muenchen > Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd > Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen > Registergericht Muenchen, HRB Nr. 43632 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Roger Pau Monné
2012-Mar-20 11:16 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
2012/3/1 Attilio Rao <attilio.rao@citrix.com>:> Signed-off-by: Attilio Rao <attilio.rao@citrix.com> > > --- > > Differences with previous version: > - Add ovmf entries to .hgignore > - Add a rule in tools/firmware/Makefile for ovmf-find in order to cope with > already cloned git repositories > > diff -r d7fe4cd831a0 -r 402a1e16b2d8 .hgignore > --- a/.hgignore Wed Feb 29 17:01:41 2012 +0000 > +++ b/.hgignore Thu Mar 01 19:27:17 2012 +0000 > @@ -287,6 +287,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 d7fe4cd831a0 -r 402a1e16b2d8 Config.mk > --- a/Config.mk Wed Feb 29 17:01:41 2012 +0000 > +++ b/Config.mk Thu Mar 01 19:27:17 2012 +0000 > @@ -187,12 +187,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 ?= 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 ?= ySince this is in the tools directory (and I think it's a tools only thing), shouldn't this option be set by the configure script instead of hardcoding it in Config.mk?> CONFIG_ROMBIOS ?= y > CONFIG_SEABIOS ?= y > > diff -r d7fe4cd831a0 -r 402a1e16b2d8 tools/firmware/Makefile > --- a/tools/firmware/Makefile Wed Feb 29 17:01:41 2012 +0000 > +++ b/tools/firmware/Makefile Thu Mar 01 19:27:17 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,30 @@ 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 > + > .PHONY: seabios-dir-force-update > seabios-dir-force-update: > set -ex; \ > diff -r d7fe4cd831a0 -r 402a1e16b2d8 tools/firmware/ovmf-makefile > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tools/firmware/ovmf-makefile Thu Mar 01 19:27:17 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@lists.xen.org > http://lists.xen.org/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Attilio Rao
2012-Mar-20 11:28 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 20/03/12 11:16, Roger Pau Monné wrote:> 2012/3/1 Attilio Rao<attilio.rao@citrix.com>: > >> Signed-off-by: Attilio Rao<attilio.rao@citrix.com> >> >> --- >> >> Differences with previous version: >> - Add ovmf entries to .hgignore >> - Add a rule in tools/firmware/Makefile for ovmf-find in order to cope with >> already cloned git repositories >> >> diff -r d7fe4cd831a0 -r 402a1e16b2d8 .hgignore >> --- a/.hgignore Wed Feb 29 17:01:41 2012 +0000 >> +++ b/.hgignore Thu Mar 01 19:27:17 2012 +0000 >> @@ -287,6 +287,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 d7fe4cd831a0 -r 402a1e16b2d8 Config.mk >> --- a/Config.mk Wed Feb 29 17:01:41 2012 +0000 >> +++ b/Config.mk Thu Mar 01 19:27:17 2012 +0000 >> @@ -187,12 +187,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 ?= 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 >> > Since this is in the tools directory (and I think it's a tools only > thing), shouldn't this option be set by the configure script instead > of hardcoding it in Config.mk? > >I'm really just following SEABIOS here, whatever policy we do for OVMF should be mirrored in SeaBIOS I think. Thanks, Attilio _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Christoph Egger
2012-Mar-20 11:57 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 03/20/12 12:09, Attilio Rao wrote:> On 20/03/12 10:06, Christoph Egger wrote: >> On 03/19/12 18:50, Attilio Rao wrote: >>> On 19/03/12 17:40, Attilio Rao wrote: >>>> On 19/03/12 16:36, Ian Jackson wrote: >>>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>>> OVMF repository from specific git mirror and enable it"): >>>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>>> This is a deficiency of the OVMF support, because it has some >>>>>> wrappers >>>>>> to build appropriately the firmware which are OS and architectures >>>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>>> Linux-i486. >>>>>> I''m not sure about what we should do here, possible options include: >>>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>>> unify the script to do that >>>>> Surely it''s just wanting to know roughly what architecture to build >>>>> for. The difference between i686 and i486 isn''t relevant here. >>>>> (I hope. If it is then we have other problems because this is tested >>>>> at build-time and might be run on a different kernel to the one it''s >>>>> built on.) >>>>> >>>>> So I think this is the right thing to do. >>>>> >>>> Here is my take on OVMF for what is needed: >>>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>>> >>>> This should at least fix tianocore to build on all i*86 Linux flavours. >>>> Unfortunately I don''t have a NetBSD machine to test it out, so if >>>> Christoph and/or Roger can apply this patch to ovmf and try the >>>> original patch on this thread (and verify NetBSD can build ok) I''ll >>>> propose this patch upstream for TIANOCORE, otherwise I will just send >>>> out a patch with OVMF disabled until NetBSD is not tested. >>>> >>> To be more precise, you don''t even need the patch at the beginning of >>> the thread, all you need to do to test you can build OVMF on NetBSD is: >>> - git clone git://xenbits.xen.org/ovmf.git >>> - apply the patch above >>> - cd ovmf/OvmfPkg/ >>> - $ ./build.sh >>> - $ ./build.sh -a X64 >> The build fails that build.sh is a bash-script and not a /bin/sh script. >> > > Please forget my previous e-mail. > I''ve updated the patch (same link) and I''d be grateful if you can give > it a try now.I replaced #!/bin/bash with #!/usr/bin/env bash in the entire tree and get this: Initializing workspace /data/xen-ovmf/ovmf/BaseTools WORKSPACE: /data/xen-ovmf/ovmf EDK_TOOLS_PATH: /data/xen-ovmf/ovmf/BaseTools Copying $EDK_TOOLS_PATH/Conf/build_rule.template to $WORKSPACE/Conf/build_rule.txt Copying $EDK_TOOLS_PATH/Conf/FrameworkDatabase.template to $WORKSPACE/Conf/FrameworkDatabase.txt Copying $EDK_TOOLS_PATH/Conf/tools_def.template to $WORKSPACE/Conf/tools_def.txt Copying $EDK_TOOLS_PATH/Conf/target.template to $WORKSPACE/Conf/target.txt Building tools as they are not in the path SourceCMakefilesNmakeSubdirs.bat: not found> (Sorry but I really don''t have now a NetBSD machine to test on, so I > cannot really catch even silly mistakes).Installing NetBSD in a virtual machine is not an option? Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Attilio Rao
2012-Mar-20 12:12 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 20/03/12 11:57, Christoph Egger wrote:> On 03/20/12 12:09, Attilio Rao wrote: > >> On 20/03/12 10:06, Christoph Egger wrote: >> >>> On 03/19/12 18:50, Attilio Rao wrote: >>> >>>> On 19/03/12 17:40, Attilio Rao wrote: >>>> >>>>> On 19/03/12 16:36, Ian Jackson wrote: >>>>> >>>>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>>>> OVMF repository from specific git mirror and enable it"): >>>>>> >>>>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>>>> This is a deficiency of the OVMF support, because it has some >>>>>>> wrappers >>>>>>> to build appropriately the firmware which are OS and architectures >>>>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>>>> Linux-i486. >>>>>>> I''m not sure about what we should do here, possible options include: >>>>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>>>> unify the script to do that >>>>>>> >>>>>> Surely it''s just wanting to know roughly what architecture to build >>>>>> for. The difference between i686 and i486 isn''t relevant here. >>>>>> (I hope. If it is then we have other problems because this is tested >>>>>> at build-time and might be run on a different kernel to the one it''s >>>>>> built on.) >>>>>> >>>>>> So I think this is the right thing to do. >>>>>> >>>>>> >>>>> Here is my take on OVMF for what is needed: >>>>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>>>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>>>> >>>>> This should at least fix tianocore to build on all i*86 Linux flavours. >>>>> Unfortunately I don''t have a NetBSD machine to test it out, so if >>>>> Christoph and/or Roger can apply this patch to ovmf and try the >>>>> original patch on this thread (and verify NetBSD can build ok) I''ll >>>>> propose this patch upstream for TIANOCORE, otherwise I will just send >>>>> out a patch with OVMF disabled until NetBSD is not tested. >>>>> >>>>> >>>> To be more precise, you don''t even need the patch at the beginning of >>>> the thread, all you need to do to test you can build OVMF on NetBSD is: >>>> - git clone git://xenbits.xen.org/ovmf.git >>>> - apply the patch above >>>> - cd ovmf/OvmfPkg/ >>>> - $ ./build.sh >>>> - $ ./build.sh -a X64 >>>> >>> The build fails that build.sh is a bash-script and not a /bin/sh script. >>> >>> >> Please forget my previous e-mail. >> I''ve updated the patch (same link) and I''d be grateful if you can give >> it a try now. >> > I replaced #!/bin/bash with #!/usr/bin/env bash in the entire tree and > get this: > > Initializing workspace > /data/xen-ovmf/ovmf/BaseTools > WORKSPACE: /data/xen-ovmf/ovmf > EDK_TOOLS_PATH: /data/xen-ovmf/ovmf/BaseTools > Copying $EDK_TOOLS_PATH/Conf/build_rule.template > to $WORKSPACE/Conf/build_rule.txt > Copying $EDK_TOOLS_PATH/Conf/FrameworkDatabase.template > to $WORKSPACE/Conf/FrameworkDatabase.txt > Copying $EDK_TOOLS_PATH/Conf/tools_def.template > to $WORKSPACE/Conf/tools_def.txt > Copying $EDK_TOOLS_PATH/Conf/target.template > to $WORKSPACE/Conf/target.txt > Building tools as they are not in the path > SourceCMakefilesNmakeSubdirs.bat: not found > > >Yes, you also need to replace make with gmake in installation scripts.>> (Sorry but I really don''t have now a NetBSD machine to test on, so I >> cannot really catch even silly mistakes). >> > Installing NetBSD in a virtual machine is not an option? > >I''m trying that with a native FreeBSD, will let you know once I have a patch ready to go. Attilio
Christoph Egger
2012-Mar-20 13:52 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 03/20/12 13:12, Attilio Rao wrote:> On 20/03/12 11:57, Christoph Egger wrote: >> On 03/20/12 12:09, Attilio Rao wrote: >>> On 20/03/12 10:06, Christoph Egger wrote: >>>> On 03/19/12 18:50, Attilio Rao wrote: >>>>> On 19/03/12 17:40, Attilio Rao wrote: >>>>>> On 19/03/12 16:36, Ian Jackson wrote: >>>>>>> Attilio Rao writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the >>>>>>> OVMF repository from specific git mirror and enable it"): >>>>>>>> I think I see the issue here. Are you running with i486 as an arch? >>>>>>>> This is a deficiency of the OVMF support, because it has some >>>>>>>> wrappers >>>>>>>> to build appropriately the firmware which are OS and architectures >>>>>>>> specific and it does support Linux-i686 and Linux-x86_64 but not >>>>>>>> Linux-i486. >>>>>>>> I''m not sure about what we should do here, possible options >>>>>>>> include: >>>>>>>> - Verify that, on all i486,i586,etc. we can eventually use i686 and >>>>>>>> unify the script to do that >>>>>>> Surely it''s just wanting to know roughly what architecture to build >>>>>>> for. The difference between i686 and i486 isn''t relevant here. >>>>>>> (I hope. If it is then we have other problems because this is tested >>>>>>> at build-time and might be run on a different kernel to the one it''s >>>>>>> built on.) >>>>>>> >>>>>>> So I think this is the right thing to do. >>>>>>> >>>>>> Here is my take on OVMF for what is needed: >>>>>> http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch >>>>>> <http://xenbits.xen.org/people/attilio/ovmf-xen-arches.patch> >>>>>> >>>>>> This should at least fix tianocore to build on all i*86 Linux >>>>>> flavours. >>>>>> Unfortunately I don''t have a NetBSD machine to test it out, so if >>>>>> Christoph and/or Roger can apply this patch to ovmf and try the >>>>>> original patch on this thread (and verify NetBSD can build ok) I''ll >>>>>> propose this patch upstream for TIANOCORE, otherwise I will just send >>>>>> out a patch with OVMF disabled until NetBSD is not tested. >>>>>> >>>>> To be more precise, you don''t even need the patch at the beginning of >>>>> the thread, all you need to do to test you can build OVMF on NetBSD >>>>> is: >>>>> - git clone git://xenbits.xen.org/ovmf.git >>>>> - apply the patch above >>>>> - cd ovmf/OvmfPkg/ >>>>> - $ ./build.sh >>>>> - $ ./build.sh -a X64 >>>> The build fails that build.sh is a bash-script and not a /bin/sh >>>> script. >>>> >>> Please forget my previous e-mail. >>> I''ve updated the patch (same link) and I''d be grateful if you can give >>> it a try now. >> I replaced #!/bin/bash with #!/usr/bin/env bash in the entire tree and >> get this: >> >> Initializing workspace >> /data/xen-ovmf/ovmf/BaseTools >> WORKSPACE: /data/xen-ovmf/ovmf >> EDK_TOOLS_PATH: /data/xen-ovmf/ovmf/BaseTools >> Copying $EDK_TOOLS_PATH/Conf/build_rule.template >> to $WORKSPACE/Conf/build_rule.txt >> Copying $EDK_TOOLS_PATH/Conf/FrameworkDatabase.template >> to $WORKSPACE/Conf/FrameworkDatabase.txt >> Copying $EDK_TOOLS_PATH/Conf/tools_def.template >> to $WORKSPACE/Conf/tools_def.txt >> Copying $EDK_TOOLS_PATH/Conf/target.template >> to $WORKSPACE/Conf/target.txt >> Building tools as they are not in the path >> SourceCMakefilesNmakeSubdirs.bat: not found >> >> > > Yes, you also need to replace make with gmake in installation scripts.Ok, you should allow to pass $(MAKE) to build.sh when building from the Xen tree. I get this now: $ ./build.sh Initializing workspace /data/xen-ovmf/ovmf/BaseTools Loading previous configuration from $WORKSPACE/Conf/BuildEnv.sh WORKSPACE: /data/xen-ovmf/ovmf EDK_TOOLS_PATH: /data/xen-ovmf/ovmf/BaseTools Building tools as they are not in the path gmake: Entering directory `/data/xen-ovmf/ovmf/BaseTools'' gmake -C Source/C Attempting to detect ARCH from ''uname -m'': amd64 Could not detected ARCH from uname results gmake[1]: Entering directory `/data/xen-ovmf/ovmf/BaseTools/Source/C'' GNUmakefile:33: *** ARCH is not defined!. Stop. gmake[1]: Leaving directory `/data/xen-ovmf/ovmf/BaseTools/Source/C'' gmake: *** [Source/C] Error 2 gmake: Leaving directory `/data/xen-ovmf/ovmf/BaseTools''>>> (Sorry but I really don''t have now a NetBSD machine to test on, so I >>> cannot really catch even silly mistakes). >> Installing NetBSD in a virtual machine is not an option? >> > > I''m trying that with a native FreeBSD, will let you know once I have a > patch ready to go. > > Attilio >-- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
Ian Jackson
2012-Mar-20 16:30 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
Christoph Egger writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"):> Ok, you should allow to pass $(MAKE) to build.sh when building from the > Xen tree.Before we go entirely down this particular rathole, Christoph, can you please confirm whether upstream OVMF builds on FreeBSD ? Ian.
Christoph Egger
2012-Mar-20 16:44 UTC
Re: [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it
On 03/20/12 17:30, Ian Jackson wrote:> Christoph Egger writes ("Re: [Xen-devel] [PATCH] [PATCH v3] Fetch the OVMF repository from specific git mirror and enable it"): >> Ok, you should allow to pass $(MAKE) to build.sh when building from the >> Xen tree. > > Before we go entirely down this particular rathole, Christoph, can you > please confirm whether upstream OVMF builds on FreeBSD ?I don''t have a FreeBSD installation. I suppose you mean NetBSD, right? Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632