From 8d08370a41610b092bdae0892b48a2b077e5c92c Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Wed, 19 Jul 2023 09:07:19 -0400 Subject: [PATCH] ovmf: add support for 4MB flash image --- pkgs/applications/virtualization/OVMF/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 6e3e9ba0d126..ec055f5cc457 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -1,5 +1,7 @@ { stdenv, nixosTests, lib, edk2, util-linux, nasm, acpica-tools, llvmPackages , csmSupport ? false, seabios ? null +, fdSize2MB ? csmSupport +, fdSize4MB ? false , secureBoot ? false , httpSupport ? false , tpmSupport ? false @@ -49,7 +51,9 @@ edk2.mkDerivation projectDscPath (finalAttrs: { ++ lib.optionals debug [ "-D DEBUG_ON_SERIAL_PORT=TRUE" ] ++ lib.optionals sourceDebug [ "-D SOURCE_DEBUG_ENABLE=TRUE" ] ++ lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] - ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ] + ++ lib.optionals csmSupport [ "-D CSM_ENABLE" ] + ++ lib.optionals fdSize2MB ["-D FD_SIZE_2MB"] + ++ lib.optionals fdSize4MB ["-D FD_SIZE_4MB"] ++ lib.optionals httpSupport [ "-D NETWORK_HTTP_ENABLE=TRUE" "-D NETWORK_HTTP_BOOT_ENABLE=TRUE" ] ++ lib.optionals tlsSupport [ "-D NETWORK_TLS_ENABLE=TRUE" ] ++ lib.optionals tpmSupport [ "-D TPM_ENABLE" "-D TPM2_ENABLE" "-D TPM2_CONFIG_ENABLE"];