From 7ab7b44a2c596de08c3c8a0fdec949032963b71c Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 31 Mar 2021 18:50:35 +0200 Subject: [PATCH] nongnu: Add sof-firmware. * nongnu/packages/linux.scm (sof-firmware): New variable. Signed-off-by: Jonathan Brielmaier --- nongnu/packages/linux.scm | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm index efa777b..4ac5ee3 100644 --- a/nongnu/packages/linux.scm +++ b/nongnu/packages/linux.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019 Timotej Lazar ;;; Copyright © 2020, 2021 James Smith ;;; Copyright © 2020, 2021 Jonathan Brielmaier +;;; Copyright © 2021 Mathieu Othacehe ;;; ;;; This program is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -785,3 +786,50 @@ documented in the respective processor revision guides.") (nonfree (string-append "https://git.kernel.org/pub/scm/linux/kernel/git/" "firmware/linux-firmware.git/plain/LICENSE.amd-ucode"))))) + +(define-public sof-firmware + (package + (name "sof-firmware") + (version "1.6.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/thesofproject/sof-bin") + (commit (string-append "stable-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zg5fki8skmmx84p4ws8x2m13bm13fb3kvlhz7zsnmdg6ra06az6")))) + (build-system copy-build-system) + (arguments + `(#:install-plan + (let* ((base + (string-append "lib/firmware/intel/sof/v" ,version)) + (dest "lib/firmware/intel/sof") + (tplg + (string-append "lib/firmware/intel/sof-tplg-v" ,version)) + (dest-tplg "lib/firmware/intel/sof-tplg") + (fw-file (lambda* (file #:optional subdir) + (list (string-append base "/" + (or subdir "") + file "-v" ,version ".ri") + (string-append dest "/" file ".ri")))) + (unsigned fw-file) + (intel-signed (lambda (file) + (fw-file file "intel-signed/")))) + (list (unsigned "sof-bdw") + (unsigned "sof-byt") + (unsigned "sof-cht") + (intel-signed "sof-apl") + (intel-signed "sof-cnl") + (intel-signed "sof-ehl") + (intel-signed "sof-icl") + (intel-signed "sof-tgl") + (list tplg dest-tplg))))) + (home-page "https://www.sofproject.org") + (synopsis "Sound Open Firmware") + (description "This package contains Linux firmwares and topology files for +audio DSPs that can be found on the Intel Skylake architecture. Those +firmware can be built for source but need to be signed by Intel in order to be +loaded by Linux.") + (license bsd-3)))