From bb0210e327fb5e7023aefb886f8eb7aa153078fb Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Sun, 8 May 2022 16:42:13 -0700 Subject: [PATCH 1/2] ena: 2.5.0 -> 2.7.1 This update is supposed to give us support for the 5.17 kernel according to the 2.7.0 release notes here: https://github.com/amzn/amzn-drivers/releases/tag/ena_linux_2.7.0 Unfortunately, in practice, it does not build with `linuxPackages_5_17`, so I left that marked as broken. It does work for 5.15 though, so we can use that, woo! --- pkgs/os-specific/linux/ena/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/ena/default.nix b/pkgs/os-specific/linux/ena/default.nix index 9f2f8682078..b8128c83c0c 100644 --- a/pkgs/os-specific/linux/ena/default.nix +++ b/pkgs/os-specific/linux/ena/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub, kernel }: stdenv.mkDerivation rec { - version = "2.5.0"; + version = "2.7.1"; name = "ena-${version}-${kernel.version}"; src = fetchFromGitHub { owner = "amzn"; repo = "amzn-drivers"; rev = "ena_linux_${version}"; - sha256 = "sha256-uOf/1624UtjaZtrk7XyQpeUGdTNVDnzZJZMgU86i+SM="; + sha256 = "sha256-JkGzmmsAmLvL9e+bg58H79GNHgsqydK/79VoWEq5/Mc="; }; hardeningDisable = [ "pic" ]; @@ -42,6 +42,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Only; maintainers = [ maintainers.eelco ]; platforms = platforms.linux; - broken = kernel.kernelAtLeast "5.15"; + broken = kernel.kernelAtLeast "5.17"; }; } From 35cfe2c29c96d93b4430c59983361c61aaf002ae Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Sun, 8 May 2022 16:48:49 -0700 Subject: [PATCH 2/2] nixos/amazon-image: default to 5.15 kernel Previously, it was held back due to the ENA driver not building on the current default (5.15). The previous commit bumps the ENA driver, which allows 5.15 to work. --- nixos/modules/virtualisation/amazon-image.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix index 9a56b695015..12fe6fa4447 100644 --- a/nixos/modules/virtualisation/amazon-image.nix +++ b/nixos/modules/virtualisation/amazon-image.nix @@ -37,13 +37,11 @@ in { assertion = cfg.efi -> cfg.hvm; message = "EC2 instances using EFI must be HVM instances."; } - { assertion = versionOlder config.boot.kernelPackages.kernel.version "5.15"; - message = "ENA driver fails to build with kernel >= 5.15"; + { assertion = versionOlder config.boot.kernelPackages.kernel.version "5.17"; + message = "ENA driver fails to build with kernel >= 5.17"; } ]; - boot.kernelPackages = pkgs.linuxKernel.packages.linux_5_10; - boot.growPartition = cfg.hvm; fileSystems."/" = mkIf (!cfg.zfs.enable) {