UEFI + Secure Boot + qemu
v5 cover UEFI + Secure Boot + qemu
There seems to be a consensus that supporting UEFI in OE-core for qemu would be valuable, and there have been some (stalled) attempts to add it. For reference, see:
[OE-core] [PATCH V3 0/3] Add UEFI firmware for qemux86*
[OE-core] Add ovmf-native to make qemu-native/runqemu support boot UEFI image?
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5654
https://github.com/01org/luv-yocto/issues/38
This patch set includes the necessary recipes (ovmf from meta-luv, acpica from meta-oe), some improvements to them (in particular, enabling Secure Boot), and changes to runqemu to make it easier to boot with UEFI. A special image recipes builds an image which can be used to lock down a virtual machine by enrolling the "normal" pre-installed certificates.
In contrast to the first version of this patch series, one can now use both a single OVMF firmware file as well as set up persistent variables for a virtual machine by using two files.
Eduardo promised to add automated testing for this once it is in OE-core. As it stands now, ovmf-shell-image and ovmf without Secure Boot enabled should at least be part of a world build.
As discussed on this list, Ricardo and Fathi volunteered to help with maintaining the ovmf and acpica recipes in OE-core.
Beware that "git am --keep-cr" must be used to import the ovmf patches correctly.
Changes since V1:
- support both combined code+vars ("ovmf") and separate code
and vars flash drives ("ovmf.code ovmf.vars")
- OVMF firmware no longer installed in the target sysroot
- slightly simpler renaming from OVMF (uppercase, underscore)
to OE naming convention (lowercase, dots): now the different
ln invocation directly create files with the final name
- DEPLOYDIR needs to be cleaned explicitly (done via cleandirs varflag)
- Secure Boot support in ovmf is controlled by a PACKAGECONFIG option,
off by default
- distros and developers can add additional Secure Boot compile flags
with OVMF_SECURE_BOOT_EXTRA_FLAGS
- explain how to get ovmf built for use with runqemu via MACHINE_ESSENTIAL_EXTRA_RDEPENDS
- IMAGE_FSTYPES_forcevariable = "wic" used in ovmf-shell-image
- remove OVMF BGRT patch
- location of "inherit deploy"
Changes since V2:
- rebased onto current master
- workaround for acpica compile issue with flex 2.6.2
Changes since V3:
- rebased onto current master (for real, this time!)
- reordered patches a bit
Changes since V4:
- revised the commit message of "ovmf: deploy firmware in image directory" to clarify expected usage
Fathi Boudra (1):
acpica: move from meta-oe to OE-core
Patrick Ohly (10):
acpica: work around flex 2.6.2 code generation issue
ovmf: explicitly depend on nasm-native
ovmf: deploy firmware in image directory ovmf_git.bb: enable parallel compilation ovmf_git.bb: enable Secure Boot
runqemu: fix undefined variable reference in check_arg_path()
runqemu: also accept -image suffix for rootfs parameter
runqemu: support UEFI with OVMF firmware
ovmf: build image which enrolls standard keys
ovmf: remove BGRT patch
meta-luv (1):
ovmf: move from meta-luv to OE-core
meta/recipes-core/ovmf/ovmf-shell-image.bb | 17 +- meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch | 48 +++- meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch | 32 ++- meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch | 39 ++- meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch | 1124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks | 4 +- meta/recipes-core/ovmf/ovmf_git.bb | 201 +++++++++++++- meta/recipes-extended/acpica/acpica_20150515.bb | 47 +++- meta/recipes-extended/acpica/acpitests/aapits-linux.patch | 336 ++++++++++++++++++++++- meta/recipes-extended/acpica/acpitests/aapits-makefile.patch | 34 ++- meta/recipes-extended/acpica/acpitests_20140828.bb | 35 ++- meta/recipes-extended/acpica/files/no-werror.patch | 32 ++- meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch | 64 ++++- scripts/runqemu | 50 ++- 14 files changed, 2058 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-core/ovmf/ovmf-shell-image.bb create mode 100644 meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch create mode 100644 meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks create mode 100644 meta/recipes-core/ovmf/ovmf_git.bb create mode 100644 meta/recipes-extended/acpica/acpica_20150515.bb create mode 100644 meta/recipes-extended/acpica/acpitests/aapits-linux.patch create mode 100644 meta/recipes-extended/acpica/acpitests/aapits-makefile.patch create mode 100644 meta/recipes-extended/acpica/acpitests_20140828.bb create mode 100644 meta/recipes-extended/acpica/files/no-werror.patch create mode 100644 meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
base-commit: ce5c7075d530c0950f2feed35f95fbcd9f50721f
Signature · 1 line
git-series 0.9.1
PATCH v5 1/12 acpica: move from meta-oe to OE-core
From: Fathi Boudra <[email protected]>
qemu support for UEFI in OE-core depends on OVMF, which needs the iasl tools provided by this recipe. There's also an iasl recipe in meta-luv, but than can and will be replaced by this one, thus reducing overall maintenance work.
Copied from meta-openembedded rev fa65be9ba (current master).
--- meta/recipes-extended/acpica/acpica_20150515.bb | 46 +- meta/recipes-extended/acpica/acpitests/aapits-linux.patch | 336 +++++++- meta/recipes-extended/acpica/acpitests/aapits-makefile.patch | 34 +- meta/recipes-extended/acpica/acpitests_20140828.bb | 35 +- meta/recipes-extended/acpica/files/no-werror.patch | 32 +- 5 files changed, 483 insertions(+) create mode 100644 meta/recipes-extended/acpica/acpica_20150515.bb create mode 100644 meta/recipes-extended/acpica/acpitests/aapits-linux.patch create mode 100644 meta/recipes-extended/acpica/acpitests/aapits-makefile.patch create mode 100644 meta/recipes-extended/acpica/acpitests_20140828.bb create mode 100644 meta/recipes-extended/acpica/files/no-werror.patch
meta/recipes-extended/acpica/acpica_20150515.bb new file +46 -0
@@ -0,0 +1,46 @@ +SUMMARY = "ACPICA tools for the development and debug of ACPI tables" +DESCRIPTION = "The ACPI Component Architecture (ACPICA) project provides an \ +OS-independent reference implementation of the Advanced Configuration and \ +Power Interface Specification (ACPI). ACPICA code contains those portions of \ +ACPI meant to be directly integrated into the host OS as a kernel-resident \ +subsystem, and a small set of tools to assist in developing and debugging \ +ACPI tables." + +HOMEPAGE = "http://www.acpica.org/" +SECTION = "console/tools" + +LICENSE = "BSD | GPLv2" +LIC_FILES_CHKSUM = "file://generate/unix/readme.txt;md5=204407e197c1a01154a48f6c6280c3aa" + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +DEPENDS = "bison flex" + +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ + file://no-werror.patch \ + " +SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c" +SRC_URI[sha256sum] = "61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374" + +S = "${WORKDIR}/acpica-unix2-${PV}" + +EXTRA_OEMAKE = "CC='${CC}' 'OPT_CFLAGS=-Wall'" + +do_install() { + install -D -p -m0755 generate/unix/bin*/iasl ${D}${bindir}/iasl + install -D -p -m0755 generate/unix/bin*/acpibin ${D}${bindir}/acpibin + install -D -p -m0755 generate/unix/bin*/acpiexec ${D}${bindir}/acpiexec + install -D -p -m0755 generate/unix/bin*/acpihelp ${D}${bindir}/acpihelp + install -D -p -m0755 generate/unix/bin*/acpinames ${D}${bindir}/acpinames + install -D -p -m0755 generate/unix/bin*/acpisrc ${D}${bindir}/acpisrc + install -D -p -m0755 generate/unix/bin*/acpixtract ${D}${bindir}/acpixtract +} + +# iasl*.bb is a subset of this recipe, so RREPLACE it +PROVIDES = "iasl" +RPROVIDES_${PN} += "iasl" +RREPLACES_${PN} += "iasl" +RCONFLIGHTS_${PN} += "iasl" + +NATIVE_INSTALL_WORKS = "1" +BBCLASSEXTEND = "native"
meta/recipes-extended/acpica/acpitests/aapits-linux.patch new file +336 -0
336 lines not on this page · raw message
meta/recipes-extended/acpica/acpitests/aapits-makefile.patch new file +34 -0
@@ -0,0 +1,34 @@ +From: Al Stone <[email protected]> +Date: Mon, 7 Apr 2014 19:09:37 +0000 +Subject: [PATCH 1/2] Fixup aapits build + +From http://git.linaro.org/people/al.stone/acpica-tools.git +Upstream-status: Unknown + +diff -urN acpica-unix2-20140325/tests/aapits/Makefile acpica-unix2-20140325/tests/aapits/Makefile +--- acpica-unix2-20140325/tests/aapits/Makefile 2014-04-05 14:23:14.683636794 -0600 ++++ acpica-unix2-20140325-aapits/tests/aapits/Makefile 2014-04-05 15:10:57.879184598 -0600 +@@ -16,6 +16,7 @@ + atosxfwrap.c \ + osunixxf.c \ + ../../source/common/ahids.c \ ++ ../../source/common/ahuuids.c \ + ../../source/common/cmfsize.c \ + ../../source/common/getopt.c \ + ../../source/components/hardware/hwtimer.c \ +@@ -174,6 +175,7 @@ + ../../source/components/utilities/utexcep.c \ + ../../source/components/utilities/utfileio.c \ + ../../source/components/utilities/utglobal.c \ ++ ../../source/components/utilities/uthex.c \ + ../../source/components/utilities/utids.c \ + ../../source/components/utilities/utinit.c \ + ../../source/components/utilities/utlock.c \ +@@ -189,6 +191,7 @@ + ../../source/components/utilities/utstate.c \ + ../../source/components/utilities/utstring.c \ + ../../source/components/utilities/uttrack.c \ ++ ../../source/components/utilities/utuuid.c \ + ../../source/components/utilities/utxface.c \ + ../../source/components/utilities/utxferror.c \ + ../../source/components/utilities/utxfinit.c \
meta/recipes-extended/acpica/acpitests_20140828.bb new file +35 -0
@@ -0,0 +1,35 @@ +SUMMARY = "Test suite used to validate ACPICA" +HOMEPAGE = "http://www.acpica.org/" + +LICENSE = "Intel" +LIC_FILES_CHKSUM = "file://tests/aapits/atexec.c;beginline=1;endline=115;md5=e92bcdfcd01d117d1bda3e814bb2030a" + +DEPENDS = "bison flex" + +SRC_URI = "https://acpica.org/sites/acpica/files/acpitests-unix-${PV}.tar.gz;name=acpitests \ + https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz;name=acpica \ + file://aapits-linux.patch \ + file://aapits-makefile.patch \ +" +SRC_URI[acpitests.md5sum] = "db9d6fdaa8e3eb101d700ee5ba4938ed" +SRC_URI[acpitests.sha256sum] = "e576c74bf1bf1c9f7348bf9419e05c8acfece7105abcdc052e66670c7af2cf00" +SRC_URI[acpica.md5sum] = "6f05f0d10166a1b1ff6107f3d1cdf1e5" +SRC_URI[acpica.sha256sum] = "01d8867656c5ba41dec307c4383ce676196ad4281ac2c9dec9f5be5fac6d888e" + +S = "${WORKDIR}/acpitests-unix-${PV}" + +EXTRA_OEMAKE = "'CC=${TARGET_PREFIX}gcc ${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS}' 'OPT_CFLAGS=-Wall'" + +# The Makefiles expect a specific layout +do_compile() { + cp -af ${WORKDIR}/acpica-unix2-${PV}/source ${S} + cd tests/aapits + oe_runmake +} + +do_install() { + install -d ${D}${bindir} + install -m0755 tests/aapits/bin/aapits ${D}${bindir} +} + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
meta/recipes-extended/acpica/files/no-werror.patch new file +32 -0
@@ -0,0 +1,32 @@ +Description: remove -Werror flag +Forwarded: not-needed +Author: Fathi Boudra <[email protected]> + +--- + generate/unix/iasl/Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/generate/unix/iasl/Makefile ++++ b/generate/unix/iasl/Makefile +@@ -266,19 +266,19 @@ $(OBJDIR)/prparser.y.h: $(OBJDIR)/prpars + # by the utilities above and they are not necessarily ANSI C, etc. + # + $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c +- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< ++ $(CC) -c $(CFLAGS) -Wall -o$@ $< + + $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c +- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< ++ $(CC) -c $(CFLAGS) -Wall -o$@ $< + + $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c +- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< ++ $(CC) -c $(CFLAGS) -Wall -o$@ $< + + $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c +- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< ++ $(CC) -c $(CFLAGS) -Wall -o$@ $< + + $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c +- $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $< ++ $(CC) -c $(CFLAGS) -Wall -o$@ $<
Signature · 1 line
git-series 0.9.1
Re: [PATCH v5 01/12] acpica: move from meta-oe to OE-core
Quoted 9 lines · Patrick Ohly
From: Fathi Boudra <[email protected]>
qemu support for UEFI in OE-core depends on OVMF, which needs the iasl
tools provided by this recipe. There's also an iasl recipe in meta-luv, but than can and will be replaced by this one, thus reducing
overall maintenance work.
Quoted 3 lines
Copied from meta-openembedded rev
fa65be9ba(current master).Signed-off-by Patrick Ohly <[email protected]>
This fails on musl:
https://autobuilder.yocto.io/builders/nightly-musl/builds/160/steps/BuildImages/logs/stdio
| ^~~~~~~~~~~~~~
| i586-poky-linux-musl-gcc -m32 -march=i586 --sysroot=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot -c -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0=/usr/src/debug/acpica/20150515-r0 -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot= -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -DACPI_ASL_COMPILER -I../../../source/compiler -Iobj -Wall -o obj/asllistsup.o ../../../source/compiler/asllistsup.c
| ../../../source/compiler/aslfiles.c: In function 'FlOpenMiscOutputFiles':
| ../../../source/compiler/aslfiles.c:595:45: error: invalid application of 'sizeof' to incomplete type 'FILE {aka struct _IO_FILE}'
| memcpy (stderr, stdout, sizeof (FILE));
| ^~~~
| Copied obj/acpiexamples to ../bin/acpiexamplesCheers,
Richard
Re: [PATCH v5 01/12] acpica: move from meta-oe to OE-core
Quoted 18 lines · Richard Purdie
Quoted 9 lines · Patrick Ohly
From: Fathi Boudra <[email protected]>
qemu support for UEFI in OE-core depends on OVMF, which needs the iasl
tools provided by this recipe. There's also an iasl recipe in meta-luv, but than can and will be replaced by this one, thus reducing
overall maintenance work.Quoted 3 lines
Copied from meta-openembedded rev
fa65be9ba(current master).Signed-off-by Patrick Ohly <[email protected]>This fails on musl:
https://autobuilder.yocto.io/builders/nightly-musl/builds/160/steps/BuildImages/logs/stdio
Quoted 7 lines
| ^~~~~~~~~~~~~~
| i586-poky-linux-musl-gcc -m32 -march=i586 --sysroot=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot -c -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0=/usr/src/debug/acpica/20150515-r0 -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot= -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -DACPI_ASL_COMPILER -I../../../source/compiler -Iobj -Wall -o obj/asllistsup.o ../../../source/compiler/asllistsup.c
| ../../../source/compiler/aslfiles.c: In function 'FlOpenMiscOutputFiles':
| ../../../source/compiler/aslfiles.c:595:45: error: invalid application of 'sizeof' to incomplete type 'FILE {aka struct _IO_FILE}'
| memcpy (stderr, stdout, sizeof (FILE));
| ^~~~
| Copied obj/acpiexamples to ../bin/acpiexamplesFILE object cannot be used in any reasonable way, only a pointer to FILE has well defined uses
-Khem
Re: [PATCH v5 01/12] acpica: move from meta-oe to OE-core
In reply to Richard PurdieHello Ricardo,
can you perhaps help?
I'm traveling next week and don't have much time.
Thanks, Patrick
Quoted 29 lines · Richard Purdie
Quoted 9 lines · Patrick Ohly
From: Fathi Boudra <[email protected]>
qemu support for UEFI in OE-core depends on OVMF, which needs the iasl
tools provided by this recipe. There's also an iasl recipe in meta-luv, but than can and will be replaced by this one, thus reducing
overall maintenance work.Quoted 3 lines
Copied from meta-openembedded rev
fa65be9ba(current master).Signed-off-by Patrick Ohly <[email protected]>This fails on musl:
https://autobuilder.yocto.io/builders/nightly-musl/builds/160/steps/BuildImages/logs/stdio
| ^~~~~~~~~~~~~~ | i586-poky-linux-musl-gcc -m32 -march=i586 --sysroot=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot -c -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0=/usr/src/debug/acpica/20150515-r0 -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/work/i586-poky-linux-musl/acpica/20150515-r0/recipe-sysroot= -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -DACPI_ASL_COMPILER -I../../../source/compiler -Iobj -Wall -o obj/asllistsup.o ../../../source/compiler/asllistsup.c | ../../../source/compiler/aslfiles.c: In function 'FlOpenMiscOutputFiles': | ../../../source/compiler/aslfiles.c:595:45: error: invalid application of 'sizeof' to incomplete type 'FILE {aka struct _IO_FILE}' | memcpy (stderr, stdout, sizeof (FILE)); | ^~~~ | Copied obj/acpiexamples to ../bin/acpiexamplesCheers,
Richard
PATCH v5 2/12 acpica: work around flex 2.6.2 code generation issue
In reply to Patrick OhlyWithout this patch, linking fails with a missing implementation of yy_scan_string. This looks like a regression in flex, because 2.6.0 generated different code that called PrParser_scan_string
resp. DtParser_scan_string.
Working around that in acpica until this is better understood or fixed in flex is the easiest solution for now.
--- meta/recipes-extended/acpica/acpica_20150515.bb | 1 + meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch
meta/recipes-extended/acpica/acpica_20150515.bb +1 -0
@@ -18,6 +18,7 @@ DEPENDS = "bison flex" SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ file://no-werror.patch \ + file://rename-yy_scan_string-manually.patch \ " SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c" SRC_URI[sha256sum] = "61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374"
meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
git-series 0.9.1
PATCH v5 3/12 ovmf: move from meta-luv to OE-core
In reply to Patrick OhlyFrom: meta-luv <[email protected]>
This is an unmodified copy of github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision 4be4329.
--- meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch | 48 +++++++++++++++++++++++++++++- meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch | 32 +++++++++++++++++++- meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch | 39 +++++++++++++++++++++++- meta/recipes-core/ovmf/ovmf_git.bb | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 350 insertions(+) create mode 100644 meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch create mode 100644 meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch create mode 100644 meta/recipes-core/ovmf/ovmf_git.bb
meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001 +From: Matt Fleming <[email protected]> +Date: Fri, 27 Jun 2014 11:12:18 +0100 +Subject: [PATCH] BaseTools: Force tools variables to host toolchain + +Signed-off-by: Matt Fleming <[email protected]> +--- + BaseTools/Source/C/Makefiles/app.makefile | 7 +++++++ + BaseTools/Source/C/VfrCompile/GNUmakefile | 5 +++++ + 2 files changed, 12 insertions(+) + +diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile +index 19269a1..62aad0f 100644 +--- a/BaseTools/Source/C/Makefiles/app.makefile ++++ b/BaseTools/Source/C/Makefiles/app.makefile +@@ -16,6 +16,13 @@ include $(MAKEROOT)/Makefiles/header.makefile + + APPLICATION = $(MAKEROOT)/bin/$(APPNAME) + ++CC = gcc ++CXX = g++ ++AS = gcc ++AR = ar ++LD = ld ++LINKER = $(CC) ++ + .PHONY:all + all: $(MAKEROOT)/bin $(APPLICATION) + +diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile +index 82005e1..5ac5f7e 100644 +--- a/BaseTools/Source/C/VfrCompile/GNUmakefile ++++ b/BaseTools/Source/C/VfrCompile/GNUmakefile +@@ -26,6 +26,11 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyn + + VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS) + ++CC = gcc ++CXX = g++ ++AS = gcc ++AR = ar ++LD = ld + LINKER = $(BUILD_CXX) + + EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h +-- +1.9.0 +
meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch new file +110 -0
110 lines not on this page · raw message
meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 9e632e3f9edd09632cc877dff6ea57608f979aab Mon Sep 17 00:00:00 2001 +From: Ricardo Neri <[email protected]> +Date: Thu, 9 Jun 2016 02:23:01 -0700 +Subject: [PATCH] ovmf: update path to native BaseTools + +BaseTools is a set of utilities to build EDK-based firmware. These utilities +are used during the build process. Thus, they need to be built natively. +When cross-compiling, we need to provide a path to the location of these +tools. The BBAKE_EDK_TOOLS_PATH string is used as a pattern to be replaced +with the appropriate location before building. + +Signed-off-by: Ricardo Neri <[email protected]> +--- + OvmfPkg/build.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh +index eb5eb73..9058fca 100755 +--- a/OvmfPkg/build.sh ++++ b/OvmfPkg/build.sh +@@ -30,7 +30,7 @@ then + # this assumes svn pulls have the same root dir + # export EDK_TOOLS_PATH=`pwd`/../BaseTools + # This version is for the tools source in edk2 +- export EDK_TOOLS_PATH=`pwd`/BaseTools ++ export EDK_TOOLS_PATH=BBAKE_EDK_TOOLS_PATH/BaseTools + echo $EDK_TOOLS_PATH + source edksetup.sh BaseTools + else +-- +2.8.1 +
meta/recipes-core/ovmf/ovmf/0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 2320650c6d381b914fe91b2dedaa5870279a8bcf Mon Sep 17 00:00:00 2001 +From: Ricardo Neri <[email protected]> +Date: Sun, 27 Nov 2016 18:42:55 -0800 +Subject: [PATCH] BaseTools: makefile: adjust to build in under bitbake + +Prepend the build flags with those of bitbake. This is to build +using the bitbake native sysroot include and library directories. + +Signed-off-by: Ricardo Neri <[email protected]> +--- + BaseTools/Source/C/Makefiles/header.makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile +index 821d114..fe0f08b 100644 +--- a/BaseTools/Source/C/Makefiles/header.makefile ++++ b/BaseTools/Source/C/Makefiles/header.makefile +@@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/ + endif + + INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) +-BUILD_CPPFLAGS = $(INCLUDE) -O2 ++BUILD_CPPFLAGS := $(BUILD_CPPFLAGS) $(INCLUDE) -O2 + ifeq ($(DARWIN),Darwin) + # assume clang or clang compatible flags on OS X +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -c -g + else +-BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g ++BUILD_CFLAGS := $(BUILD_CFLAGS) -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-unused-result -nostdlib -c -g + endif +-BUILD_LFLAGS = ++BUILD_LFLAGS := $(LDFLAGS) + BUILD_CXXFLAGS = + + ifeq ($(ARCH), IA32) +-- +2.9.3 +
meta/recipes-core/ovmf/ovmf_git.bb new file +121 -0
121 lines not on this page · raw message
Signature · 1 line
git-series 0.9.1
Re: [PATCH v5 03/12] ovmf: move from meta-luv to OE-core
Quoted 5 lines · Patrick Ohly
From: meta-luv <[email protected]>
This is an unmodified copy of github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision 4be4329.
https://autobuilder.yocto.io/builders/nightly-world/builds/156
which boils down to:
| "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/BootLogoLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/object_files.lst | make: *** [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEBUG/BootMaintenanceManager.c] Error 2 | VfrCompile: ERROR 1003: Invalid option value | VFR file name /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i is too long. | "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/NvVarsFileLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/object_files.lst
i.e. path length issues.
We saw this on multiple builds :(.
Cheers,
Richard
Re: [PATCH v5 03/12] ovmf: move from meta-luv to OE-core
Quoted 17 lines · Richard Purdie
Quoted 5 lines · Patrick Ohly
From: meta-luv <[email protected]>
This is an unmodified copy of github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision 4be4329.
https://autobuilder.yocto.io/builders/nightly-world/builds/156
which boils down to:
| "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/BootLogoLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/object_files.lst | make: *** [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEBUG/BootMaintenanceManager.c] Error 2 | VfrCompile: ERROR 1003: Invalid option value | VFR file name /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i is too long. | "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/NvVarsFileLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/object_files.lst
Quoted 3 lines
i.e. path length issues.
We saw this on multiple builds :(.
I wonder why its using gcc-ar that should actually be <cross>-gcc-ar so probably we need to set AR to point to <cross>-gcc-ar, but I would like to see if we can use normal ar since gcc-ar would fail with clang
Re: [PATCH v5 03/12] ovmf: move from meta-luv to OE-core
Quoted 18 lines · Khem Raj
Quoted 17 lines · Richard Purdie
Quoted 5 lines · Patrick Ohly
From: meta-luv <[email protected]>
This is an unmodified copy of github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision 4be4329.
https://autobuilder.yocto.io/builders/nightly-world/builds/156
which boils down to:
| "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/BootLogoLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/object_files.lst | make: *** [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEBUG/BootMaintenanceManager.c] Error 2 | VfrCompile: ERROR 1003: Invalid option value | VFR file name /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i is too long. | "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/NvVarsFileLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/object_files.lst
Quoted 7 lines
Quoted 3 lines
i.e. path length issues.
We saw this on multiple builds :(.
I wonder why its using gcc-ar that should actually be <cross>-gcc-ar so probably we need to set AR to point to <cross>-gcc-ar, but I would like to see if we can use normal ar since gcc-ar would fail with clang
The actual error wasn't in the gcc-ar invocation but rather the VfrCompile tool, so for now I haven't done anything about gcc-ar vs. ar. I have patches for the VfrCompile path length and the acpica+musl issue which I will send momentarily.
Richard, Ross, they apply on top of the patches that I had sent earlier.
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
PATCH 1/2 acpica: fix compilation with musl
Manipulating stderr after freopen() fails as done by upstream does not work with musl. The replacement is Unix specific and uses open()/dup2().
--- meta/recipes-extended/acpica/acpica_20150515.bb | 1 + .../files/manipulate-fds-instead-of-FILE.patch | 71 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch
meta/recipes-extended/acpica/acpica_20150515.bb +1 -0
@@ -19,6 +19,7 @@ DEPENDS = "bison flex" SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \ file://no-werror.patch \ file://rename-yy_scan_string-manually.patch \ + file://manipulate-fds-instead-of-FILE.patch \ " SRC_URI[md5sum] = "2bc4a7ccc82de9df9fa964f784ecb29c" SRC_URI[sha256sum] = "61204ec56d71bc9bfa2ee2ade4c66f7e8541772ac72ef8ccc20b3f339cc96374"
meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 2/2 ovmf: increase path length limit
The VfrCompile tool has a hard-coded maximum length for path names which turned out to be too small by around 20 characters in the Yocto autobuilder setup. Increasing the maximum by a factor of 4 is relatively easy and makes the problem less likely.
--- meta/recipes-core/ovmf/ovmf_git.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-core/ovmf/ovmf_git.bb +5 -0
@@ -50,6 +50,11 @@ COMPATIBLE_HOST='(i.86|x86_64).*' OVMF_SECURE_BOOT_EXTRA_FLAGS ??= "" OVMF_SECURE_BOOT_FLAGS = "-DSECURE_BOOT_ENABLE=TRUE ${OVMF_SECURE_BOOT_EXTRA_FLAGS}" +do_patch[postfuncs] += "fix_path_len" +fix_path_len () { + sed -i -e 's/^#define MAX_PATH.*255/#define MAX_PATH 1023/' ${S}/BaseTools/Source/C/VfrCompile/EfiVfr.h +} + do_patch_append_class-native() { bb.build.exec_func('do_fix_iasl', d) bb.build.exec_func('do_fix_toolchain', d)
Signature · 1 line
2.1.4
Re: [PATCH 2/2] ovmf: increase path length limit
Quoted 15 lines · Patrick Ohly
The VfrCompile tool has a hard-coded maximum length for path names which turned out to be too small by around 20 characters in the Yocto autobuilder setup. Increasing the maximum by a factor of 4 is relatively easy and makes the problem less likely.
Signed-off-by Patrick Ohly <[email protected]>--- meta/recipes-core/ovmf/ovmf_git.bb | 5 +++++ 1 file changed, 5 insertions(+)meta/recipes-core/ovmf/ovmf_git.bb +0
-0
meta/recipes-core/ovmf/ovmf_git.bb COMPATIBLE_HOST='(i.86|x86_64).*' · line 56
Quoted 7 lines
meta/recipes-core/ovmf/ovmf_git.bb +4
-0@@ -50,6 +50,11 @@ COMPATIBLE_HOST='(i.86|x86_64).*' OVMF_SECURE_BOOT_EXTRA_FLAGS ??= "" OVMF_SECURE_BOOT_FLAGS = "-DSECURE_BOOT_ENABLE=TRUE ${OVMF_SECURE_BOOT_EXTRA_FLAGS}" +do_patch[postfuncs] += "fix_path_len" +fix_path_len () { + sed -i -e 's/^#define MAX_PATH.*255/#define MAX_PATH 1023/' ${S}/BaseTools/Source/C/VfrCompile/EfiVfr.h +}
I've used sed here because it was easy. I'll also send a version which uses a proper patch. Just beware of the line encoding issues. The patch really must have CR line ends, otherwise it won't apply to the source.
It might be safer to pull V2 of the ovmf patch from:
https://github.com/pohly/openembedded-core/commits/ovmf
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
PATCH v2 1/1 ovmf: increase path length limit
The VfrCompile tool has a hard-coded maximum length for path names which turned out to be too small by around 20 characters in the Yocto autobuilder setup. Increasing the maximum by a factor of 4 is relatively easy and makes the problem less likely.
--- .../VfrCompile-increase-path-length-limit.patch | 33 ++++++++++++++++++++++ meta/recipes-core/ovmf/ovmf_git.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-core/ovmf/ovmf/VfrCompile-increase-path-length-limit.patch
meta/recipes-core/ovmf/ovmf/VfrCompile-increase-path-length-limit.patch new file +33 -0
@@ -0,0 +1,33 @@ +From c7722d10c7bcf6be0adcf54abb1d406599dd7914 Mon Sep 17 00:00:00 2001 +From: Patrick Ohly <[email protected]> +Date: Fri, 24 Feb 2017 01:40:02 +0100 +Subject: [PATCH] VfrCompile: increase path length limit + +The VfrCompile tool has a hard-coded maximum length for path names +which turned out to be too small by around 20 characters in the Yocto +autobuilder setup. Increasing the maximum by a factor of 4 is +relatively easy and makes the problem less likely. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Patrick Ohly <[email protected]> +--- + BaseTools/Source/C/VfrCompile/EfiVfr.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/BaseTools/Source/C/VfrCompile/EfiVfr.h b/BaseTools/Source/C/VfrCompile/EfiVfr.h +index d187902..9ad4a7b 100644 +--- a/BaseTools/Source/C/VfrCompile/EfiVfr.h ++++ b/BaseTools/Source/C/VfrCompile/EfiVfr.h +@@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + #include "Common/UefiInternalFormRepresentation.h" + #include "Common/MdeModuleHii.h" + +-#define MAX_PATH 255 ++#define MAX_PATH 1023 + #define MAX_VFR_LINE_LEN 4096 + + #define EFI_IFR_MAX_LENGTH 0xFF +-- +2.1.4 +
meta/recipes-core/ovmf/ovmf_git.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ file://0001-BaseTools-Force-tools-variables-to-host-toolchain.patch \ file://0002-ovmf-update-path-to-native-BaseTools.patch \ file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ + file://VfrCompile-increase-path-length-limit.patch \ " SRC_URI_append_class-target = " \
Signature · 1 line
2.1.4
Re: [PATCH v5 03/12] ovmf: move from meta-luv to OE-core
In reply to Richard PurdieHello Ricardo,
another issue with the UEFI recipes. See also Khem's comment (attached).
Bye, Patrick
Quoted 24 lines · Richard Purdie
Quoted 5 lines · Patrick Ohly
From: meta-luv <[email protected]>
This is an unmodified copy of github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision 4be4329.
https://autobuilder.yocto.io/builders/nightly-world/builds/156
which boils down to:
| "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/BootLogoLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/object_files.lst | make: *** [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEBUG/BootMaintenanceManager.c] Error 2 | VfrCompile: ERROR 1003: Invalid option value | VFR file name /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i is too long. | "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/NvVarsFileLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/object_files.lsti.e. path length issues.
We saw this on multiple builds :(.
Cheers,
Richard
Quoted 17 lines · Richard Purdie
Quoted 5 lines · Patrick Ohly
From: meta-luv <[email protected]>
This is an unmodified copy of github.com/01org/luv-yocto/meta-luv/recipes-core/ovmf revision 4be4329.
https://autobuilder.yocto.io/builders/nightly-world/builds/156
which boils down to:
| "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/BootLogoLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootLogoLib/BootLogoLib/OUTPUT/object_files.lst | make: *** [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/DEBUG/BootMaintenanceManager.c] Error 2 | VfrCompile: ERROR 1003: Invalid option value | VFR file name /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib/OUTPUT/BootMaintenanceManager.i is too long. | "gcc-ar" cr /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/NvVarsFileLib.lib @/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/work/x86-pokymllib32-linux/lib32-ovmf/git-r0/git/Build/OvmfIa32/RELEASE_GCC5/IA32/OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib/OUTPUT/object_files.lst
Quoted 3 lines
i.e. path length issues.
We saw this on multiple builds :(.
I wonder why its using gcc-ar that should actually be <cross>-gcc-ar so probably we need to set AR to point to <cross>-gcc-ar, but I would like to see if we can use normal ar since gcc-ar would fail with clang
PATCH v5 4/12 ovmf: explicitly depend on nasm-native
In reply to Patrick OhlyFixes a build issue when nasm was not build already because of something else.
--- meta/recipes-core/ovmf/ovmf_git.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/ovmf/ovmf_git.bb +2 -0
@@ -20,6 +20,8 @@ DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native" DEPENDS_class-target="ovmf-native" +DEPENDS_append = " nasm-native" + EDK_TOOLS_DIR="edk2_basetools" # OVMF has trouble building with the default optimization of -O2.
Signature · 1 line
git-series 0.9.1
PATCH v5 5/12 ovmf: deploy firmware in image directory
In reply to Patrick OhlyWhen used with '-drive if=pflash', qemu will store UEFI variables inside the firmware image file. That is unexpected for a file located in the sysroot, which should be read-only, while it is normal for image files in the deploy/images directory. Therefore that directory is a better place for use with runqemu.
The name was chose so that "runqemu ovmf" can be used as shorthand for "runqemu <full path>/ovmf.qcow2" by treating "ovmf" as the base name of the firmware file. "ovmf.secboot.qcow2" is meant to be used for the Secure Boot enabled firmware.
qcow2 is used because it is needed for "savevm" snapshots of a virtual machine.
With code and variables stored in the same ovmf.qcow2 it is not possible to update the firmware code without also overwriting the variables. For users who care about persistent variables, the code and variables are also provided as separate files, in ovmf.code.qcow2 and ovmf.vars.qcow2.
The traditional usage of OVMF via the qemu bios parameter ("biosdir" and/or "biosfilename" in runqemu) is no longer recommended, and therefore this recipe no longer provides the bios.bin file. Instead, OVMF is meant to be used as flash drive in qemu. See the "runqemu:
support UEFI with OVMF firmware" patch for details on how to use OVMF that way.
--- meta/recipes-core/ovmf/ovmf_git.bb | 42 ++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 11 deletions(-)
meta/recipes-core/ovmf/ovmf_git.bb +31 -11
@@ -12,11 +12,13 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588" +inherit deploy + PARALLEL_MAKE = "" S = "${WORKDIR}/git" -DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native" +DEPENDS_class-native="util-linux-native iasl-native ossp-uuid-native qemu-native" DEPENDS_class-target="ovmf-native"
@@ -97,9 +99,22 @@ do_compile_class-target() { OVMF_ARCH="IA32" fi + # ${WORKDIR}/ovmf is a well-known location where do_install and + # do_deploy will be able to find the files. + rm -rf ${WORKDIR}/ovmf + mkdir ${WORKDIR}/ovmf + OVMF_DIR_SUFFIX="X64" + if [ "${TARGET_ARCH}" != "x86_64" ] ; then + OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization + fi FIXED_GCCVER=$(fixup_target_tools ${GCC_VER}) - echo FIXED_GCCVER is ${FIXED_GCCVER} + bbnote FIXED_GCCVER is ${FIXED_GCCVER} + build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}" + ${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} + ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd + ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd + ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd } do_install_class-native() {
@@ -108,16 +123,21 @@ do_install_class-native() { } do_install_class-target() { - OVMF_DIR_SUFFIX="X64" - if [ "${TARGET_ARCH}" != "x86_64" ] ; then - OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization - fi - install -d ${D}${datadir}/ovmf +} - FIXED_GCCVER=$(fixup_target_tools ${GCC_VER}) - build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}" - install -m 0755 ${build_dir}/FV/OVMF.fd \ - ${D}${datadir}/ovmf/bios.bin +do_deploy() { +} +do_deploy[cleandirs] = "${DEPLOYDIR}" +do_deploy_class-target() { + # For use with "runqemu ovmf". + for i in \ + ovmf \ + ovmf.code \ + ovmf.vars \ + ; do + qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd ${DEPLOYDIR}/$i.qcow2 + done } +addtask do_deploy after do_compile before do_build BBCLASSEXTEND = "native"
Signature · 1 line
git-series 0.9.1
PATCH v5 6/12 ovmf_git.bb: enable parallel compilation
In reply to Patrick OhlyThe Fedora srpm [1] seems to have no problems with parallel compilation, so let's also use that for the target. The native tools however indeed have dependency problems:
| test_Ecc_CParser (CheckPythonSyntax.Tests) ... gcc -o ../bin/EfiRom -L/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/usr/lib -L/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-rpath-link,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-rpath,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/fast/build/ostro/x86/tmp-glibc/sysroots/x86_64-linux/lib -Wl,-O1 EfiRom.o -L../libs -lCommon | /usr/bin/ld: cannot find -lCommon | collect2: error: ld returned 1 exit status
ERROR: Task (virtual:native:.../meta/recipes-core/ovmf/ovmf_git.bb:do_compile) failed with exit code '1'
[1] https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/edk2.spec
--- meta/recipes-core/ovmf/ovmf_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/ovmf/ovmf_git.bb +3 -2
@@ -14,7 +14,7 @@ SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588" inherit deploy -PARALLEL_MAKE = "" +PARALLEL_MAKE_class-native = "" S = "${WORKDIR}/git"
@@ -94,6 +94,7 @@ do_compile_class-native() { do_compile_class-target() { export LFLAGS="${LDFLAGS}" + PARALLEL_JOBS="${@ '${PARALLEL_MAKE}'.replace('-j', '-n')}" OVMF_ARCH="X64" if [ "${TARGET_ARCH}" != "x86_64" ] ; then OVMF_ARCH="IA32"
@@ -111,7 +112,7 @@ do_compile_class-target() { bbnote FIXED_GCCVER is ${FIXED_GCCVER} build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}" - ${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} + ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd
Signature · 1 line
git-series 0.9.1
PATCH v5 7/12 ovmf_git.bb: enable Secure Boot
In reply to Patrick OhlyWhen enabled via PACCKAGECONFIG = "secureboot" (off by default because of the extra work and license change), the recipe compiles OVMF twice, once without Secure Boot, once with. This is the same approach as in
https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/edk2.spec
The results are "ovmf.qcow2" and "ovmf.secboot.qcow2" in the image deploy directory, so
runqemu <machine> <image> ovmf.secboot
will boot with Secure Boot enabled.
ovmf.secboot.code.qcow2 is provided for those who want separate code and variable flash drives. The normal ovmf.vars.qcow2 can be used with it.
In contrast to Fedora, no attempt is made to strip potentially patent encumbered algorithms out of the OpenSSL archive. OVMF does not use the ones considered problematic for Fedora, so this shouldn't be a problem.
--- meta/recipes-core/ovmf/ovmf_git.bb | 36 +++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+)
meta/recipes-core/ovmf/ovmf_git.bb +36 -0
@@ -1,8 +1,15 @@ DESCRIPTION = "OVMF - UEFI firmware for Qemu and KVM" HOMEPAGE = "http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF" LICENSE = "BSD" +LICENSE_class-target = "${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'BSD & OpenSSL', 'BSD', d)}" LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=343dc88e82ff33d042074f62050c3496" +# Enabling Secure Boot adds a dependency on OpenSSL and implies +# compiling OVMF twice, so it is disabled by default. Distros +# may change that default. +PACKAGECONFIG ??= "" +PACKAGECONFIG[secureboot] = ",,," + SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ file://0001-BaseTools-Force-tools-variables-to-host-toolchain.patch \ file://0001-OvmfPkg-Enable-BGRT-in-OVMF.patch \
@@ -10,7 +17,13 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ " +SRC_URI_append_class-target = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'http://www.openssl.org/source/openssl-1.0.2j.tar.gz;name=openssl;subdir=${S}/CryptoPkg/Library/OpensslLib', '', d)} \ +" + SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588" +SRC_URI[openssl.md5sum] = "96322138f0b69e61b7212bc53d5e912b" +SRC_URI[openssl.sha256sum] = "e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431" inherit deploy
@@ -32,6 +45,11 @@ BUILD_OPTIMIZATION="-pipe" # OVMF supports IA only, although it could conceivably support ARM someday. COMPATIBLE_HOST='(i.86|x86_64).*' +# Additional build flags for OVMF with Secure Boot. +# Fedora also uses "-D SMM_REQUIRE -D EXCLUDE_SHELL_FROM_FD". +OVMF_SECURE_BOOT_EXTRA_FLAGS ??= "" +OVMF_SECURE_BOOT_FLAGS = "-DSECURE_BOOT_ENABLE=TRUE ${OVMF_SECURE_BOOT_EXTRA_FLAGS}" + do_patch_append_class-native() { bb.build.exec_func('do_fix_iasl', d) bb.build.exec_func('do_fix_toolchain', d)
@@ -112,10 +130,27 @@ do_compile_class-target() { bbnote FIXED_GCCVER is ${FIXED_GCCVER} build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_${FIXED_GCCVER}" + bbnote "Building without Secure Boot." + rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd + + if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', d)}; then + # See CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt and + # https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/ for + # building with Secure Boot enabled. + bbnote "Building with Secure Boot." + rm -rf ${S}/Build/Ovmf$OVMF_DIR_SUFFIX + if ! [ -f ${S}/CryptoPkg/Library/OpensslLib/openssl-*/edk2-patch-applied ]; then + ( cd ${S}/CryptoPkg/Library/OpensslLib/openssl-* && patch -p1 <$(echo ../EDKII_openssl-*.patch) && touch edk2-patch-applied ) + fi + ( cd ${S}/CryptoPkg/Library/OpensslLib/ && ./Install.sh ) + ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS} + ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd + ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd + fi } do_install_class-native() {
@@ -135,6 +170,7 @@ do_deploy_class-target() { ovmf \ ovmf.code \ ovmf.vars \ + ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'ovmf.secboot ovmf.secboot.code', '', d)} \ ; do qemu-img convert -f raw -O qcow2 ${WORKDIR}/ovmf/$i.fd ${DEPLOYDIR}/$i.qcow2 done
Signature · 1 line
git-series 0.9.1
PATCH v5 8/12 runqemu: fix undefined variable reference in check_arg_path()
In reply to Patrick Ohly'arg' isn't defined, the right name there is 'p'.
This fixes a rather obscure error message when that code path ends up being taken:
$ runqemu some/existing-file-name runqemu - ERROR - name 'arg' is not defined runqemu - ERROR - Try 'runqemu help' on how to use it
--- scripts/runqemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/runqemu +1 -1
@@ -292,7 +292,7 @@ class BaseConfig(object): else: raise Exception("Can't find FSTYPE from: %s" % p) - elif os.path.isdir(p) or re.search(':', arg) and re.search('/', arg): + elif os.path.isdir(p) or re.search(':', p) and re.search('/', p): if self.is_deploy_dir_image(p): logger.info('DEPLOY_DIR_IMAGE: %s' % p) self.set("DEPLOY_DIR_IMAGE", p)
Signature · 1 line
git-series 0.9.1
PATCH v5 9/12 runqemu: also accept -image suffix for rootfs parameter
In reply to Patrick OhlyThe magic detection of the rootfs parameter only worked for image recipes which embedd the "image" string in the middle, as in "core-image-minimal".
Sometimes it is more natural to call an image "something-image". To get such an image detected by runqemu, "-image" at the end of a parameter must also cause that parameter to be treated as the rootfs parameter.
Inside the image directory, "something-image" has an -<arch> suffix and thus no change is needed for those usages of re.search('-image-'). However, while at it also enhance those string searches a bit (no need for re; any()+map() a bit closer to the intended logic).
--- scripts/runqemu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/runqemu +3 -3
@@ -218,7 +218,7 @@ class BaseConfig(object): if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), re.M): logger.info("Can't find required *.qemuboot.conf in %s" % p) return False - if not re.search('-image-', '\n'.join(os.listdir(p))): + if not any(map(lambda name: '-image-' in name, os.listdir(p))): logger.info("Can't find *-image-* in %s" % p) return False return True
@@ -267,7 +267,7 @@ class BaseConfig(object): re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): self.kernel = p - elif os.path.exists(p) and (not os.path.isdir(p)) and re.search('-image-', os.path.basename(p)): + elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p): self.rootfs = p # Check filename against self.fstypes can hanlde <file>.cpio.gz, # otherwise, its type would be "gz", which is incorrect.
@@ -381,7 +381,7 @@ class BaseConfig(object): self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):] elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): self.check_arg_path(os.path.abspath(arg)) - elif re.search('-image-', arg): + elif re.search(r'-image-|-image$', arg): # Lazy rootfs self.rootfs = arg else:
Signature · 1 line
git-series 0.9.1
Re: [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter
Just curious: is this test for "image" in file name really necessary? With qemuboot.conf the relevant files are already spelled out.
I don't see a need to force "compulsory" names for images.
If I comment out this test, everything works just fine. Am I missing something?
Juro
________________________________________
From: [email protected] [[email protected]] on behalf of Patrick Ohly [[email protected]]
Sent: Friday, January 27, 2017 7:30 AM
To: [email protected]
Subject: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter
The magic detection of the rootfs parameter only worked for image recipes which embedd the "image" string in the middle, as in "core-image-minimal".
Sometimes it is more natural to call an image "something-image". To get such an image detected by runqemu, "-image" at the end of a parameter must also cause that parameter to be treated as the rootfs parameter.
Inside the image directory, "something-image" has an -<arch> suffix and thus no change is needed for those usages of re.search('-image-'). However, while at it also enhance those string searches a bit (no need for re; any()+map() a bit closer to the intended logic).
--- scripts/runqemu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/runqemu +3 -3
@@ -218,7 +218,7 @@ class BaseConfig(object): if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), re.M): logger.info("Can't find required *.qemuboot.conf in %s" % p) return False - if not re.search('-image-', '\n'.join(os.listdir(p))): + if not any(map(lambda name: '-image-' in name, os.listdir(p))): logger.info("Can't find *-image-* in %s" % p) return False return True
@@ -267,7 +267,7 @@ class BaseConfig(object): re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): self.kernel = p - elif os.path.exists(p) and (not os.path.isdir(p)) and re.search('-image-', os.path.basename(p)): + elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p): self.rootfs = p # Check filename against self.fstypes can hanlde <file>.cpio.gz, # otherwise, its type would be "gz", which is incorrect.
@@ -381,7 +381,7 @@ class BaseConfig(object): self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):] elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): self.check_arg_path(os.path.abspath(arg)) - elif re.search('-image-', arg): + elif re.search(r'-image-|-image$', arg): # Lazy rootfs self.rootfs = arg else:
--
git-series 0.9.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter
Quoted 4 lines · Juro
Just curious: is this test for "image" in file name really necessary? With qemuboot.conf the relevant files are already spelled out.
I don't see a need to force "compulsory" names for images.
If I comment out this test, everything works just fine. Am I missing something?
Some of the usages when checking for paths might have become obsolete, but at least for distinguishing between machine and image base name parameters it is still relevant:
def check_args(self):
...
elif re.search(r'-image-|-image$', arg):
# Lazy rootfs
self.rootfs = arg
elif arg.startswith('ovmf'):
self.ovmf_bios.append(arg)
else:
# At last, assume is it the MACHINE
if (not unknown_arg) or unknown_arg == arg:
unknown_arg = arg
else:
raise Exception("Can't handle two unknown args: %s %
s" % (unknown_arg, arg))
When removing the "if re.search(r'-image-|-image$', arg)" clause one gets an error for:
$ runqemu core-image-minimal ext4 qemux86 runqemu - ERROR - Can't handle two unknown args: core-image-minimal qemux86 runqemu - ERROR - Try 'runqemu help' on how to use it
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
Re: [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter
Quoted 35 lines
-----Original Message-----
From: Patrick Ohly [mailto:[email protected]]
Sent: Friday, January 27, 2017 11:22 AM
To: Bystricky, Juro <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameterQuoted 4 lines · Juro
Just curious: is this test for "image" in file name really necessary? With qemuboot.conf the relevant files are already spelled out. I don't see a need to force "compulsory" names for images. If I comment out this test, everything works just fine. Am I missing
something?
Some of the usages when checking for paths might have become obsolete, but at least for distinguishing between machine and image base name parameters it is still relevant:
def
check_args(self):
...
elifre.search(r'-image-|-image$', arg):
# Lazy rootfs
self.rootfs = arg
elifarg.startswith('ovmf'):
self.ovmf_bios.append(arg)
else:
# At last, assume is it the MACHINE
if (notunknown_arg) orunknown_arg== arg:
unknown_arg= arg
else:
raise Exception("Can't handle two unknown args: %s %
s" % (unknown_arg, arg))
Quoted 7 lines
When removing the "if
re.search(r'-image-|-image$', arg)" clause one gets an error for:$ runqemu core-image-minimal ext4 qemux86 runqemu - ERROR - Can't handle two unknown args: core-image-minimal qemux86 runqemu - ERROR - Try 'runqemu help' on how to use it
I see, the purpose of this test is determine which argument is which, as they can be in any order. IMHO to differentiate between MACHINE and image it would make more sense to search for "qemu" instead of "-image-" or "-image" . (BTW do we need both -image- and -image$?)
There is also ANOTHER test for '-image-', in "is_deploy_dir_image". This is the one I considered redundant (or not needed in case we have qemuboot.conf).
Quoted 9 lines
--
Best Regards, Patrick OhlyThe content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
Re: [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter
Quoted 38 lines · Juro
Quoted 38 lines
-----Original Message-----
From: Patrick Ohly [mailto:[email protected]]
Sent: Friday, January 27, 2017 11:22 AM
To: Bystricky, Juro <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameterQuoted 4 lines · Juro
Just curious: is this test for "image" in file name really necessary? With qemuboot.conf the relevant files are already spelled out. I don't see a need to force "compulsory" names for images. If I comment out this test, everything works just fine. Am I missing
something?
Some of the usages when checking for paths might have become obsolete, but at least for distinguishing between machine and image base name parameters it is still relevant:
def
check_args(self):
...
elifre.search(r'-image-|-image$', arg):
# Lazy rootfs
self.rootfs = arg
elifarg.startswith('ovmf'):
self.ovmf_bios.append(arg)
else:
# At last, assume is it the MACHINE
if (notunknown_arg) orunknown_arg== arg:
unknown_arg= arg
else:
raise Exception("Can't handle two unknown args: %s %
s" % (unknown_arg, arg))When removing the "if
re.search(r'-image-|-image$', arg)" clause one gets an error for:
Quoted 8 lines
Quoted 4 lines
$ runqemu core-image-minimal ext4 qemux86 runqemu - ERROR - Can't handle two unknown args: core-image-minimal qemux86 runqemu - ERROR - Try 'runqemu help' on how to use itI see, the purpose of this test is determine which argument is which, as they can be in any order. IMHO to differentiate between MACHINE and image it would make more sense to search for "qemu" instead of "-image-" or "-image" .
The machine is not guaranteed to contain "qemu". I sent a patch to meta-intel which enables "runqemu core-image-minimal ext4 intel-corei7-64", and other BSPs might want to do the same.
Quoted 1 line
(BTW do we need both -image- and -image$?)
Yes, for "core-image-minimal" and "foobar-installer-image" (something that I am currently working on).
Quoted 2 lines
There is also ANOTHER test for '-image-', in "
is_deploy_dir_image". This is the one I considered redundant (or not needed in case we have qemuboot.conf).
That might be true. I was trying to be conservative with this patch and thus extended all existing checks instead of trying to to figure out which one had become redundant.
Signature · 6 lines
Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter.
PATCH v5 10/12 runqemu: support UEFI with OVMF firmware
In reply to Patrick OhlyIn the simplest case, "runqemu qemux86 <some-image> qcow2 ovmf" for an EFI-enabled image in the qcow2 format will locate the ovmf.qcow2 firmware file deployed by the ovmf recipe in the image deploy directory, override the graphics hardware with "-vga std" because that is all that OVMF supports, and boot with UEFI enabled.
ovmf is not built by default. Either do it explicitly ("bitbake ovmf") or make it a part of the normal build ("MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = ' ovmf'").
The firmware file is activated as a flash drive instead of using the qemu BIOS parameters, because that is the recommended method
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764918#47) as it allows storing UEFI variables in the file.
Instead of just "ovmf", a full path to an existing file can also be used, just as with the rootfs. That may be useful when making a permanent copy of the virtual machine data files.
It is possible to specify "ovmf*" parameters more than once, then each parameter creates a separate flash drive. This way it is possible to use separate flash drives for firmware code and variables:
$ runqemu qemux86 <some-image> qcow2 ovmf.code ovmf.vars"
Note that rebuilding ovmf will overwrite the ovmf.vars.qcow2 file in the image deploy directory. So when the goal is to update the firmware while keeping variables, make a copy of the variable file and use that:
$ mkdir my-machine $ cp tmp/deploy/images/qemux86/ovmf.vars.qcow2 my-machine/ $ runqemu qemux86 <some-image> qcow2 ovmf.code my-machine/ovmf.vars.qcow2
When Secure Boot was enabled in ovmf, one can pick that instead of the non-Secure-Boot enabled ovmf.code:
$ runqemu qemux86 <some-image> qcow2 ovmf.secboot.code my-machine/ovmf.vars.qcow2
--- scripts/runqemu | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-)
scripts/runqemu +41 -1
@@ -74,6 +74,7 @@ of the following environment variables (in any order): kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required) publicvnc - enable a VNC server open to all hosts audio - enable audio + [*/]ovmf* - OVMF firmware file or base name for booting with UEFI tcpserial=<port> - specify tcp serial port number biosdir=<dir> - specify custom bios dir biosfilename=<filename> - specify bios filename
@@ -162,6 +163,13 @@ class BaseConfig(object): self.clean_nfs_dir = False self.nfs_server = '' self.rootfs = '' + # File name(s) of a OVMF firmware file or variable store, + # to be added with -drive if=pflash. + # Found in the same places as the rootfs, with or without one of + # these suffices: qcow2, bin. + # Setting one also adds "-vga std" because that is all that + # OVMF supports. + self.ovmf_bios = [] self.qemuboot = '' self.qbconfload = False self.kernel = ''
@@ -259,6 +267,7 @@ class BaseConfig(object): - Check whether is a kernel file - Check whether is a image file - Check whether it is a nfs dir + - Check whether it is a OVMF flash file """ if p.endswith('.qemuboot.conf'): self.qemuboot = p
@@ -299,6 +308,8 @@ class BaseConfig(object): else: logger.info("Assuming %s is an nfs rootfs" % p) self.check_arg_nfs(p) + elif os.path.basename(p).startswith('ovmf'): + self.ovmf_bios.append(p) else: raise Exception("Unknown path arg %s" % p)
@@ -384,6 +395,8 @@ class BaseConfig(object): elif re.search(r'-image-|-image$', arg): # Lazy rootfs self.rootfs = arg + elif arg.startswith('ovmf'): + self.ovmf_bios.append(arg) else: # At last, assume is it the MACHINE if (not unknown_arg) or unknown_arg == arg:
@@ -482,6 +495,20 @@ class BaseConfig(object): if not os.path.exists(self.rootfs): raise Exception("Can't find rootfs: %s" % self.rootfs) + def check_ovmf(self): + """Check and set full path for OVMF firmware and variable file(s).""" + + for index, ovmf in enumerate(self.ovmf_bios): + if os.path.exists(ovmf): + continue + for suffix in ('qcow2', 'bin'): + path = '%s/%s.%s' % (self.get('DEPLOY_DIR_IMAGE'), ovmf, suffix) + if os.path.exists(path): + self.ovmf_bios[index] = path + break + else: + raise Exception("Can't find OVMF firmware: %s" % ovmf) + def check_kernel(self): """Check and set kernel, dtb""" # The vm image doesn't need a kernel
@@ -576,6 +603,7 @@ class BaseConfig(object): self.check_kvm() self.check_fstype() self.check_rootfs() + self.check_ovmf() self.check_kernel() self.check_biosdir() self.check_mem()
@@ -684,6 +712,8 @@ class BaseConfig(object): print('NFS_DIR: [%s]' % self.nfs_dir) else: print('ROOTFS: [%s]' % self.rootfs) + if self.ovmf_bios: + print('OVMF: %s' % self.ovmf_bios) print('CONFFILE: [%s]' % self.qemuboot) print('')
@@ -943,7 +973,17 @@ class BaseConfig(object): check_libgl(qemu_bin) - self.qemu_opt = "%s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND'), self.qemu_opt_script) + self.qemu_opt = "%s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.get('ROOTFS_OPTIONS'), self.get('QB_OPT_APPEND')) + + for ovmf in self.ovmf_bios: + format = ovmf.rsplit('.', 1)[-1] + self.qemu_opt += ' -drive if=pflash,format=%s,file=%s' % (format, ovmf) + if self.ovmf_bios: + # OVMF only supports normal VGA, i.e. we need to override a -vga vmware + # that gets added for example for normal qemux86. + self.qemu_opt += ' -vga std' + + self.qemu_opt += ' ' + self.qemu_opt_script if self.snapshot: self.qemu_opt += " -snapshot"
Signature · 1 line
git-series 0.9.1
PATCH v5 11/12 ovmf: build image which enrolls standard keys
In reply to Patrick OhlyWhen booting a qemu virtual machine with ovmf.secboot, it comes up with no keys installed and thus Secure Boot disabled. To lock down the machine like a typical PC, one has to enroll the same keys that PC vendors normally install, i.e. the ones from Microsoft.
This can be done manually (see
https://wiki.ubuntu.com/SecurityTeam/SecureBoot and
https://github.com/tianocore-docs/Docs/raw/master/White_Papers/A_Tour_Beyond_BIOS_into_UEFI_Secure_Boot_White_Paper.pdf) or automatically with the EnrollDefaultKeys.efi helper from the Fedora ovmf rpm.
To use this with qemu:
$ bitbake ovmf-shell-image
...
$ runqemu serial nographic qemux86 ovmf-shell-image wic ovmf.secboot
...
UEFI Interactive Shell v2.1
EDK II
UEFI v2.60 (EDK II, 0x00010000)
Mapping table
FS0: Alias(s):HD2b:;BLK4:
PciRoot(0x0)/Pci(0x5,0x0)/HD(1,GPT,06AEF759-3982-4AF6-B517-70BA6304FC1C,0x800,0x566C)
BLK0: Alias(s):
PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x0)
BLK1: Alias(s):
PciRoot(0x0)/Pci(0x1,0x0)/Floppy(0x1)
BLK2: Alias(s):
PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0)
BLK3: Alias(s):
PciRoot(0x0)/Pci(0x5,0x0)Press ESC in 1 seconds to skip startup.nsh or any other key to continue. Shell> fs0:EnrollDefaultKeys.efi
info: SetupMode=1 SecureBoot=0 SecureBootEnable=0 CustomMode=0 VendorKeys=1
info: SetupMode=0 SecureBoot=1 SecureBootEnable=1 CustomMode=0 VendorKeys=0
info: success
Shell> reset
Remember that this will modify deploy/images/qemux86/ovmf.secboot.qcow2, so make a copy and use the full path of that copy instead of the "ovmf" argument if needed.
The ovmf-shell-image contains an EFI shell, which is what got started here directly. After enrolling the keys, Secure Boot is active and the same image cannot be booted anymore, so the BIOS goes through the normal boot targets (including network boot, which can take a while to time out), and ends up in the internal EFI shell. Trying to invoke bootia32.efi (the shell from the image) or EnrollDefaultKeys.efi then fails:
Shell> bootia32.efi
Command Error Status: Security Violation
The main purpose at the moment is to test that Secure Boot enforcement really works. If we had a way to sign generated images, that part could also be tested by booting in a locked down qemu instance.
0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch is from
https://src.fedoraproject.org/cgit/rpms/edk2.git/tree/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch?id=b1781931894bf2057464e634beed68b1e3218c9e
with one line changed to fix
https://bugzilla.redhat.com/show_bug.cgi?id=132502:
"EFI_STATUS Status = EFI_SUCCESS;" in EnrollListOfX509Certs() lacked the initializer.
--- meta/recipes-core/ovmf/ovmf-shell-image.bb | 17 +- meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch | 1124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks | 4 +- meta/recipes-core/ovmf/ovmf_git.bb | 22 +- 4 files changed, 1167 insertions(+) create mode 100644 meta/recipes-core/ovmf/ovmf-shell-image.bb create mode 100644 meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch create mode 100644 meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks
meta/recipes-core/ovmf/ovmf-shell-image.bb new file +17 -0
@@ -0,0 +1,17 @@ +DESCRIPTION = "boot image with UEFI shell and tools" + +# For this image recipe, only the wic format with a +# single vfat partition makes sense. +IMAGE_FSTYPES_forcevariable = 'wic' + +WKS_FILE = "ovmf/ovmf-shell-image.wks" +inherit image + +# We want a minimal image with just ovmf-shell-efi unpacked in it. We +# avoid installing unnecessary stuff as much as possible, but some +# things still get through and need to be removed. +PACKAGE_INSTALL = "ovmf-shell-efi" +LINGUAS_INSTALL = "" +do_image () { + rm -rf `ls -d ${IMAGE_ROOTFS}/* | grep -v efi` +}
meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch new file +1124 -0
1,124 lines not on this page · raw message
meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks new file +4 -0
@@ -0,0 +1,4 @@ +# short-description: Create an EFI disk image with just the EFI system partition + +part / --source rootfs --ondisk sda --fstype=vfat --align 1024 +bootloader --ptable gpt --timeout=5
meta/recipes-core/ovmf/ovmf_git.bb +22 -0
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ SRC_URI_append_class-target = " \ ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'http://www.openssl.org/source/openssl-1.0.2j.tar.gz;name=openssl;subdir=${S}/CryptoPkg/Library/OpensslLib', '', d)} \ + file://0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch \ " SRCREV="4575a602ca6072ee9d04150b38bfb143cbff8588"
@@ -136,6 +137,7 @@ do_compile_class-target() { ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.fd ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.code.fd ln ${build_dir}/FV/OVMF_VARS.fd ${WORKDIR}/ovmf/ovmf.vars.fd + ln ${build_dir}/${OVMF_ARCH}/Shell.efi ${WORKDIR}/ovmf/ if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', d)}; then # See CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt and
@@ -150,6 +152,7 @@ do_compile_class-target() { ${S}/OvmfPkg/build.sh $PARALLEL_JOBS -a $OVMF_ARCH -b RELEASE -t ${FIXED_GCCVER} ${OVMF_SECURE_BOOT_FLAGS} ln ${build_dir}/FV/OVMF.fd ${WORKDIR}/ovmf/ovmf.secboot.fd ln ${build_dir}/FV/OVMF_CODE.fd ${WORKDIR}/ovmf/ovmf.secboot.code.fd + ln ${build_dir}/${OVMF_ARCH}/EnrollDefaultKeys.efi ${WORKDIR}/ovmf/ fi }
@@ -159,8 +162,27 @@ do_install_class-native() { } do_install_class-target() { + # Content for UEFI shell iso. We install the EFI shell as + # bootx64/ia32.efi because then it can be started even when the + # firmware itself does not contain it. + install -d ${D}/efi/boot + install ${WORKDIR}/ovmf/Shell.efi ${D}/efi/boot/boot${@ "ia32" if "${TARGET_ARCH}" != "x86_64" else "x64"}.efi + if ${@bb.utils.contains('PACKAGECONFIG', 'secureboot', 'true', 'false', d)}; then + install ${WORKDIR}/ovmf/EnrollDefaultKeys.efi ${D} + fi } +# This always gets packaged because ovmf-shell-image depends on it. +# This allows testing that recipe in all configurations because it +# can always be part of a world build. +# +# However, EnrollDefaultKeys.efi is only included when Secure Boot is enabled. +PACKAGES =+ "ovmf-shell-efi" +FILES_ovmf-shell-efi = " \ + EnrollDefaultKeys.efi \ + efi/ \ +" + do_deploy() { } do_deploy[cleandirs] = "${DEPLOYDIR}"
Signature · 1 line
git-series 0.9.1
PATCH v5 12/12 ovmf: remove BGRT patch
In reply to Patrick OhlyThis patch was added to meta-luv for kernel testing purposes and probably is not relevant for OE-core.
--- meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch | 110 +------------------------------------------------------------------------ meta/recipes-core/ovmf/ovmf_git.bb | 1 +- 2 files changed, 111 deletions(-) delete mode 100644 meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch
meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch deleted +0 -110
@@ -1,110 +0,0 @@ -From 66a4020c3c2163aeffc9757851f33c346ecfd870 Mon Sep 17 00:00:00 2001 -From: Sai Praneeth Prakhya <[email protected]> -Date: Mon, 4 Apr 2016 12:15:12 -0700 -Subject: [PATCH] OvmfPkg: Enable BGRT in OVMF - -By default, firmware (OVMF - Open source Virtual Machine Firmware) -never publishes BGRT (Boot Graphics Resource Table) and in the boot -process Linux kernel checks for this table and if it fails to find BGRT -table then corresponding code in Linux kernel is not executed. EDK II -(EFI Development Kit, thus OVMF) already has BGRT source code packaged -into it but it is excluded from the build process of OVMF. These changes -to build system of OVMF enables BGRT in 32-bit and 64-bit OVMF. - -There are only two files that need to be modified in order to do this. -The first one being OvmfPkg*.dsc (this file describes the platform) and -the second one being OvmfPkg*.fdf (this file describes firmware descriptor -volume). A *.inf file (here "BootGraphicsResourceTableDxe.inf") -describes a module (here BGRT). So, include -"BootGraphicsResourceTableDxe.inf" file in "OvmfPkg*.dsc" so that BGRT -source code will be compiled and "BootGraphicsResourceTableDxe.efi" file -is generated and we should also include -"BootGraphicsResourceTableDxe.inf" file in "OvmfPkg*.fdf" file so that -"BootGraphicsResourceTableDxe.efi" will be placed in a firmware volume -and thus gets published. - -Signed-off-by: Sai Praneeth Prakhya <[email protected]> ---- - OvmfPkg/OvmfPkgIa32.dsc | 1 + - OvmfPkg/OvmfPkgIa32.fdf | 1 + - OvmfPkg/OvmfPkgIa32X64.dsc | 1 + - OvmfPkg/OvmfPkgIa32X64.fdf | 1 + - OvmfPkg/OvmfPkgX64.dsc | 1 + - OvmfPkg/OvmfPkgX64.fdf | 1 + - 6 files changed, 6 insertions(+) - -diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc -index 9e5b477..0582219 100644 ---- a/OvmfPkg/OvmfPkgIa32.dsc -+++ b/OvmfPkg/OvmfPkgIa32.dsc -@@ -647,6 +647,7 @@ - OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf - MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf -+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf - - # - # Network Support -diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf -index fc203f2..f968cb7 100644 ---- a/OvmfPkg/OvmfPkgIa32.fdf -+++ b/OvmfPkg/OvmfPkgIa32.fdf -@@ -274,6 +274,7 @@ INF RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf - INF OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf - INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf -+INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf - - INF RuleOverride = BINARY FatBinPkg/EnhancedFatDxe/Fat.inf - -diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc -index 6e4da4f..8289385 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.dsc -+++ b/OvmfPkg/OvmfPkgIa32X64.dsc -@@ -656,6 +656,7 @@ - OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf - MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf -+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf - - # - # Network Support -diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf -index d3f46f3..282d40b 100644 ---- a/OvmfPkg/OvmfPkgIa32X64.fdf -+++ b/OvmfPkg/OvmfPkgIa32X64.fdf -@@ -274,6 +274,7 @@ INF RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf - INF OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf - INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf -+INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf - - INF RuleOverride = BINARY USE = X64 FatBinPkg/EnhancedFatDxe/Fat.inf - -diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc -index 3d6d43e..0f956a7 100644 ---- a/OvmfPkg/OvmfPkgX64.dsc -+++ b/OvmfPkg/OvmfPkgX64.dsc -@@ -654,6 +654,7 @@ - OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf - MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf -+ MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf - - # - # Network Support -diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf -index 15ef13a..9708fd5 100644 ---- a/OvmfPkg/OvmfPkgX64.fdf -+++ b/OvmfPkg/OvmfPkgX64.fdf -@@ -274,6 +274,7 @@ INF RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf - INF OvmfPkg/AcpiS3SaveDxe/AcpiS3SaveDxe.inf - INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf - INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf -+INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf - - INF RuleOverride = BINARY FatBinPkg/EnhancedFatDxe/Fat.inf - --- -2.7.4 -
meta/recipes-core/ovmf/ovmf_git.bb +0 -1
@@ -12,7 +12,6 @@ PACKAGECONFIG[secureboot] = ",,," SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ file://0001-BaseTools-Force-tools-variables-to-host-toolchain.patch \ - file://0001-OvmfPkg-Enable-BGRT-in-OVMF.patch \ file://0002-ovmf-update-path-to-native-BaseTools.patch \ file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ "
Signature · 1 line
git-series 0.9.1
✗ patchtest: failure for UEFI + Secure Boot + qemu (rev6)
In reply to Patrick Ohly== Series Details ==
Series: UEFI + Secure Boot + qemu (rev6)
Revision: 6
URL : https://patchwork.openembedded.org/series/4506/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence]
Suggested fix Sign off the added patch file (meta/recipes-extended/acpica/acpitests/aapits-linux.patch)
* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence]
Suggested fix Add Upstream-Status: <status> to the header of meta/recipes-extended/acpica/acpitests/aapits-linux.patch (possible values: Pending, Submitted, Accepted, Backport, Denied, Inappropriate)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe