From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mAn9HhLZs2FAcwEAgWs5BA (envelope-from ) for ; Fri, 10 Dec 2021 23:47:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8AfuGRLZs2HzDwAAbx9fmQ (envelope-from ) for ; Fri, 10 Dec 2021 22:47:46 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B17BB8564 for ; Fri, 10 Dec 2021 23:47:45 +0100 (CET) Received: from localhost ([::1]:34052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvog4-0000Ws-Su for larch@yhetil.org; Fri, 10 Dec 2021 17:47:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvofv-0000Wh-Hk for help-guix@gnu.org; Fri, 10 Dec 2021 17:47:35 -0500 Received: from [2a02:c205:2020:6054::1] (port=33828 helo=tobias.gr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvofs-00017U-K7 for help-guix@gnu.org; Fri, 10 Dec 2021 17:47:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=aBjdo+ZdGitnX EtUs6znTbDlqUvse0x2UUSNsKUWV3c=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=JS+uDC7hHerYfbSPQ0QuS3yRvexCLVPkLn6aEL urQsj1Y8Vlu6oY25wBvVb2IDHav4rqUDBkzqCIFrgnYRlyPjJC/Y5YQ4apaBXFjvqAw4XY k+nkUsCZXwmmuvfyLq3MNftw2hgEFyTKWl7lUcbVdR13+ckb4Jqmq56/nwrlY9TvjxJpmh //57cH736WomNwPhHuDgtI02TmVlKrEYJWVxPv5kfMCN/Y6LvFe7sdojhySzf7gb6r/5m5 wAO9YEG1fhDavBQMdOq176j8uEoDCsN/lqomo0jbP44d/M4xZTvbtKDXiOlqfHN8MdEstD 0M/4rM35bCss5WWYWTPMlauQ== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 8ca7a5eb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 10 Dec 2021 22:47:28 +0000 (UTC) References: From: Tobias Geerinckx-Rice To: Ry Pemberton Cc: help-guix@gnu.org Subject: Re: Regarding implementing sof-firmware in GUIX. Date: Fri, 10 Dec 2021 23:38:30 +0100 In-reply-to: BIMI-Selector: v=BIMI1; s=default; Message-ID: <87a6h83wlz.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:c205:2020:6054::1 (failed) Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639176466; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aBjdo+ZdGitnXEtUs6znTbDlqUvse0x2UUSNsKUWV3c=; b=f0nd22VmLG4knLEu+PGfJMQSPYplIUG2QZDULDYkh3wy0JxDdd5L/dSRekp9VbyPiu4rLL G0qHxxceOTNvaReMQZVM5jmRMtZUxvj2Z8LJA7BIwBuvlQi3Djxdq+1MHjEZFHxvZRvuJR 77lbJoahNzQ9PHSkayW6JR73UFW6sU/4nc6UrhOu+qGSEwkSbHJYHGKxmypsjPQDvzY/iE UQ3/IZ3utBwNGsUH1+lyfBQNiQE+zWZpvUpeZXhGMlSrDwuYG/9KclEinOnBqovKCAv+2l yem/mo1K8dUSG9whKmHBquBs9udaKfYTUaTee9JR8upT8qSbzdgToXbH2HYPrA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639176466; a=rsa-sha256; cv=none; b=CqVd0Z9cPHmsxGQt9Twg84sSqhfS6SS2ZbArASRwBj9JngeABPeWMBxjEC+eh3QXYZjSAl htFkGCm8pSNpHjnhBCw72qkK5lnMbvpazSbMC+hcDJcSr7i09B6988AN16rDvGNRzGrtjJ 9uNReiCQSCxiaM6S7CTeE7j+pHvjTR+TmBdmRyoUG9zL0CYD2eUNGPKQELZhU6F5+JtrAS XWuZJbhNIsvV3oBNfsgyYFUor6G0GwTJbmFQBrB5B0EYvE+gSASSOK8PjXUXFOE0wh7MPL 8+RBrmedpI1iOZ13e3Gfr20iBXaXaTHBljwfxSVmqxpB6eXiUNZemnWrEoDtxw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=tobias.gr header.s=2018 header.b=JS+uDC7h; dmarc=pass (policy=reject) header.from=tobias.gr; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.76 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tobias.gr header.s=2018 header.b=JS+uDC7h; dmarc=pass (policy=reject) header.from=tobias.gr; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B17BB8564 X-Spam-Score: -5.76 X-Migadu-Scanner: scn1.migadu.com X-TUID: saEcUSHH0ocn --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Ry, [PSA: It's just =E2=80=98[GNU] Guix=E2=80=99, never =E2=80=98GUIX=E2=80=99 = :-) I'm not sure why=20 the =E2=80=98GUIX=E2=80=99 meme appears to be picking up steam again as of = late=E2=80=A6] Ry Pemberton via =E5=86=99=E9=81=93=EF=BC=9A > I have an X1 Carbon (2021) that requires sof-firmware. It is=20 > libre > software, and I believe is included in the linux-libre kernel=20 > since > 5.2. Is there a way to get this firmware working on this laptop=20 > with > GNU GUIX? I tried to start a basic SOF package (attached), but quickly ran=20 into =E2=80=98The GNU C library is currently unavailable for this=20 platform.=E2=80=99 Without a cross-libc the build fails, looking for=20 , which AFAICT is provided (only) by libc. I've never cross-compiled firmware before so I don't know any next=20 steps. Of course, this being ostensibly libre software, we could package=20 prebuilt binaries[0] as I'm sure 99% of users actually use. It's=20 not a good option, and hardly Guixy, but not unprecedented. Kind regards, T G-R [0]: https://github.com/thesofproject/sof-bin/ --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-WIP-gnu-Add-sof.patch Content-Transfer-Encoding: quoted-printable From=20c85f4dbdaaf2081b078f02a32ede52de7162e3bf 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. =2D-- 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 =2D-- 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) =2D #:use-module (gnu packages python)) + #:use-module (gnu packages python) + #:use-module (gnu packages tls)) =20 (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 =E2=80=98rimage=E2=80=99 submodule, whatev= er 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=3Dskylake_defconfig" ; XXX? + "-DTOOLCHAIN=3Dextensa-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 =2D-=20 2.34.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYbPZKA0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15K1MBAOELGENtgeGHxqHhP8Q0dSIYWxjB5jHBNukXB0vV RYXdAQDgYaqdpLJotUCD9rwkS15TwXndmaXc3Zr8NlQkFOQnDA== =Q8ky -----END PGP SIGNATURE----- --==-=-=--