Message ID | 20190118223400.24311-2-lersek@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | add the BiosTablesTest UEFI app, build it with the new roms/edk2 submodule | expand |
On Fri, Jan 18, 2019 at 11:33:56PM +0100, Laszlo Ersek wrote: > The roms/edk2 submodule can help with three goals: > - build the OVMF and ArmVirtQemu virtual UEFI firmware platforms (to be > implemented later), > - build the EfiRom tool on the fly, which is used in roms/Makefile, for > building the "efirom" target, > - build UEFI test applications (to be run in guests), for qtest support. > > Edk2 commit 85588389222a3636baf0f9ed8227f2434af4c3f9 stands for the latest > "stable tag", namely "edk2-stable201811". > > The edk2 repository tracks some binary files that should not be removed by > QEMU's top-level "make clean"; exempt the full pathnames from the "find" > command. Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> > > Cc: "Michael S. Tsirkin" <mst@redhat.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Gerd Hoffmann <kraxel@redhat.com> > Cc: Igor Mammedov <imammedo@redhat.com> > Cc: Philippe Mathieu-Daudé <philmd@redhat.com> > Cc: Shannon Zhao <shannon.zhaosl@gmail.com> > Signed-off-by: Laszlo Ersek <lersek@redhat.com> > --- > Makefile | 6 +++++- > .gitmodules | 3 +++ > roms/edk2 | 1 + > 3 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index dccba1dca27f..1f768e2bcf8f 100644 > --- a/Makefile > +++ b/Makefile > @@ -602,7 +602,11 @@ clean: > rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h > rm -f qemu-options.def > rm -f *.msi > - find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + > + find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ > + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ > + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ > + ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ > + -exec rm {} + > rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ > rm -f fsdev/*.pod scsi/*.pod > rm -f qemu-img-cmds.h > diff --git a/.gitmodules b/.gitmodules > index 6b91176098c8..ceafb0ee29a0 100644 > --- a/.gitmodules > +++ b/.gitmodules > @@ -49,3 +49,6 @@ > [submodule "tests/fp/berkeley-softfloat-3"] > path = tests/fp/berkeley-softfloat-3 > url = https://github.com/cota/berkeley-softfloat-3 > +[submodule "roms/edk2"] > + path = roms/edk2 > + url = https://github.com/tianocore/edk2.git > diff --git a/roms/edk2 b/roms/edk2 > new file mode 160000 > index 000000000000..85588389222a > --- /dev/null > +++ b/roms/edk2 > @@ -0,0 +1 @@ > +Subproject commit 85588389222a3636baf0f9ed8227f2434af4c3f9 > -- > 2.19.1.3.g30247aa5d201 > >
Cc'ing Daniel & Alex. On 1/18/19 11:33 PM, Laszlo Ersek wrote: > The roms/edk2 submodule can help with three goals: > - build the OVMF and ArmVirtQemu virtual UEFI firmware platforms (to be > implemented later), > - build the EfiRom tool on the fly, which is used in roms/Makefile, for > building the "efirom" target, > - build UEFI test applications (to be run in guests), for qtest support. > > Edk2 commit 85588389222a3636baf0f9ed8227f2434af4c3f9 stands for the latest > "stable tag", namely "edk2-stable201811". > > The edk2 repository tracks some binary files that should not be removed by > QEMU's top-level "make clean"; exempt the full pathnames from the "find" > command. > > Cc: "Michael S. Tsirkin" <mst@redhat.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Gerd Hoffmann <kraxel@redhat.com> > Cc: Igor Mammedov <imammedo@redhat.com> > Cc: Philippe Mathieu-Daudé <philmd@redhat.com> > Cc: Shannon Zhao <shannon.zhaosl@gmail.com> > Signed-off-by: Laszlo Ersek <lersek@redhat.com> > --- > Makefile | 6 +++++- > .gitmodules | 3 +++ > roms/edk2 | 1 + > 3 files changed, 9 insertions(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index dccba1dca27f..1f768e2bcf8f 100644 > --- a/Makefile > +++ b/Makefile > @@ -602,7 +602,11 @@ clean: > rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h > rm -f qemu-options.def > rm -f *.msi > - find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + > + find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ > + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ > + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ > + ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ Hmm I never try in-tree builds and thought this rule was for the archived release out of git, so this wouldn't matter. > + -exec rm {} + > rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ > rm -f fsdev/*.pod scsi/*.pod > rm -f qemu-img-cmds.h > diff --git a/.gitmodules b/.gitmodules > index 6b91176098c8..ceafb0ee29a0 100644 > --- a/.gitmodules > +++ b/.gitmodules > @@ -49,3 +49,6 @@ > [submodule "tests/fp/berkeley-softfloat-3"] > path = tests/fp/berkeley-softfloat-3 > url = https://github.com/cota/berkeley-softfloat-3 > +[submodule "roms/edk2"] > + path = roms/edk2 > + url = https://github.com/tianocore/edk2.git Indeed this is enough to build EfiRom. However if you want to build firmwares (your patch 4/5), the submodule is incomplete, until you manually run "submodule update --init --recursive". I suggest the following change, Daniel/Alex what do you think? -- >8 -- diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh index 98ca0f2737..5441fe3385 100755 --- a/scripts/git-submodule.sh +++ b/scripts/git-submodule.sh @@ -71,7 +71,7 @@ update) exit 0 fi - $GIT submodule update --init $modules 1>/dev/null + $GIT submodule update --init --recursive $modules 1>/dev/null test $? -ne 0 && error "failed to update modules" $GIT submodule status $modules > "${substat}" --- > diff --git a/roms/edk2 b/roms/edk2 > new file mode 160000 > index 000000000000..85588389222a > --- /dev/null > +++ b/roms/edk2 > @@ -0,0 +1 @@ > +Subproject commit 85588389222a3636baf0f9ed8227f2434af4c3f9 >
On 01/21/19 12:25, Philippe Mathieu-Daudé wrote: > Cc'ing Daniel & Alex. > > On 1/18/19 11:33 PM, Laszlo Ersek wrote: >> The roms/edk2 submodule can help with three goals: >> - build the OVMF and ArmVirtQemu virtual UEFI firmware platforms (to be >> implemented later), >> - build the EfiRom tool on the fly, which is used in roms/Makefile, for >> building the "efirom" target, >> - build UEFI test applications (to be run in guests), for qtest support. >> >> Edk2 commit 85588389222a3636baf0f9ed8227f2434af4c3f9 stands for the latest >> "stable tag", namely "edk2-stable201811". >> >> The edk2 repository tracks some binary files that should not be removed by >> QEMU's top-level "make clean"; exempt the full pathnames from the "find" >> command. >> >> Cc: "Michael S. Tsirkin" <mst@redhat.com> >> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> Cc: Gerd Hoffmann <kraxel@redhat.com> >> Cc: Igor Mammedov <imammedo@redhat.com> >> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> >> Cc: Shannon Zhao <shannon.zhaosl@gmail.com> >> Signed-off-by: Laszlo Ersek <lersek@redhat.com> >> --- >> Makefile | 6 +++++- >> .gitmodules | 3 +++ >> roms/edk2 | 1 + >> 3 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/Makefile b/Makefile >> index dccba1dca27f..1f768e2bcf8f 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -602,7 +602,11 @@ clean: >> rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h >> rm -f qemu-options.def >> rm -f *.msi >> - find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + >> + find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ >> + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ >> + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ >> + ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ > > Hmm I never try in-tree builds and thought this rule was for the > archived release out of git, so this wouldn't matter. That's not correct; before I posted the series, I downloaded the then-latest tarball release, and I saw that the roms/ submoule trees were flattened into it. Try: wget -O - -q https://download.qemu.org/qemu-3.1.0.tar.xz \ | tar -t --xz \ | grep roms/ > >> + -exec rm {} + >> rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ >> rm -f fsdev/*.pod scsi/*.pod >> rm -f qemu-img-cmds.h >> diff --git a/.gitmodules b/.gitmodules >> index 6b91176098c8..ceafb0ee29a0 100644 >> --- a/.gitmodules >> +++ b/.gitmodules >> @@ -49,3 +49,6 @@ >> [submodule "tests/fp/berkeley-softfloat-3"] >> path = tests/fp/berkeley-softfloat-3 >> url = https://github.com/cota/berkeley-softfloat-3 >> +[submodule "roms/edk2"] >> + path = roms/edk2 >> + url = https://github.com/tianocore/edk2.git > > Indeed this is enough to build EfiRom. > However if you want to build firmwares (your patch 4/5), the submodule > is incomplete, until you manually run "submodule update --init --recursive". That applies equally to the other submodules (firmware or otherwise) that we have under roms/. Edk2 is not being added as a nested submodule, it is a sibling; so whatever tooling covers e.g. roms/seabios and roms/ipxe, the same tooling should cover roms/edk2 too. > > I suggest the following change, Daniel/Alex what do you think? > > -- >8 -- > diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh > index 98ca0f2737..5441fe3385 100755 > --- a/scripts/git-submodule.sh > +++ b/scripts/git-submodule.sh > @@ -71,7 +71,7 @@ update) > exit 0 > fi > > - $GIT submodule update --init $modules 1>/dev/null > + $GIT submodule update --init --recursive $modules 1>/dev/null > test $? -ne 0 && error "failed to update modules" > > $GIT submodule status $modules > "${substat}" > --- This shouldn't make a difference, as edk2 is not a nested submodule of another submodule; it is a submodule directly under the main superproject, i.e. QEMU. Thanks, Laszlo > >> diff --git a/roms/edk2 b/roms/edk2 >> new file mode 160000 >> index 000000000000..85588389222a >> --- /dev/null >> +++ b/roms/edk2 >> @@ -0,0 +1 @@ >> +Subproject commit 85588389222a3636baf0f9ed8227f2434af4c3f9 >>
On 1/21/19 7:41 PM, Laszlo Ersek wrote: > On 01/21/19 12:25, Philippe Mathieu-Daudé wrote: >> Cc'ing Daniel & Alex. >> >> On 1/18/19 11:33 PM, Laszlo Ersek wrote: >>> The roms/edk2 submodule can help with three goals: >>> - build the OVMF and ArmVirtQemu virtual UEFI firmware platforms (to be >>> implemented later), >>> - build the EfiRom tool on the fly, which is used in roms/Makefile, for >>> building the "efirom" target, >>> - build UEFI test applications (to be run in guests), for qtest support. >>> >>> Edk2 commit 85588389222a3636baf0f9ed8227f2434af4c3f9 stands for the latest >>> "stable tag", namely "edk2-stable201811". >>> >>> The edk2 repository tracks some binary files that should not be removed by >>> QEMU's top-level "make clean"; exempt the full pathnames from the "find" >>> command. >>> >>> Cc: "Michael S. Tsirkin" <mst@redhat.com> >>> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> >>> Cc: Gerd Hoffmann <kraxel@redhat.com> >>> Cc: Igor Mammedov <imammedo@redhat.com> >>> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> >>> Cc: Shannon Zhao <shannon.zhaosl@gmail.com> >>> Signed-off-by: Laszlo Ersek <lersek@redhat.com> >>> --- >>> Makefile | 6 +++++- >>> .gitmodules | 3 +++ >>> roms/edk2 | 1 + >>> 3 files changed, 9 insertions(+), 1 deletion(-) >>> >>> diff --git a/Makefile b/Makefile >>> index dccba1dca27f..1f768e2bcf8f 100644 >>> --- a/Makefile >>> +++ b/Makefile >>> @@ -602,7 +602,11 @@ clean: >>> rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h >>> rm -f qemu-options.def >>> rm -f *.msi >>> - find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + >>> + find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ >>> + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ >>> + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ >>> + ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ >> >> Hmm I never try in-tree builds and thought this rule was for the >> archived release out of git, so this wouldn't matter. > > That's not correct; before I posted the series, I downloaded the > then-latest tarball release, and I saw that the roms/ submoule trees > were flattened into it. Try: My previous sentence is probably incorrect in english, let me reword as: "I thought (incorrectly) this rule wouldn't matter for in-tree builds". So I see it does matter, and your change do make sens. > > wget -O - -q https://download.qemu.org/qemu-3.1.0.tar.xz \ > | tar -t --xz \ > | grep roms/ > >> >>> + -exec rm {} + >>> rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ >>> rm -f fsdev/*.pod scsi/*.pod >>> rm -f qemu-img-cmds.h >>> diff --git a/.gitmodules b/.gitmodules >>> index 6b91176098c8..ceafb0ee29a0 100644 >>> --- a/.gitmodules >>> +++ b/.gitmodules >>> @@ -49,3 +49,6 @@ >>> [submodule "tests/fp/berkeley-softfloat-3"] >>> path = tests/fp/berkeley-softfloat-3 >>> url = https://github.com/cota/berkeley-softfloat-3 >>> +[submodule "roms/edk2"] >>> + path = roms/edk2 >>> + url = https://github.com/tianocore/edk2.git >> >> Indeed this is enough to build EfiRom. >> However if you want to build firmwares (your patch 4/5), the submodule >> is incomplete, until you manually run "submodule update --init --recursive". > > That applies equally to the other submodules (firmware or otherwise) > that we have under roms/. Edk2 is not being added as a nested submodule, > it is a sibling; so whatever tooling covers e.g. roms/seabios and > roms/ipxe, the same tooling should cover roms/edk2 too. OK. >> >> I suggest the following change, Daniel/Alex what do you think? >> >> -- >8 -- >> diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh >> index 98ca0f2737..5441fe3385 100755 >> --- a/scripts/git-submodule.sh >> +++ b/scripts/git-submodule.sh >> @@ -71,7 +71,7 @@ update) >> exit 0 >> fi >> >> - $GIT submodule update --init $modules 1>/dev/null >> + $GIT submodule update --init --recursive $modules 1>/dev/null >> test $? -ne 0 && error "failed to update modules" >> >> $GIT submodule status $modules > "${substat}" >> --- > > This shouldn't make a difference, as edk2 is not a nested submodule of > another submodule; it is a submodule directly under the main > superproject, i.e. QEMU. OK (as long as we don't want to build OVMF within QEMU to run QEMU tests). > > Thanks, > Laszlo > >> >>> diff --git a/roms/edk2 b/roms/edk2 >>> new file mode 160000 >>> index 000000000000..85588389222a >>> --- /dev/null >>> +++ b/roms/edk2 >>> @@ -0,0 +1 @@ >>> +Subproject commit 85588389222a3636baf0f9ed8227f2434af4c3f9 >>> >
On 01/21/19 20:45, Philippe Mathieu-Daudé wrote: > On 1/21/19 7:41 PM, Laszlo Ersek wrote: >> On 01/21/19 12:25, Philippe Mathieu-Daudé wrote: >>> I suggest the following change, Daniel/Alex what do you think? >>> >>> -- >8 -- >>> diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh >>> index 98ca0f2737..5441fe3385 100755 >>> --- a/scripts/git-submodule.sh >>> +++ b/scripts/git-submodule.sh >>> @@ -71,7 +71,7 @@ update) >>> exit 0 >>> fi >>> >>> - $GIT submodule update --init $modules 1>/dev/null >>> + $GIT submodule update --init --recursive $modules 1>/dev/null >>> test $? -ne 0 && error "failed to update modules" >>> >>> $GIT submodule status $modules > "${substat}" >>> --- >> >> This shouldn't make a difference, as edk2 is not a nested submodule of >> another submodule; it is a submodule directly under the main >> superproject, i.e. QEMU. > > OK (as long as we don't want to build OVMF within QEMU to run QEMU tests). I think if / whenever we bundle OVMF binaries with QEMU, there'll be a two step process (like with other roms); maintainers will (re)build the binaries and commit/merge them, and tests will use the bundled binaries as they are. Thanks Laszlo
diff --git a/Makefile b/Makefile index dccba1dca27f..1f768e2bcf8f 100644 --- a/Makefile +++ b/Makefile @@ -602,7 +602,11 @@ clean: rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f qemu-options.def rm -f *.msi - find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + + find . \( -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f \ + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \ + ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ + ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ + -exec rm {} + rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -f fsdev/*.pod scsi/*.pod rm -f qemu-img-cmds.h diff --git a/.gitmodules b/.gitmodules index 6b91176098c8..ceafb0ee29a0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,3 +49,6 @@ [submodule "tests/fp/berkeley-softfloat-3"] path = tests/fp/berkeley-softfloat-3 url = https://github.com/cota/berkeley-softfloat-3 +[submodule "roms/edk2"] + path = roms/edk2 + url = https://github.com/tianocore/edk2.git diff --git a/roms/edk2 b/roms/edk2 new file mode 160000 index 000000000000..85588389222a --- /dev/null +++ b/roms/edk2 @@ -0,0 +1 @@ +Subproject commit 85588389222a3636baf0f9ed8227f2434af4c3f9
The roms/edk2 submodule can help with three goals: - build the OVMF and ArmVirtQemu virtual UEFI firmware platforms (to be implemented later), - build the EfiRom tool on the fly, which is used in roms/Makefile, for building the "efirom" target, - build UEFI test applications (to be run in guests), for qtest support. Edk2 commit 85588389222a3636baf0f9ed8227f2434af4c3f9 stands for the latest "stable tag", namely "edk2-stable201811". The edk2 repository tracks some binary files that should not be removed by QEMU's top-level "make clean"; exempt the full pathnames from the "find" command. Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Shannon Zhao <shannon.zhaosl@gmail.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- Makefile | 6 +++++- .gitmodules | 3 +++ roms/edk2 | 1 + 3 files changed, 9 insertions(+), 1 deletion(-)