mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
ryzen-smu: init at 0.1.5
A Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors. Contains monitor_cpu, a userspace tool for viewing info. Using fork of original to match ryzen_monitor_ng, a more advanced userspace tool for accessing the SMU via this kernel module, planned for a later commit.
This commit is contained in:
parent
9cd5f606b0
commit
cc0f056492
69
pkgs/os-specific/linux/ryzen-smu/default.nix
Normal file
69
pkgs/os-specific/linux/ryzen-smu/default.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, kernel
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.1.5-unstable-2024-01-03";
|
||||
|
||||
## Upstream has not been merging PRs.
|
||||
## Nixpkgs maintainers are providing a
|
||||
## repo with PRs merged until upstream is
|
||||
## updated.
|
||||
src = fetchFromGitHub {
|
||||
owner = "Cryolitia";
|
||||
repo = "ryzen_smu";
|
||||
rev = "ce1aa918efa33ca79998f0f7d467c04d4b07016c";
|
||||
hash = "sha256-s9SSmbL6ixWqZUKEhrZdxN4xoWgk+8ClZPoKq2FDAAE=";
|
||||
};
|
||||
|
||||
monitor-cpu = stdenv.mkDerivation {
|
||||
pname = "monitor-cpu";
|
||||
inherit version src;
|
||||
|
||||
makeFlags = [
|
||||
"-C userspace"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install userspace/monitor_cpu -Dm755 -t $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "ryzen-smu-${kernel.version}";
|
||||
inherit version src;
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
makeFlags = [
|
||||
"TARGET=${kernel.modDirVersion}"
|
||||
"KERNEL_BUILD=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install ryzen_smu.ko -Dm444 -t $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/ryzen_smu
|
||||
install ${monitor-cpu}/bin/monitor_cpu -Dm755 -t $out/bin
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Linux kernel driver that exposes access to the SMU (System Management Unit) for certain AMD Ryzen Processors";
|
||||
homepage = "https://gitlab.com/leogx9r/ryzen_smu";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ Cryolitia phdyellow ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "monitor_cpu";
|
||||
};
|
||||
}
|
|
@ -551,6 +551,8 @@ in {
|
|||
|
||||
ithc = callPackage ../os-specific/linux/ithc { };
|
||||
|
||||
ryzen-smu = callPackage ../os-specific/linux/ryzen-smu { };
|
||||
|
||||
zenpower = callPackage ../os-specific/linux/zenpower { };
|
||||
|
||||
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
|
||||
|
|
Loading…
Reference in a new issue