From 4631f2e1ed2b66d099948665209409f2e8fc37ec Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Tue, 27 Feb 2024 20:39:11 -0500 Subject: [PATCH] OVMF: remove CSM support Upstream removed this support in edk2 202402 --- .../virtualization/OVMF/default.nix | 8 +------- pkgs/by-name/in/incus/package.nix | 17 ----------------- pkgs/tools/admin/lxd/wrapper.nix | 11 ----------- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index d3ebd6a7f29e..2e8c5bd1f603 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -1,7 +1,6 @@ { stdenv, nixosTests, lib, edk2, util-linux, nasm, acpica-tools, llvmPackages , fetchurl, python3, pexpect, xorriso, qemu, dosfstools, mtools -, csmSupport ? false, seabios -, fdSize2MB ? csmSupport +, fdSize2MB ? false , fdSize4MB ? secureBoot , secureBoot ? false , systemManagementModeRequired ? secureBoot && stdenv.hostPlatform.isx86 @@ -99,7 +98,6 @@ edk2.mkDerivation projectDscPath (finalAttrs: { ++ lib.optionals sourceDebug [ "-D SOURCE_DEBUG_ENABLE=TRUE" ] ++ lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] ++ lib.optionals systemManagementModeRequired [ "-D SMM_REQUIRE=TRUE" ] - ++ 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" ] @@ -115,10 +113,6 @@ edk2.mkDerivation projectDscPath (finalAttrs: { unpackFile ${debian-edk-src} ''; - postPatch = lib.optionalString csmSupport '' - cp ${seabios}/share/seabios/Csm16.bin OvmfPkg/Csm/Csm16/Csm16.bin - ''; - postConfigure = lib.optionalDrvAttr msVarsTemplate '' tr -d '\n' < ${vendorPkKek} | sed \ -e 's/.*-----BEGIN CERTIFICATE-----/${OvmfPkKek1AppPrefix}:/' \ diff --git a/pkgs/by-name/in/incus/package.nix b/pkgs/by-name/in/incus/package.nix index 110bc41dce28..2958ab036ac9 100644 --- a/pkgs/by-name/in/incus/package.nix +++ b/pkgs/by-name/in/incus/package.nix @@ -81,20 +81,11 @@ let ovmf-2mb = OVMF.override { secureBoot = true; - csmSupport = false; fdSize2MB = true; }; ovmf-4mb = OVMF.override { secureBoot = true; - csmSupport = false; - fdSize4MB = true; - }; - - ovmf-4mb-csm = OVMF.override { - secureBoot = true; - csmSupport = false; - fdSize2MB = false; fdSize4MB = true; }; @@ -107,10 +98,6 @@ let name = "OVMF_CODE.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { - name = "OVMF_CODE.4MB.CSM.fd"; - path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_CODE.fd"; - } { name = "OVMF_CODE.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd"; @@ -128,10 +115,6 @@ let name = "OVMF_VARS.2MB.ms.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { - name = "OVMF_VARS.4MB.CSM.fd"; - path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_VARS.fd"; - } { name = "OVMF_VARS.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; diff --git a/pkgs/tools/admin/lxd/wrapper.nix b/pkgs/tools/admin/lxd/wrapper.nix index b197cd496b1a..9edfefd57ccd 100644 --- a/pkgs/tools/admin/lxd/wrapper.nix +++ b/pkgs/tools/admin/lxd/wrapper.nix @@ -76,20 +76,11 @@ let ovmf-2mb = OVMF.override { secureBoot = true; - csmSupport = false; fdSize2MB = true; }; ovmf-4mb = OVMF.override { secureBoot = true; - csmSupport = false; - fdSize4MB = true; - }; - - ovmf-4mb-csm = OVMF.override { - secureBoot = true; - csmSupport = false; - fdSize2MB = false; fdSize4MB = true; }; @@ -99,13 +90,11 @@ let # also found in /snap/lxd/current/share/qemu/ on a snap install ovmf = linkFarm "lxd-ovmf" [ { name = "OVMF_CODE.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } - { name = "OVMF_CODE.4MB.CSM.fd"; path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_CODE.fd"; } { name = "OVMF_CODE.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } { name = "OVMF_CODE.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_CODE.fd"; } { name = "OVMF_VARS.2MB.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } { name = "OVMF_VARS.2MB.ms.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } - { name = "OVMF_VARS.4MB.CSM.fd"; path = "${ovmf-4mb-csm.fd}/FV/${ovmf-prefix}_VARS.fd"; } { name = "OVMF_VARS.4MB.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } { name = "OVMF_VARS.4MB.ms.fd"; path = "${ovmf-4mb.fd}/FV/${ovmf-prefix}_VARS.fd"; } { name = "OVMF_VARS.fd"; path = "${ovmf-2mb.fd}/FV/${ovmf-prefix}_VARS.fd"; }