]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/kvm: Add `EFI_STUB` configuration entry
authorSergiu Moga <sergiu.moga@protonmail.com>
Mon, 27 Mar 2023 09:44:46 +0000 (12:44 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 10:47:30 +0000 (10:47 +0000)
Add a configuration option to build the Unikernel as a valid,
loadable UEFI application. Make it depend on `ACPI` and, obviously,
on not having `PLAT_LINUXU` enabled.

Furthermore, remove default selection of the Multiboot boot protocol
if QEMU VMM is selected, now that a QEMU image can also be an EFI
image.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #909

plat/kvm/Config.uk

index fca462ef7f9069d0daaa32f2ac99d308e3b4d2a5..8fe2ae52f66379a328a874085184b378880c9592 100644 (file)
@@ -14,6 +14,9 @@ menuconfig PLAT_KVM
 
 if (PLAT_KVM)
 
+choice
+       prompt "Booting environment"
+
 config KVM_BOOT_PROTO_MULTIBOOT
        bool "Multiboot"
        depends on KVM_VMM_QEMU && !KVM_VMM_FIRECRACKER && ARCH_X86_64
@@ -26,13 +29,22 @@ config KVM_BOOT_PROTO_LXBOOT
        help
                Linux 64-bit Boot Protocol
 
+config KVM_BOOT_EFI_STUB
+       bool "EFI stub"
+       depends on KVM_VMM_QEMU && !KVM_VMM_FIRECRACKER
+       depends on OPTIMIZE_PIE
+       select UKPLAT_ACPI
+       help
+               Make Unikraft bootable by UEFI firmware
+
+endchoice
+
 choice
        prompt "Virtual Machine Monitor"
        default KVM_VMM_QEMU
 
 config KVM_VMM_QEMU
        bool "QEMU"
-       select KVM_BOOT_PROTO_MULTIBOOT
 
 config KVM_VMM_FIRECRACKER
        bool "Firecracker"