summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Griffin <a@ajgrf.com>2020-01-07 13:29:55 -0600
committerAlex Griffin <a@ajgrf.com>2020-01-08 09:42:31 -0600
commit663c4c3e6c57d6d15dc701c47876da2e48aed749 (patch)
tree1a48809529eb7e9842de9ddfc4e63ffdba08b584
parent304da1fffbb7a7b6efee14920a8076f08f3287ca (diff)
nongnu: Add amd-microcode.
* nongnu/packages/linux.scm (amd-microcode): New variable.
-rw-r--r--nongnu/packages/linux.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm
index c479324..33b904b 100644
--- a/nongnu/packages/linux.scm
+++ b/nongnu/packages/linux.scm
@@ -693,3 +693,32 @@ behavior as documented in the respective processor specification updates. The
@code{iucode-tool} package can be used to determine the appropriate file for
your CPU.")
(license (nonfree "file://license"))))
+
+(define-public amd-microcode
+ (package
+ (inherit linux-firmware)
+ (name "amd-microcode")
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:license-file-regexp "LICENSE.amd-ucode"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (fw-dir (string-append out "/lib/firmware"))
+ (bin-dir (string-append fw-dir "/amd-ucode")))
+ (for-each (lambda (file)
+ (install-file file bin-dir))
+ (find-files "amd-ucode" "^microcode_amd.*\\.bin$"))
+ #t)))
+ (delete 'validate-runpath))))
+ (synopsis "Processor microcode firmware for AMD CPUs")
+ (description "Updated system processor microcode for AMD x86-64
+processors. AMD releases microcode updates to correct processor behavior as
+documented in the respective processor revision guides.")
+ (license
+ (nonfree
+ (string-append "https://git.kernel.org/pub/scm/linux/kernel/git/"
+ "firmware/linux-firmware.git/plain/LICENSE.amd-ucode")))))