Skip to content

UEFI + Secure Boot + qemu

Patrick Ohly openembedded-core 5 versions – In review

Get series with b4
b4 am cover.51e0eb88ea69468cf5a410aa7194c25cf61d57b7.1485530988.git-series.patrick.ohly@intel.com

Versions newest first · linked by author and title

  1. v5 Latest12 patches 12 repliesIn review
  2. v412 patches 10 repliesSuperseded
  3. v312 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v211 patches1 replySuperseded
v19 patches25 repliesSuperseded

Changes in v5 from the cover letter

- revised the commit message of "ovmf: deploy firmware in image directory" to clarify expected usage

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12acpica: move from meta-oe to OE-coremeta/recipes-extended/acpica/acpica_20150515.bb meta/recipes-extended/acpica/acpitests/aapits-linux.patch meta/recipes-extended/acpica/acpitests/aapits-makefile.patch +2 more+483 -03 replies
2/12acpica: work around flex 2.6.2 code generation issuemeta/recipes-extended/acpica/acpica_20150515.bb meta/recipes-extended/acpica/files/rename-yy_scan_string-manually.patch+65 -00 replies
3/12ovmf: move from meta-luv to OE-coremeta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch meta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch meta/recipes-core/ovmf/ovmf/0002-ovmf-update-path-to-native-BaseTools.patch +2 more+350 -08 replies
4/12ovmf: explicitly depend on nasm-nativemeta/recipes-core/ovmf/ovmf_git.bb+2 -00 replies
5/12ovmf: deploy firmware in image directorymeta/recipes-core/ovmf/ovmf_git.bb+31 -110 replies
6/12ovmf_git.bb: enable parallel compilationmeta/recipes-core/ovmf/ovmf_git.bb+3 -20 replies
7/12ovmf_git.bb: enable Secure Bootmeta/recipes-core/ovmf/ovmf_git.bb+36 -00 replies
8/12runqemu: fix undefined variable reference in check_arg_path()scripts/runqemu+1 -10 replies
9/12runqemu: also accept -image suffix for rootfs parameterscripts/runqemu+3 -34 replies
10/12runqemu: support UEFI with OVMF firmwarescripts/runqemu+41 -10 replies
11/12ovmf: build image which enrolls standard keysmeta/recipes-core/ovmf/ovmf-shell-image.bb meta/recipes-core/ovmf/ovmf/0007-OvmfPkg-EnrollDefaultKeys-application-for-enrolling-.patch meta/recipes-core/ovmf/ovmf/ovmf-shell-image.wks +1 more+1167 -00 replies
12/12ovmf: remove BGRT patchmeta/recipes-core/ovmf/ovmf/0001-OvmfPkg-Enable-BGRT-in-OVMF.patch meta/recipes-core/ovmf/ovmf_git.bb+0 -1110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 00/12] 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