mstflint_access: init at 4.26

Add companion kernel module for mstflint, which is required
on some systems with secure boot enabled.

Link to corresponding mstflint version.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
This commit is contained in:
Markus Theil 2023-10-24 15:40:44 +02:00
parent 9ffa93bb4f
commit cc18755c08
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,40 @@
{ lib, stdenv, fetchurl, kernel, kmod, mstflint }:
stdenv.mkDerivation rec {
pname = "mstflint_access";
inherit (mstflint) version;
src = fetchurl {
url = "https://github.com/Mellanox/mstflint/releases/download/v${version}/kernel-mstflint-${version}.tar.gz";
hash = "sha256-rfZts0m8x6clVazpbAa2xK+dYgRU9Us5rbcWa0uHJ1M=";
};
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [
"KVER=${kernel.modDirVersion}"
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
];
enableParallelBuilding = true;
preConfigure = lib.optionals (lib.versionAtLeast kernel.version "6.4") ''
sed -i "s/class_create(THIS_MODULE, dev->name)/class_create(dev->name)/g" mst_main.c
'';
installPhase = ''
runHook preInstall
install -D ${pname}.ko $out/lib/modules/${kernel.modDirVersion}/extra/${pname}.ko
runHook postInstall
'';
meta = with lib; {
description = "A kernel module for Nvidia NIC firmware update";
homepage = "https://github.com/Mellanox/mstflint";
license = [ licenses.gpl2Only ];
maintainers = with maintainers; [ thillux ];
platforms = platforms.linux;
};
}

View File

@ -387,6 +387,8 @@ in {
lttng-modules = callPackage ../os-specific/linux/lttng-modules { };
mstflint_access = callPackage ../os-specific/linux/mstflint_access { };
broadcom_sta = callPackage ../os-specific/linux/broadcom-sta { };
tbs = callPackage ../os-specific/linux/tbs { };