diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2025-07-10 10:33:01 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2025-07-10 10:36:38 +0300 |
commit | d2e03bf41495d317ab5ce557f1b4ccd01f6fb0fc (patch) | |
tree | 91ba107cdfadfc7c9aedb19311655a1964477ee9 | |
parent | 3adadd305172a5c37ba0de7d5e3c5f70302b6f77 (diff) |
gnu: libcpuid: Build on more architectures.
* gnu/packages/hardware.scm (libcpuid)[arguments]: When building for
armhf-linux or aarch64-linux adjust the 'absoultize phase to adjust the
dkms installation directory.
[inputs]: When building for armhf-linux or aarch64-linux add
linux-libre-headers.
[supported-systems]: Also allow armhf and aarch64 systems.
Change-Id: Idd24651da77129782461074caae9a3cc3dcaf351
-rw-r--r-- | gnu/packages/hardware.scm | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index c5b86dbb06..e9ac0dd9c1 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -1476,14 +1476,26 @@ management, attestation, encryption, and signing.") (substitute* '("libcpuid/rdmsr.c" "libcpuid/rdcpuid.c") (("modprobe") - (search-input-file inputs "/bin/modprobe"))))))))) + (search-input-file inputs "/bin/modprobe")))) + ;; TODO: Build kernel module. + (when (and #$(target-linux?) + #$(target-arm?)) + (substitute* "drivers/arm/linux/CMakeLists.txt" + (("/usr/src/") (string-append #$output "/src/"))))))))) (inputs - (if (target-linux?) - (list kmod) - '())) + (append + (if (target-linux?) + (list kmod) + '()) + (if (and (target-arm?) + (target-linux?)) + (list linux-libre-headers) + '()) + '())) (native-inputs (list python-3)) ;required by tests (supported-systems - (filter (lambda (t) (or (target-x86-64? t) (target-x86-32? t))) + (filter (lambda (t) (or (target-x86-64? t) (target-x86-32? t) + (target-aarch64? t) (target-arm32? t))) %supported-systems)) (home-page "https://libcpuid.sourceforge.net/") (synopsis "Small library for x86 CPU detection and feature extraction") |