OVMF: remove CSM support

Upstream removed this support in edk2 202402
This commit is contained in:
Adam Stephens 2024-02-27 20:39:11 -05:00
parent 54a3e9ec0d
commit 4631f2e1ed
No known key found for this signature in database
3 changed files with 1 additions and 35 deletions

View file

@ -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}:/' \

View file

@ -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";

View file

@ -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"; }