summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Stefanović <stefanx2ovic@gmail.com>2019-04-20 15:37:13 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-27 16:35:09 +0200
commit71bd55cb2a946ae403ed19f2fe0656d1123f915b (patch)
tree6998931ffe32f7de6fa6778c9c52b443278407b2
parent66fca5041be01f5466a9afc618f66608b4484357 (diff)
downloadguix-patches-71bd55cb2a946ae403ed19f2fe0656d1123f915b.tar
guix-patches-71bd55cb2a946ae403ed19f2fe0656d1123f915b.tar.gz
gnu: Add x86-energy-perf-policy.
* gnu/packages/linux.scm (x86-energy-perf-policy): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/linux.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9cf4232914..a801e50392 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -34,6 +34,7 @@
;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4039,6 +4040,39 @@ Linux kernel to retrieve and control processor features related to power saving,
such as frequency and voltage scaling.")
(license license:gpl2)))
+(define-public x86-energy-perf-policy
+ (package
+ (name "x86-energy-perf-policy")
+ (version (package-version linux-libre))
+ (source (package-source linux-libre))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'enter-subdirectory
+ (lambda _
+ (chdir "tools/power/x86/x86_energy_perf_policy")
+ #t))
+ (delete 'configure)
+ (add-before 'build 'fix-makefile
+ (lambda _
+ (substitute* "Makefile" (("/usr") ""))
+ #t)))
+ #:make-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list (string-append "DESTDIR=" out)
+ (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (home-page (package-home-page linux-libre))
+ (synopsis "Display and update Intel-CPU energy-performance policy")
+ (description
+ "@command{x86_energy_perf_policy} displays and updates energy-performance
+policy settings specific to Intel Architecture Processors. Settings are
+accessed via Model Specific Register (MSR) updates, no matter if the Linux
+cpufreq sub-system is enabled or not.")
+ (license license:gpl2)))
+
(define-public haveged
(package
(name "haveged")