These changes enable building systemd uki images which combine
kernel, kernel command line, initrd and possibly signatures to
a single UEFI binary. This binary can be booted with UEFI firmware
and systemd-boot. No grub is needed and UEFI firmware and/or
systemd-boot provide possibilities for boot menus.
The uki binary can also be signed for UEFI secure boot
so the secure boot extends from firmware to kernel and initrd.
Binding secure boot to full userspace is then easier since for example
kernel command line and initrd contain the support needed to mount
encrypted dm-verity etc partitions, and/or create partitions on demand
with systemd-repart using device specific TPM devices for encryption.
Tested on qemuarm64-secureboot machine from meta-arm with changes to
support secure boot. Slightly different configuration tested on
multiple arm64 System Ready boards with UEFI firmware, real and firmware
based TPM devices. Tested with ovmf firmware on x86_64 with selftests but
without secure boot which seems to be harder to setup in ovmf.
Sadly I see two wic selftests, wic.Wic2.test_rawcopy_plugin_qemu and
wic.Wic2.test_expand_mbr_image, failing when executing all wic selftests
on a build machine with zfs filesystem. Will investigate this further.
The issue seems to be in mkfs.ext4 producing broken filesystem, and partially
in the tests which don't run the correct rootfs file (.ext4 vs .wic).
Will debug this further and it is IMO unrelated to these changes since
they reproduce on pure master branch without this series.
v10: disabled kvm support in new tests since it breaks qemu boot on aarch64
build machine, removed "testimage" from IMAGE_CLASS as well since
can end up testing qemu machine during build.
v9: Fixed wic test on genericarm64. Disabled new aarch64 wic test on
aarch64 build host since boot with qemu is currently failing.
Tested wic, uki and efibootpartition selftests with target machines
qemux86_64,
qemuarm64 and genericarm64 on x86_64 build host.
v8: fixed comments from Ross Burton: debug print from warning to debug,
dropped duplicate DISTRO_FEATURE setting for systemd in tests,
removed aarch64 comment from tests which are currently x86 only.
Fixed the new aarch64 wic selftest to run on both genericarm64
and qemuarm64 by adding bios, virtio disk driver etc settings
for runqemu (already set in genericarm64 but missing from qemuarm64).
v7: add missing "ovmf" to runqemu argument to
test_efi_plugin_plain_systemd_boot_qemu_x86 to fix boot hang
v6: fixes wic refactoring botch which broken non-uki systemd-boot usage on
genericarm64 reported by Ross Burton <[email protected]>, added
selftest to cover this wks usage on x86 and aarch64
v5: drop patch "image_types_wic.bbclass: set systemd-boot and os-release
dependency for all archs" since systemd-boot does not support all
architectures
v4: handle missing runqemu variable from build config, add
python3-pefile to fast ptest list
v3: rebased, fixed and added more sefltests, removed wic plugin side uki
support
v2: https://lists.openembedded.org/g/openembedded-core/message/204090
*** BLURB HERE ***
Michelle Lin (1):
uki.bbclass: add class for building Unified Kernel Images (UKI)
Mikko Rapeli (8):
wic bootimg-efi.py: keep timestamps and add debug prints
wic bootimg-efi.py: change UKI support from wic plugin to uki.bbclass
oeqa selftest uki.py: add tests for uki.bbclass
oeqa selftest efibootpartition.py: add TEST_RUNQEMUPARAMS to runqemu
oeqa selftest efibootpartition.py: remove systemd-boot from grub-efi
test
oeqa selftest wic.py: add TEST_RUNQEMUPARAMS to runqemu
oeqa selftest wic.py: support UKIs via uki.bbclass
oeqa selftest wic.py: fix missing ext4 image
meta-selftest/wic/test_efi_plugin.wks | 5 +-
.../test_efi_plugin_plain_systemd-boot.wks | 5 +
meta/classes-recipe/image_types_wic.bbclass | 3 +-
meta/classes-recipe/uki.bbclass | 195 ++++++++++++++++++
.../oeqa/selftest/cases/efibootpartition.py | 11 +-
meta/lib/oeqa/selftest/cases/uki.py | 142 +++++++++++++
meta/lib/oeqa/selftest/cases/wic.py | 140 +++++++++++--
.../wic/canned-wks/efi-uki-bootdisk.wks.in | 3 +
scripts/lib/wic/plugins/source/bootimg-efi.py | 183 +++++-----------
9 files changed, 529 insertions(+), 158 deletions(-)
create mode 100644 meta-selftest/wic/test_efi_plugin_plain_systemd-boot.wks
create mode 100644 meta/classes-recipe/uki.bbclass
create mode 100644 meta/lib/oeqa/selftest/cases/uki.py
create mode 100644 scripts/lib/wic/canned-wks/efi-uki-bootdisk.wks.in
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#206201):
https://lists.openembedded.org/g/openembedded-core/message/206201
Mute This Topic: https://lists.openembedded.org/mt/109169005/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-