]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/boot/efi/vmm.c
boot: improve support for qemu
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 9 Sep 2022 11:12:04 +0000 (13:12 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 16 Nov 2022 11:52:58 +0000 (12:52 +0100)
commit8fec4f95be7a323410f9853b6773c810ba6c7152
tree15458fe3c17e74c6a4d499b07fa82cf4a35e7c05
parentb8d6b1608e9dd554d499eab0e6527d1f6177a85e
boot: improve support for qemu

systemd-boot expects being loaded from ESP and is quite unhappy in case
the loaded image device path is something else.  When running on qemu
this can easily happen though.  Case one is direct kernel boot, i.e.
loading via 'qemu -kernel systemd-bootx64.efi'.  Case two is sd-boot
being added to the ovmf firmware image and being loaded from there.

This patch detects both cases and goes inspect all file systems known to
the firmware, trying to find the ESP.  When present the
VMMBootOrderNNNN variables are used to inspect the file systems in the
given order.
src/boot/efi/boot.c
src/boot/efi/meson.build
src/boot/efi/vmm.c [new file with mode: 0644]
src/boot/efi/vmm.h [new file with mode: 0644]