summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-09-02 04:32:39 +0200
committerGuix Patches Tester <>2022-09-02 03:34:23 +0100
commit3a283191a77ee64c967130c36b056ccad4f7bbd5 (patch)
tree9cd3160031224c39088c281a29d7b1fb8a386b5d
parent4a5fbadb88ff18bb7de87b351c6009aaa398a892 (diff)
downloadguix-patches-3a283191a77ee64c967130c36b056ccad4f7bbd5.tar
guix-patches-3a283191a77ee64c967130c36b056ccad4f7bbd5.tar.gz
gnu: Add ec
* gnu/packages/linux.scm (ec): New variable.
-rw-r--r--gnu/packages/linux.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 01fb79bf08..e485ed6810 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1375,6 +1375,45 @@ battery charging thresholds, keyboard backlight, fans and thermal monitors,
and the notification, WiFi, and Bluetooth LED.")
(license license:gpl2)))
+(define-public ec
+ (package
+ (name "ec")
+ (version (package-version linux-libre))
+ (source (package-source linux-libre))
+ (build-system gnu-build-system)
+ (native-inputs (list coreutils))
+ (arguments
+ '(#:make-flags (list (string-append "DESTDIR="
+ (assoc-ref %outputs "out"))
+ "sbindir=/sbin")
+ #:phases (modify-phases %standard-phases
+ (delete 'configure) ;no configure script
+ (add-after 'unpack 'patch-Makefile
+ (lambda _
+ (substitute* "tools/power/acpi/Makefile.config"
+ (("/bin/true")
+ (which "true")))
+ (substitute* "tools/power/acpi/Makefile.config"
+ (("/usr/bin/install")
+ (which "install"))) #t))
+ (add-after 'patch-Makefile 'enter-subdirectory
+ (lambda _
+ (chdir "tools/power/acpi/tools/ec") #t)))
+ #:tests? #f)) ;no tests
+ (home-page (package-home-page linux-libre))
+ (synopsis
+ "Low level utility for reading or writing Embedded Controller registers")
+ (description
+ "This utility can read or write specific registers or all the
+available registers of the Embedded Controllers supported by the Linux
+kernel. To work it needs to run as root, to have the ec_sys driver
+loaded, and to have the debugfs filesystem mounted at
+/sys/kernel/debug/. To make write support work, the ec_sys module
+needs to be loaded with the write_support=1 parameter. Write support
+can also be enabled after loading the module with
+the 'echo 1 > /sys/module/ec_sys/parameters/write_support' command.")
+ (license license:gpl2)))
+
(define-public lkrg
(package
(name "lkrg")