From c85f4dbdaaf2081b078f02a32ede52de7162e3bf Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 10 Dec 2021 23:40:02 +0100 Subject: [PATCH] [WIP] gnu: Add sof. * gnu/packages/firmware.scm (sof): New public variable. --- gnu/packages/firmware.scm | 57 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index aefc0a8b69..2f264b534e 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -29,6 +29,7 @@ (define-module (gnu packages firmware) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -41,7 +42,8 @@ (define-module (gnu packages firmware) #:use-module (gnu packages gcc) #:use-module (gnu packages linux) #:use-module (gnu packages perl) - #:use-module (gnu packages python)) + #:use-module (gnu packages python) + #:use-module (gnu packages tls)) (define-public ath9k-htc-firmware (package @@ -552,3 +554,56 @@ (define-public arm-trusted-firmware-rk3399 `(("cross32-gcc" ,(cross-gcc "arm-none-eabi")) ("cross32-binutils", (cross-binutils "arm-none-eabi")) ,@(package-native-inputs base)))))) + +(define-public sof + (package + (name "sof") + (version "1.9.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/thesofproject/sof") + (commit (string-append "v" version)) + ;; XXX Includes an ‘rimage’ submodule, whatever that is. + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0amia754j2qawpxk19yi18d3vhlj3yraqc41il4ndf5v04p5qhc4")))) + (build-system cmake-build-system) + (arguments + `(#:parallel-build? #f + #:configure-flags + (list "-DINIT_CONFIG=skylake_defconfig" ; XXX? + "-DTOOLCHAIN=extensa-elf"))) + (native-inputs + (let* ((target "xtensa-elf") + (xbinutils (cross-binutils target binutils-2.33)) + (xgcc (cross-gcc target #:xbinutils xbinutils)) + (xheaders (cross-kernel-headers target linux-libre-headers + xgcc xbinutils)) + (xlibc (cross-libc target glibc xgcc xbinutils xheaders))) + `(("binutils-cross-xtensa-elf" ,xbinutils) + ("gcc-cross-sans-libc-xtensa-elf" ,xgcc) + ("glibc-cross-xtensa-elf" ,xlibc) + ("openssl" ,openssl) + ("python-wrapper" ,python-wrapper)))) + (home-page "https://thesofproject.github.io") + (synopsis "Sound Open Firmware") + (description + "@acronym{SOF, Sound Open Firmware} is an audio @acronym{DSP, digital +signal processing} firmware infrastructure and @acronym{SDK, software +development kit}. It provides a framework where developers interested in audio +or signal processing on modern DSPs can create, test, and tune: + +[XXX Rewrite this for humanoids.] + +@enumerate +@item audio processing pipelines and topologies +@item audio processing components +@item DSP infrastructure and drivers +@item host operating system infrastructure and drivers. +@end enumerate\n") + (license (list license:bsd-3 + license:expat + license:isc)))) base-commit: 3d54f2415672aed64661bed84a043a7f0cee13dd prerequisite-patch-id: d67a63c338648539cfa7a08c90007d2e7abbb507 -- 2.34.0