1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

Merge pull request #141236 from witchof0x20/ovmf_tpm

This commit is contained in:
Sandro 2021-10-16 19:46:38 +02:00 committed by GitHub
commit cdec961ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -2,6 +2,7 @@
, csmSupport ? false, seabios ? null
, secureBoot ? false
, httpSupport ? false
, tpmSupport ? false
}:
assert csmSupport -> seabios != null;
@ -30,9 +31,10 @@ edk2.mkDerivation projectDscPath {
hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ];
buildFlags =
lib.optional secureBoot "-DSECURE_BOOT_ENABLE=TRUE"
lib.optional secureBoot "-D SECURE_BOOT_ENABLE=TRUE"
++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ]
++ lib.optionals httpSupport [ "-DNETWORK_HTTP_ENABLE=TRUE" "-DNETWORK_HTTP_BOOT_ENABLE=TRUE" ];
++ lib.optionals httpSupport [ "-D NETWORK_HTTP_ENABLE=TRUE" "-D NETWORK_HTTP_BOOT_ENABLE=TRUE" ]
++ lib.optionals tpmSupport [ "-D TPM_ENABLE" "-D TPM2_ENABLE" "-D TPM2_CONFIG_ENABLE"];
postPatch = lib.optionalString csmSupport ''
cp ${seabios}/Csm16.bin OvmfPkg/Csm/Csm16/Csm16.bin

View file

@ -616,6 +616,8 @@ mapAliases ({
osquery = throw "osquery has been removed."; # added 2019-11-24
osxfuse = macfuse-stubs; # added 2021-03-20
otter-browser = throw "otter-browser has been removed from nixpkgs, as it was unmaintained"; # added 2020-02-02
OVMF-CSM = throw "OVMF-CSM has been removed in favor of OVMFFull"; # added 2021-10-16
OVMF-secureBoot = throw "OVMF-secureBoot has been removed in favor of OVMFFull"; # added 2021-10-16
owncloudclient = owncloud-client; # added 2016-08
ocz-ssd-guru = throw "ocz-ssd-guru has been removed due to there being no source available"; # added 2021-07-12
p11_kit = p11-kit; # added 2018-02-25

View file

@ -20964,8 +20964,12 @@ with pkgs;
qboot = pkgsi686Linux.callPackage ../applications/virtualization/qboot { };
OVMF = callPackage ../applications/virtualization/OVMF { };
OVMF-CSM = OVMF.override { csmSupport = true; };
OVMF-secureBoot = OVMF.override { secureBoot = true; };
OVMFFull = callPackage ../applications/virtualization/OVMF {
secureBoot = true;
csmSupport = true;
httpSupport = true;
tpmSupport = true;
};
seabios = callPackage ../applications/virtualization/seabios { };