* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages @ 2023-03-04 14:44 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer ` (7 more replies) 0 siblings, 8 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:44 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer Hi Guix, this patch series adds some packages to run Guix on Apple silicon. They are loosely based on the offical PKGBUILDs [1] of the Asahi Linux project and the nixos-apple-silicon [2] packages. u-boot-apple-m1 is a modified version of u-boot from the Asahi Linux team, which is unlikely to be upstreamed from what I heard in the internet. m1n1 is the bootloader of the Asahi Linux project, which is placed on the EFI system partition under /boot/efi/m1n1/boot.bin by the Asahi Linux installer. For now this is only the package, but I think we also need a proper Guix bootloader for this. The final /boot/efi/m1n1/boot.bin should be concatenation of the m1n1.bin binary, the u-boot-apple-m1 binary and the Linux device trees. I'm not very familiar with how bootloaders work in Guix, but I believe on a system reconfigure 2 bootloaders should be installed on the EFI system partition, m1n1 itself and GRUB (I haven't tried extlinux yet). asahi-fwextract is a tool that extracts a manifest.txt file and 2 archives, firmware.cpio and firmware.tar from an archive which the Asahi Linux installer places under /boot/efi/asahi/all_firmware.tar.gz. The all_firmware.tar.gz file itself is extracted from the rescue partition of the MacOS installation when installing. This tool can be used by a user to create an installation or system image that includes the required firmware. asahi-mesa is the mesa package that includes the GPU driver and is not upstreamed yet. asahi-mesa-utils and asahi-mesa-headers are variants that use asahi-mesa. The next step would be to support building a Linux with Rust modules. I'm waiting for some patches from the Rust team to do this. Could you please review those patches? Thanks, Roman. [1] https://github.com/AsahiLinux/PKGBUILDs [2] https://github.com/tpwrules/nixos-apple-silicon Roman Scherer (7): gnu: Add asahi-fwextract. gnu: libdrm: Update to 2.4.114. gnu: Add asahi-mesa. gnu: Add asahi-mesa-headers. gnu: Add asahi-mesa-utils. gnu: Add m1n1. gnu: Add u-boot-apple-m1. gnu/packages/bootloaders.scm | 54 ++++++++++++++++++++++++ gnu/packages/firmware.scm | 35 ++++++++++++++++ gnu/packages/gl.scm | 79 ++++++++++++++++++++++++++++++++++++ gnu/packages/xdisorg.scm | 12 +++--- 4 files changed, 174 insertions(+), 6 deletions(-) -- 2.39.1 ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 1/7] gnu: Add m1n1. 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 2/7] gnu: Add u-boot-apple-m1 Roman Scherer ` (5 more replies) 2023-03-04 17:38 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Ricardo Wurmus ` (6 subsequent siblings) 7 siblings, 6 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: r0man From: r0man <roman@burningswell.com> * gnu/packages/bootloaders.scm (m1n1): New variable. --- gnu/packages/bootloaders.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ee47a9fad7..d02161ab1f 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -623,6 +623,38 @@ (define-public dtc tree binary files. These are board description files used by Linux and BSD.") (license license:gpl2+))) +(define-public m1n1 + (package + (name "m1n1") + (version "1.2.4") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/AsahiLinux/m1n1/archive/v" + version ".tar.gz")) + (sha256 + (base32 "1pymb7ip77z8md1pxqm3micq2yns1v6b97mayaa2q1s8sinv00jg")))) + (build-system gnu-build-system) + (supported-systems (list "aarch64-linux")) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "RELEASE" "1"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) + (mkdir-p dir) + (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) + ;; There are no tests + (delete 'check)))) + (home-page "https://github.com/AsahiLinux/m1n1") + (synopsis "Boot loader and experimentation playground for Apple Silicon") + (description "m1n1 is the bootloader developed by the Asahi Linux project to bridge +the Apple (XNU) boot ecosystem to the Linux boot ecosystem.") + (license license:expat))) + (define %u-boot-rockchip-inno-usb-patch ;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled. ;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 2/7] gnu: Add u-boot-apple-m1. 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 3/7] gnu: Add asahi-fwextract Roman Scherer ` (4 subsequent siblings) 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: r0man From: r0man <roman@burningswell.com> * gnu/packages/bootloaders.scm (u-boot-apple-m1): New variable. --- gnu/packages/bootloaders.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index d02161ab1f..bb2f5639bc 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1028,6 +1028,28 @@ (define-public u-boot-am335x-boneblack (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) +(define-public u-boot-apple-m1 + (let ((base (make-u-boot-package "apple_m1" "aarch64-linux-gnu"))) + (package + (inherit base) + (version "2022.10-1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/AsahiLinux/u-boot/archive/asahi-v" + version ".tar.gz")) + (sha256 + (base32 "02x90h89p1kv3d29mdhq22a88m68w4m1cwb45gj0rr85i2z8mqjq")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (delete 'disable-tools-libcrypto))))) + (native-inputs + `(("openssl" ,libressl) + ,@(package-native-inputs base)))))) + (define*-public (make-u-boot-sunxi64-package board triplet #:key defconfig configs) (let ((base (make-u-boot-package -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 3/7] gnu: Add asahi-fwextract. 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 2/7] gnu: Add u-boot-apple-m1 Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 4/7] gnu: libdrm: Update to 2.4.114 Roman Scherer ` (3 subsequent siblings) 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/firmware.scm (asahi-fwextract): New variable. --- gnu/packages/firmware.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index a876aa727a..3e3cfe96a9 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -34,6 +34,7 @@ (define-module (gnu packages firmware) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -77,6 +78,40 @@ (define-module (gnu packages firmware) #:use-module (gnu packages xml) #:use-module (ice-9 match)) +(define-public asahi-fwextract + (package + (name "asahi-fwextract") + (version "0.5.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/asahi-installer") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kj9ycy3f34fzm9bnirlcw9zm2sgipwrqzphdg5k099rbjbc7zmj")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-vendor + (lambda* (#:key outputs #:allow-other-keys) + (delete-file-recursively "vendor"))) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/asahi-fwextract") + `("LD_LIBRARY_PATH" ":" prefix + (,(string-append (assoc-ref inputs "lzfse") "/lib")))))))))) + (inputs (list lzfse)) + (home-page "https://github.com/AsahiLinux/asahi-installer") + (synopsis "Asahi Linux firmware extractor") + (description "The Asahi Linux firmware extractor transform the firmware archive +provided by the Asahi Linux installer into a manifest and CPIO and TAR +archives that are compatible with the Linux kernel.") + (license license:expat))) + (define-public ath9k-htc-firmware (package (name "ath9k-htc-firmware") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 4/7] gnu: libdrm: Update to 2.4.114. 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 2/7] gnu: Add u-boot-apple-m1 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 3/7] gnu: Add asahi-fwextract Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 5/7] gnu: Add asahi-mesa Roman Scherer ` (2 subsequent siblings) 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/xdisorg.scm (libdrm): Update to 2.4.114. --- gnu/packages/xdisorg.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ec5cdbdc28..77c88c9987 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -709,7 +709,7 @@ (define-public pixman (define-public libdrm (package (name "libdrm") - (version "2.4.107") + (version "2.4.114") (source (origin (method url-fetch) (uri (string-append @@ -717,16 +717,16 @@ (define-public libdrm version ".tar.xz")) (sha256 (base32 - "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65")))) + "09nhk3jx3qzggl5vyii3yh4zm0npjqsbxhzvxrg2xla77a2cyj9h")))) (build-system meson-build-system) (arguments `(#:configure-flags '(,@(match (%current-system) ((or "armhf-linux" "aarch64-linux") - '("-Dexynos=true" - "-Domap=true" - "-Detnaviv=true" - "-Dtegra=true" + '("-Dexynos=enabled" + "-Domap=enabled" + "-Detnaviv=enabled" + "-Dtegra=enabled" "-Dfreedreno-kgsl=true")) (_ '()))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 5/7] gnu: Add asahi-mesa. 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer ` (2 preceding siblings ...) 2023-03-04 14:46 ` [bug#61959] [PATCH 4/7] gnu: libdrm: Update to 2.4.114 Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 6/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 7/7] gnu: Add asahi-mesa-utils Roman Scherer 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa): New variable. --- gnu/packages/gl.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 4ae96032cd..fd4ae587b9 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -52,6 +52,7 @@ (define-module (gnu packages gl) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages xdisorg) @@ -612,6 +613,56 @@ (define-public mesa-utils ;; glxdemo is public domain; others expat. (license (list license:expat license:public-domain)))) +(define-public asahi-mesa + (package + (inherit mesa) + (name "asahi-mesa") + (version "20221229") + (source + (origin + (method url-fetch) + (uri (string-append "https://gitlab.freedesktop.org/asahi/mesa/-/archive/" + "asahi-" version "/mesa-asahi-" version ".tar.gz")) + (sha256 + (base32 "1gg0msrx2d2mgif4jqljns8nqf29nazqpxcxmjaa50yf50n6n05p")))) + (arguments + (substitute-keyword-arguments (package-arguments mesa) + ((#:configure-flags flags) + `(list "-Db_ndebug=true" + "-Db_lto=false" + "-Ddri3=enabled" + "-Degl=enabled" + "-Dgallium-drivers=swrast,virgl,kmsro,asahi" + "-Dgallium-extra-hud=true" + "-Dgallium-opencl=disabled" + "-Dgallium-rusticl=false" + "-Dgallium-va=disabled" + "-Dgallium-vdpau=disabled" + "-Dgallium-xa=disabled" + "-Dgbm=enabled" + "-Dgles1=disabled" + "-Dgles2=enabled" + "-Dglx=dri" + "-Dlibunwind=disabled" + "-Dllvm=enabled" + "-Dlmsensors=enabled" + "-Dmicrosoft-clc=disabled" + "-Dosmesa=true" + "-Dplatforms=x11,wayland" + "-Dshared-glapi=enabled" + "-Dvalgrind=enabled" + "-Dvulkan-drivers=swrast" + "-Dvulkan-layers=")))) + (inputs + `(("libdrm" ,libdrm) + ("libglvnd" ,libglvnd) + ("llvm" ,llvm-15) + ("lm-sensors" ,lm-sensors "lib") + ("openssl" ,libressl) + ("valgrind" ,valgrind) + ("wayland-protocols" ,wayland-protocols-next) + ,@(fold alist-delete (package-inputs mesa) + '("llvm" "wayland-protocols")))))) (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 6/7] gnu: Add asahi-mesa-headers. 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer ` (3 preceding siblings ...) 2023-03-04 14:46 ` [bug#61959] [PATCH 5/7] gnu: Add asahi-mesa Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 7/7] gnu: Add asahi-mesa-utils Roman Scherer 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-headers): New variable. --- gnu/packages/gl.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index fd4ae587b9..6a9dc41832 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -663,6 +663,19 @@ (define-public asahi-mesa ("wayland-protocols" ,wayland-protocols-next) ,@(fold alist-delete (package-inputs mesa) '("llvm" "wayland-protocols")))))) + +(define-public asahi-mesa-headers + (package/inherit mesa-headers + (name "asahi-mesa-headers") + (version "20221229") + (source + (origin + (method url-fetch) + (uri (string-append "https://gitlab.freedesktop.org/asahi/mesa/-/archive/" + "asahi-" version "/mesa-asahi-" version ".tar.gz")) + (sha256 + (base32 "1gg0msrx2d2mgif4jqljns8nqf29nazqpxcxmjaa50yf50n6n05p")))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 7/7] gnu: Add asahi-mesa-utils. 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer ` (4 preceding siblings ...) 2023-03-04 14:46 ` [bug#61959] [PATCH 6/7] gnu: Add asahi-mesa-headers Roman Scherer @ 2023-03-04 14:46 ` Roman Scherer 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-04 14:46 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-utils): New variable. --- gnu/packages/gl.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 6a9dc41832..e2cc11a711 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -676,6 +676,21 @@ (define-public asahi-mesa-headers (sha256 (base32 "1gg0msrx2d2mgif4jqljns8nqf29nazqpxcxmjaa50yf50n6n05p")))))) +(define-public asahi-mesa-utils + (package/inherit mesa-utils + (name "asahi-mesa-utils") + (version "8.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.mesa3d.org/demos/" version + "/mesa-demos-" version ".tar.bz2")) + (sha256 (base32 "1hdaf7pnh5h4f16pzrxqw3g5s37r5dkimsy46pv316phh05dz8nf")))) + (build-system meson-build-system) + (inputs + `(("mesa" ,asahi-mesa) + ,@(fold alist-delete (package-inputs mesa-utils) '("mesa")))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer @ 2023-03-04 17:38 ` Ricardo Wurmus 2023-03-05 10:53 ` Roman Scherer 2023-03-04 19:42 ` Winter via Guix-patches via ` (5 subsequent siblings) 7 siblings, 1 reply; 38+ messages in thread From: Ricardo Wurmus @ 2023-03-04 17:38 UTC (permalink / raw) To: 61959; +Cc: roman Thank you for the patches. Here a couple of comments: * Please do not use Github archive URLs like "https://github.com/AsahiLinux/m1n1/archive/v….tar.gz". These are automatically generated and have changed in the past, leading to different hashes. In the interest of reproducibility please use “git-fetch” with plain commit hashes instead. * Please use G-expressions instead of simple quoting with (assoc-ref outputs "out"). Instead of this: --8<---------------cut here---------------start------------->8--- (arguments `(#:phases (modify-phases %standard-phases (replace 'configure (lambda _ (setenv "RELEASE" "1"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) (mkdir-p dir) (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) ;; There are no tests (delete 'check)))) --8<---------------cut here---------------end--------------->8--- Please do this: --8<---------------cut here---------------start------------->8--- (arguments (list ;; There are no tests #:tests? #false #:phases #~(modify-phases %standard-phases (replace 'configure (lambda _ (setenv "RELEASE" "1"))) (replace 'install (lambda _ (let ((dir (string-append #$output "/libexec/"))) (mkdir-p dir) (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin")))))))) --8<---------------cut here---------------end--------------->8--- This also applies to “asahi-fwextract”. * The string labels for inputs are a deprecated style. Please use plain lists of package variables. If you want to modify an inherited list of inputs such as in “asahi-mesa” please use “modify-inputs”. * In “asahi-fwextract” the build phase “'remove-vendor” should be a source snippet instead. * Please use pyproject-build-system instead of python-build-system. The pyproject-build-system is going to be the default in the future, and it would be good to use it already to address any incompatibilities early. Could you please send a new version of this patch set? Thanks again! -- Ricardo ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-04 17:38 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Ricardo Wurmus @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 11:15 ` Roman Scherer 0 siblings, 1 reply; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: 61959 [-- Attachment #1: Type: text/plain, Size: 2667 bytes --] Hi Ricardo, I updated the patch series and sent v2 of it. Thanks for your review! Roman Ricardo Wurmus <rekado@elephly.net> writes: > Thank you for the patches. > > Here a couple of comments: > > * Please do not use Github archive URLs like > "https://github.com/AsahiLinux/m1n1/archive/v….tar.gz". These are > automatically generated and have changed in the past, leading to > different hashes. In the interest of reproducibility please use > “git-fetch” with plain commit hashes instead. > > * Please use G-expressions instead of simple quoting with (assoc-ref > outputs "out"). Instead of this: > > --8<---------------cut here---------------start------------->8--- > (arguments > `(#:phases > (modify-phases %standard-phases > (replace 'configure > (lambda _ > (setenv "RELEASE" "1"))) > (replace 'install > (lambda* (#:key outputs #:allow-other-keys) > (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) > (mkdir-p dir) > (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) > ;; There are no tests > (delete 'check)))) > --8<---------------cut here---------------end--------------->8--- > > > Please do this: > > --8<---------------cut here---------------start------------->8--- > (arguments > (list > ;; There are no tests > #:tests? #false > #:phases > #~(modify-phases %standard-phases > (replace 'configure > (lambda _ > (setenv "RELEASE" "1"))) > (replace 'install > (lambda _ > (let ((dir (string-append #$output "/libexec/"))) > (mkdir-p dir) > (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin")))))))) > --8<---------------cut here---------------end--------------->8--- > > This also applies to “asahi-fwextract”. > > * The string labels for inputs are a deprecated style. Please use plain > lists of package variables. If you want to modify an inherited list > of inputs such as in “asahi-mesa” please use “modify-inputs”. > > * In “asahi-fwextract” the build phase “'remove-vendor” should be a > source snippet instead. > > * Please use pyproject-build-system instead of python-build-system. The > pyproject-build-system is going to be the default in the future, and > it would be good to use it already to address any incompatibilities > early. > > Could you please send a new version of this patch set? Thanks again! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-05 10:53 ` Roman Scherer @ 2023-03-05 11:15 ` Roman Scherer 0 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 11:15 UTC (permalink / raw) To: Ricardo Wurmus; +Cc: 61959, winter [-- Attachment #1: Type: text/plain, Size: 6552 bytes --] Hi Ricardo & Winter, I didn't receive Winter's email and just saw it in the web interface after I sent v2 of the patch series. Should I be subscribed to the whole guix-patches mailing list as well to receive them? I'm new to the email based workflow and sometimes still a bit lost. I will address the feedback I got from Winter and send a v3. @Winter, I will address your comments. You are right about the order of libdrm, it should come before mesa-asahi. > The next step would be to support building a Linux with Rust > modules. I'm waiting for some patches from the Rust team to do this. About this next step. The Asahi Linux team has a version of the Linux kernel that contains a GPU kernel module written in Rust. To build this module I used customize-linux and added the rust and the rust-bindgen-cli packages to its native inputs. This is what I currently did: ``` (define (make-asahi-linux name config) (let* ((version "6.2-rc3-6") (base (customize-linux #:linux linux-libre-arm64-generic #:name name #:source (origin (method url-fetch) (uri (string-append "https://github.com/AsahiLinux/linux/archive/" "asahi-" version ".tar.gz")) (sha256 (base32 "0bk4grzcizk48hhalyyaa4alk5069z102vx5ddw12jfqzsrdfccn")))))) (package (inherit base) (version version) (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases '%standard-phases) #~(modify-phases #$phases (add-before 'configure 'configure-rust (lambda* (#:key inputs #:allow-other-keys) (setenv "LIBCLANG_PATH" (string-append (assoc-ref inputs "clang") "/lib")) (setenv "RUST_LIB_SRC" (string-append (assoc-ref inputs "rust-src") "/lib/rustlib/src/rust/library")))) (replace 'configure (lambda* (#:key inputs #:allow-other-keys) (copy-file #$config ".config") (chmod ".config" #o644))))))) (native-inputs `(("clang" ,clang) ("llvm" ,llvm) ("python" ,python) ("rust" ,(replace-jemalloc (@@ (gnu packages rust) rust-1.62))) ("rust-bindgen-cli" ,(replace-jemalloc rust-bindgen-cli)) ("rust-src" ,rust-src-1.62) ("zstd" ,zstd) ,@(package-native-inputs base))) (home-page "https://asahilinux.org") (synopsis "Linux on Apple Silicon") (description "Asahi Linux is a project and community with the goal of porting Linux to Apple Silicon Macs, starting with the 2020 M1 Mac Mini, MacBook Air, and MacBook Pro.")))) (define-public asahi-linux (make-asahi-linux "asahi-linux" (local-file "kernel.config"))) (define-public asahi-linux-edge (make-asahi-linux "asahi-linux-edge" (local-file "kernel.edge.config"))) ``` However, rust-bindgen-cli isn't yet packaged, and the version I used previously (0.59.2) somehow disappeared from crates.io. They now only have versions > 0.61.0 available, which I plan to package. The rust team is updating many packages at the moment, so my plan was to wait until those made it into the main branch. I think the differences of package/inherit vs (inherit) aren't very clear to me. I'm guess I should use package/inherit to be able to use input transformations. Is that correct? Roman Roman Scherer <roman.scherer@burningswell.com> writes: > [[PGP Signed Part:Undecided]] > > Hi Ricardo, > > I updated the patch series and sent v2 of it. > > Thanks for your review! > > Roman > > Ricardo Wurmus <rekado@elephly.net> writes: > >> Thank you for the patches. >> >> Here a couple of comments: >> >> * Please do not use Github archive URLs like >> "https://github.com/AsahiLinux/m1n1/archive/v….tar.gz". These are >> automatically generated and have changed in the past, leading to >> different hashes. In the interest of reproducibility please use >> “git-fetch” with plain commit hashes instead. >> >> * Please use G-expressions instead of simple quoting with (assoc-ref >> outputs "out"). Instead of this: >> >> --8<---------------cut here---------------start------------->8--- >> (arguments >> `(#:phases >> (modify-phases %standard-phases >> (replace 'configure >> (lambda _ >> (setenv "RELEASE" "1"))) >> (replace 'install >> (lambda* (#:key outputs #:allow-other-keys) >> (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) >> (mkdir-p dir) >> (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) >> ;; There are no tests >> (delete 'check)))) >> --8<---------------cut here---------------end--------------->8--- >> >> >> Please do this: >> >> --8<---------------cut here---------------start------------->8--- >> (arguments >> (list >> ;; There are no tests >> #:tests? #false >> #:phases >> #~(modify-phases %standard-phases >> (replace 'configure >> (lambda _ >> (setenv "RELEASE" "1"))) >> (replace 'install >> (lambda _ >> (let ((dir (string-append #$output "/libexec/"))) >> (mkdir-p dir) >> (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin")))))))) >> --8<---------------cut here---------------end--------------->8--- >> >> This also applies to “asahi-fwextract”. >> >> * The string labels for inputs are a deprecated style. Please use plain >> lists of package variables. If you want to modify an inherited list >> of inputs such as in “asahi-mesa” please use “modify-inputs”. >> >> * In “asahi-fwextract” the build phase “'remove-vendor” should be a >> source snippet instead. >> >> * Please use pyproject-build-system instead of python-build-system. The >> pyproject-build-system is going to be the default in the future, and >> it would be good to use it already to address any incompatibilities >> early. >> >> Could you please send a new version of this patch set? Thanks again! > > [[End of PGP Signed Part]] [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer 2023-03-04 17:38 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Ricardo Wurmus @ 2023-03-04 19:42 ` Winter via Guix-patches via 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer ` (4 subsequent siblings) 7 siblings, 0 replies; 38+ messages in thread From: Winter via Guix-patches via @ 2023-03-04 19:42 UTC (permalink / raw) To: 61959 Hi Roman, Thanks for the patches! I was going to work on getting Guix System running on Apple silicon machines at some point, glad more people are interested. > The next step would be to support building a Linux with Rust modules. I'm waiting for some patches from the Rust team to do this. Can you explain more what you mean by this? > gnu: libdrm: Update to 2.4.114. Is this updated version required by asahi-mesa? If so, it may be best to order it before adding asahi-mesa. (Also, I'm sure someone can correct me if this is a bad suggestion, but maybe mention changing the 'true's to 'enabled' in the configure flags in the change log, plus maybe why (e.g. is it deprecated in this release?)) > Please do not use Github archive URLs... I believe this also applies to GitLab's too, so please make sure you change it for 'asahi-mesa' and 'asahi-mesa-headers' as well. (Speaking of, is there a reason you use 'package/inherit' for 'u-boot-apple-m1' and 'asahi-mesa', but not 'asahi-mesa-headers' and 'asahi-mesa-utils'? I understand the difference between them (mostly), but not why you'd want to only do it for those packages.) Thanks, Winter ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 1/7] gnu: Add m1n1. 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer ` (2 preceding siblings ...) 2023-03-04 19:42 ` Winter via Guix-patches via @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 2/7] gnu: Add u-boot-apple-m1 Roman Scherer ` (5 more replies) 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer ` (3 subsequent siblings) 7 siblings, 6 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/bootloaders.scm (m1n1): New variable. --- gnu/packages/bootloaders.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ee47a9fad7..aa2fcc03dd 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -623,6 +623,42 @@ (define-public dtc tree binary files. These are board description files used by Linux and BSD.") (license license:gpl2+))) +(define-public m1n1 + (let ((commit "46f2811351806aafb3d56e02c107f95ac2ea85e3")) + (package + (name "m1n1") + (version (git-version "1.2.4" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/m1n1") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14chrqbs57v6i5vmf643svbi3s7h4fxrxly0bby7brf3w114nmpk")))) + (build-system gnu-build-system) + (supported-systems (list "aarch64-linux")) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "RELEASE" "1"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) + (mkdir-p dir) + (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) + ;; There are no tests + (delete 'check)))) + (home-page "https://github.com/AsahiLinux/m1n1") + (synopsis "Boot loader and experimentation playground for Apple Silicon") + (description "m1n1 is the bootloader developed by the Asahi Linux project to bridge +the Apple (XNU) boot ecosystem to the Linux boot ecosystem.") + (license license:expat)))) + (define %u-boot-rockchip-inno-usb-patch ;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled. ;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 base-commit: 1b07f397dc17e31ad55b80a4efd34fdcb5b3c690 -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 2/7] gnu: Add u-boot-apple-m1. 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 3/7] gnu: libdrm: Update to 2.4.114 Roman Scherer ` (4 subsequent siblings) 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/bootloaders.scm (u-boot-apple-m1): New variable. --- gnu/packages/bootloaders.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index aa2fcc03dd..af9576467d 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1032,6 +1032,30 @@ (define-public u-boot-am335x-boneblack (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) +(define-public u-boot-apple-m1 + (let ((base (make-u-boot-package "apple_m1" "aarch64-linux-gnu")) + (commit "54409548c3aa8cf4820f1bda69a26bb603a0a5a4")) + (package + (inherit base) + (version (git-version "2022.10-1" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/u-boot") + (commit commit))) + (file-name (git-file-name (package-name base) version)) + (sha256 + (base32 "1m1w6ajzsfpb59abncz3sa9b1waqjsnh2vm7js2n22xiw4km7nzx")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (delete 'disable-tools-libcrypto))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (prepend libressl)))))) + (define*-public (make-u-boot-sunxi64-package board triplet #:key defconfig configs) (let ((base (make-u-boot-package -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 3/7] gnu: libdrm: Update to 2.4.114. 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 2/7] gnu: Add u-boot-apple-m1 Roman Scherer @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 4/7] gnu: Add asahi-fwextract Roman Scherer ` (3 subsequent siblings) 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/xdisorg.scm (libdrm): Update to 2.4.114. --- gnu/packages/xdisorg.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ec5cdbdc28..77c88c9987 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -709,7 +709,7 @@ (define-public pixman (define-public libdrm (package (name "libdrm") - (version "2.4.107") + (version "2.4.114") (source (origin (method url-fetch) (uri (string-append @@ -717,16 +717,16 @@ (define-public libdrm version ".tar.xz")) (sha256 (base32 - "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65")))) + "09nhk3jx3qzggl5vyii3yh4zm0npjqsbxhzvxrg2xla77a2cyj9h")))) (build-system meson-build-system) (arguments `(#:configure-flags '(,@(match (%current-system) ((or "armhf-linux" "aarch64-linux") - '("-Dexynos=true" - "-Domap=true" - "-Detnaviv=true" - "-Dtegra=true" + '("-Dexynos=enabled" + "-Domap=enabled" + "-Detnaviv=enabled" + "-Dtegra=enabled" "-Dfreedreno-kgsl=true")) (_ '()))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 4/7] gnu: Add asahi-fwextract. 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 2/7] gnu: Add u-boot-apple-m1 Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 3/7] gnu: libdrm: Update to 2.4.114 Roman Scherer @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 5/7] gnu: Add asahi-mesa Roman Scherer ` (2 subsequent siblings) 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/firmware.scm (asahi-fwextract): New variable. --- gnu/packages/firmware.scm | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index a876aa727a..0d52349240 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -34,6 +34,7 @@ (define-module (gnu packages firmware) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -77,6 +78,47 @@ (define-module (gnu packages firmware) #:use-module (gnu packages xml) #:use-module (ice-9 match)) +(define-public asahi-fwextract + (let ((commit "0ac64c9ce1c460f4576162a82d239d7e8688a79e")) + (package + (name "asahi-fwextract") + (version (git-version "0.5.3" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/asahi-installer") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kj9ycy3f34fzm9bnirlcw9zm2sgipwrqzphdg5k099rbjbc7zmj")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "vendor") + (with-output-to-file "entry_points.txt" + (lambda () + (format #t "[console_scripts]\n") + (format #t "asahi-fwextract = asahi_firmware.update:main"))))))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'create-entrypoints 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/asahi-fwextract") + `("LD_LIBRARY_PATH" ":" prefix + (,(string-append (assoc-ref inputs "lzfse") "/lib")))))))))) + (inputs (list lzfse)) + (home-page "https://github.com/AsahiLinux/asahi-installer") + (synopsis "Asahi Linux firmware extractor") + (description "The Asahi Linux firmware extractor transform the firmware archive +provided by the Asahi Linux installer into a manifest and CPIO and TAR +archives that are compatible with the Linux kernel.") + (license license:expat)))) + (define-public ath9k-htc-firmware (package (name "ath9k-htc-firmware") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 5/7] gnu: Add asahi-mesa. 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer ` (2 preceding siblings ...) 2023-03-05 10:53 ` [bug#61959] [PATCH v2 4/7] gnu: Add asahi-fwextract Roman Scherer @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 6/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 7/7] gnu: Add asahi-mesa-utils Roman Scherer 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa): New variable. --- gnu/packages/gl.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 4ae96032cd..a2f55a2865 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -52,6 +52,7 @@ (define-module (gnu packages gl) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages xdisorg) @@ -612,6 +613,55 @@ (define-public mesa-utils ;; glxdemo is public domain; others expat. (license (list license:expat license:public-domain)))) +(define-public asahi-mesa + (let ((commit "0a12b60a6b4363315ca3789e7e289240704a26da")) + (package + (inherit mesa) + (name "asahi-mesa") + (version (git-version "20221229" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/asahi/mesa") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0yjn55qy4890gi1s3dhzdhqqxrms4fzcibqr84a3vcc53ggiywmb")))) + (arguments + (substitute-keyword-arguments (package-arguments mesa) + ((#:configure-flags flags) + `(list "-Db_ndebug=true" + "-Db_lto=false" + "-Ddri3=enabled" + "-Degl=enabled" + "-Dgallium-drivers=swrast,virgl,kmsro,asahi" + "-Dgallium-extra-hud=true" + "-Dgallium-opencl=disabled" + "-Dgallium-rusticl=false" + "-Dgallium-va=disabled" + "-Dgallium-vdpau=disabled" + "-Dgallium-xa=disabled" + "-Dgbm=enabled" + "-Dgles1=disabled" + "-Dgles2=enabled" + "-Dglx=dri" + "-Dlibunwind=disabled" + "-Dllvm=enabled" + "-Dlmsensors=enabled" + "-Dmicrosoft-clc=disabled" + "-Dosmesa=true" + "-Dplatforms=x11,wayland" + "-Dshared-glapi=enabled" + "-Dvalgrind=enabled" + "-Dvulkan-drivers=swrast" + "-Dvulkan-layers=")))) + (inputs + (modify-inputs (package-inputs mesa) + (prepend `(,lm-sensors "lib") libglvnd libressl valgrind) + (replace "llvm" llvm-15) + (replace "wayland-protocols" wayland-protocols-next)))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 6/7] gnu: Add asahi-mesa-headers. 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer ` (3 preceding siblings ...) 2023-03-05 10:53 ` [bug#61959] [PATCH v2 5/7] gnu: Add asahi-mesa Roman Scherer @ 2023-03-05 10:53 ` Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 7/7] gnu: Add asahi-mesa-utils Roman Scherer 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-headers): New variable. --- gnu/packages/gl.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index a2f55a2865..c2e9d26ce2 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -662,6 +662,12 @@ (define-public asahi-mesa (replace "llvm" llvm-15) (replace "wayland-protocols" wayland-protocols-next)))))) +(define-public asahi-mesa-headers + (package/inherit mesa-headers + (name "asahi-mesa-headers") + (version (package-version asahi-mesa)) + (source (package-source asahi-mesa)))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v2 7/7] gnu: Add asahi-mesa-utils. 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer ` (4 preceding siblings ...) 2023-03-05 10:53 ` [bug#61959] [PATCH v2 6/7] gnu: Add asahi-mesa-headers Roman Scherer @ 2023-03-05 10:53 ` Roman Scherer 5 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 10:53 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-utils): New variable. --- gnu/packages/gl.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index c2e9d26ce2..5555f4f39a 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -668,6 +668,21 @@ (define-public asahi-mesa-headers (version (package-version asahi-mesa)) (source (package-source asahi-mesa)))) +(define-public asahi-mesa-utils + (package/inherit mesa-utils + (name "asahi-mesa-utils") + (version "8.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.mesa3d.org/demos/" version + "/mesa-demos-" version ".tar.bz2")) + (sha256 (base32 "1hdaf7pnh5h4f16pzrxqw3g5s37r5dkimsy46pv316phh05dz8nf")))) + (build-system meson-build-system) + (inputs + (modify-inputs (package-inputs mesa-utils) + (replace "mesa" asahi-mesa))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer ` (3 preceding siblings ...) 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer @ 2023-03-05 16:13 ` Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 1/7] gnu: Add m1n1 Roman Scherer ` (6 more replies) 2023-03-05 23:43 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Denis 'GNUtoo' Carikli ` (2 subsequent siblings) 7 siblings, 7 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer Hi Ricardo & Winter, here's a 3rd version of the patch series: - I changed the commit message of libdrm to mention the renamed options - I'm using now Git and a pinned commit to fetch the sources from Github and Gitlab - I'm now using package/inherit in all packages I'm not sure about the ordering of libdrm. I saw the mails are not ordered by patch number on the web interface. But looking at my Git history, and the patch number in the subject line, libdrm ([PATCH 4/7] gnu: libdrm: Update to 2.4.114) is updated before adding asahi-mesa ([PATCH 5/7] gnu: Add asahi-mesa). So, aren't they in the correct order? Roman Roman Scherer (7): gnu: Add m1n1. gnu: Add u-boot-apple-m1. gnu: libdrm: Update to 2.4.114 and adjust renamed options. gnu: Add asahi-fwextract. gnu: Add asahi-mesa. gnu: Add asahi-mesa-headers. gnu: Add asahi-mesa-utils. gnu/packages/bootloaders.scm | 59 ++++++++++++++++++++++++++++++ gnu/packages/firmware.scm | 42 ++++++++++++++++++++++ gnu/packages/gl.scm | 70 ++++++++++++++++++++++++++++++++++++ gnu/packages/xdisorg.scm | 12 +++---- 4 files changed, 177 insertions(+), 6 deletions(-) -- 2.39.1 ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 1/7] gnu: Add m1n1. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer @ 2023-03-05 16:13 ` Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 2/7] gnu: Add u-boot-apple-m1 Roman Scherer ` (5 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/bootloaders.scm (m1n1): New variable. --- gnu/packages/bootloaders.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ee47a9fad7..aa2fcc03dd 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -623,6 +623,42 @@ (define-public dtc tree binary files. These are board description files used by Linux and BSD.") (license license:gpl2+))) +(define-public m1n1 + (let ((commit "46f2811351806aafb3d56e02c107f95ac2ea85e3")) + (package + (name "m1n1") + (version (git-version "1.2.4" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/m1n1") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14chrqbs57v6i5vmf643svbi3s7h4fxrxly0bby7brf3w114nmpk")))) + (build-system gnu-build-system) + (supported-systems (list "aarch64-linux")) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "RELEASE" "1"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) + (mkdir-p dir) + (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) + ;; There are no tests + (delete 'check)))) + (home-page "https://github.com/AsahiLinux/m1n1") + (synopsis "Boot loader and experimentation playground for Apple Silicon") + (description "m1n1 is the bootloader developed by the Asahi Linux project to bridge +the Apple (XNU) boot ecosystem to the Linux boot ecosystem.") + (license license:expat)))) + (define %u-boot-rockchip-inno-usb-patch ;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled. ;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 2/7] gnu: Add u-boot-apple-m1. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 1/7] gnu: Add m1n1 Roman Scherer @ 2023-03-05 16:13 ` Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options Roman Scherer ` (4 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/bootloaders.scm (u-boot-apple-m1): New variable. --- gnu/packages/bootloaders.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index aa2fcc03dd..fc4ce4d908 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1032,6 +1032,29 @@ (define-public u-boot-am335x-boneblack (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) +(define-public u-boot-apple-m1 + (let ((base (make-u-boot-package "apple_m1" "aarch64-linux-gnu")) + (commit "54409548c3aa8cf4820f1bda69a26bb603a0a5a4")) + (package/inherit base + (version (git-version "2022.10-1" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/u-boot") + (commit commit))) + (file-name (git-file-name (package-name base) version)) + (sha256 + (base32 "1m1w6ajzsfpb59abncz3sa9b1waqjsnh2vm7js2n22xiw4km7nzx")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (delete 'disable-tools-libcrypto))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (prepend libressl)))))) + (define*-public (make-u-boot-sunxi64-package board triplet #:key defconfig configs) (let ((base (make-u-boot-package -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 1/7] gnu: Add m1n1 Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 2/7] gnu: Add u-boot-apple-m1 Roman Scherer @ 2023-03-05 16:13 ` Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 4/7] gnu: Add asahi-fwextract Roman Scherer ` (3 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/xdisorg.scm (libdrm): Update to 2.4.114 and adjust renamed options. --- gnu/packages/xdisorg.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ec5cdbdc28..77c88c9987 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -709,7 +709,7 @@ (define-public pixman (define-public libdrm (package (name "libdrm") - (version "2.4.107") + (version "2.4.114") (source (origin (method url-fetch) (uri (string-append @@ -717,16 +717,16 @@ (define-public libdrm version ".tar.xz")) (sha256 (base32 - "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65")))) + "09nhk3jx3qzggl5vyii3yh4zm0npjqsbxhzvxrg2xla77a2cyj9h")))) (build-system meson-build-system) (arguments `(#:configure-flags '(,@(match (%current-system) ((or "armhf-linux" "aarch64-linux") - '("-Dexynos=true" - "-Domap=true" - "-Detnaviv=true" - "-Dtegra=true" + '("-Dexynos=enabled" + "-Domap=enabled" + "-Detnaviv=enabled" + "-Dtegra=enabled" "-Dfreedreno-kgsl=true")) (_ '()))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 4/7] gnu: Add asahi-fwextract. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer ` (2 preceding siblings ...) 2023-03-05 16:13 ` [bug#61959] [PATCH v3 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options Roman Scherer @ 2023-03-05 16:14 ` Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 5/7] gnu: Add asahi-mesa Roman Scherer ` (2 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:14 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/firmware.scm (asahi-fwextract): New variable. --- gnu/packages/firmware.scm | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index a876aa727a..0d52349240 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -34,6 +34,7 @@ (define-module (gnu packages firmware) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -77,6 +78,47 @@ (define-module (gnu packages firmware) #:use-module (gnu packages xml) #:use-module (ice-9 match)) +(define-public asahi-fwextract + (let ((commit "0ac64c9ce1c460f4576162a82d239d7e8688a79e")) + (package + (name "asahi-fwextract") + (version (git-version "0.5.3" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/asahi-installer") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kj9ycy3f34fzm9bnirlcw9zm2sgipwrqzphdg5k099rbjbc7zmj")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "vendor") + (with-output-to-file "entry_points.txt" + (lambda () + (format #t "[console_scripts]\n") + (format #t "asahi-fwextract = asahi_firmware.update:main"))))))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'create-entrypoints 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/asahi-fwextract") + `("LD_LIBRARY_PATH" ":" prefix + (,(string-append (assoc-ref inputs "lzfse") "/lib")))))))))) + (inputs (list lzfse)) + (home-page "https://github.com/AsahiLinux/asahi-installer") + (synopsis "Asahi Linux firmware extractor") + (description "The Asahi Linux firmware extractor transform the firmware archive +provided by the Asahi Linux installer into a manifest and CPIO and TAR +archives that are compatible with the Linux kernel.") + (license license:expat)))) + (define-public ath9k-htc-firmware (package (name "ath9k-htc-firmware") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 5/7] gnu: Add asahi-mesa. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer ` (3 preceding siblings ...) 2023-03-05 16:14 ` [bug#61959] [PATCH v3 4/7] gnu: Add asahi-fwextract Roman Scherer @ 2023-03-05 16:14 ` Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 6/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 7/7] gnu: Add asahi-mesa-utils Roman Scherer 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:14 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa): New variable. --- gnu/packages/gl.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 4ae96032cd..3b3985df71 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -52,6 +52,7 @@ (define-module (gnu packages gl) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages xdisorg) @@ -612,6 +613,54 @@ (define-public mesa-utils ;; glxdemo is public domain; others expat. (license (list license:expat license:public-domain)))) +(define-public asahi-mesa + (let ((commit "0a12b60a6b4363315ca3789e7e289240704a26da")) + (package/inherit mesa + (name "asahi-mesa") + (version (git-version "20221229" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/asahi/mesa") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0yjn55qy4890gi1s3dhzdhqqxrms4fzcibqr84a3vcc53ggiywmb")))) + (arguments + (substitute-keyword-arguments (package-arguments mesa) + ((#:configure-flags flags) + `(list "-Db_ndebug=true" + "-Db_lto=false" + "-Ddri3=enabled" + "-Degl=enabled" + "-Dgallium-drivers=swrast,virgl,kmsro,asahi" + "-Dgallium-extra-hud=true" + "-Dgallium-opencl=disabled" + "-Dgallium-rusticl=false" + "-Dgallium-va=disabled" + "-Dgallium-vdpau=disabled" + "-Dgallium-xa=disabled" + "-Dgbm=enabled" + "-Dgles1=disabled" + "-Dgles2=enabled" + "-Dglx=dri" + "-Dlibunwind=disabled" + "-Dllvm=enabled" + "-Dlmsensors=enabled" + "-Dmicrosoft-clc=disabled" + "-Dosmesa=true" + "-Dplatforms=x11,wayland" + "-Dshared-glapi=enabled" + "-Dvalgrind=enabled" + "-Dvulkan-drivers=swrast" + "-Dvulkan-layers=")))) + (inputs + (modify-inputs (package-inputs mesa) + (prepend `(,lm-sensors "lib") libglvnd libressl valgrind) + (replace "llvm" llvm-15) + (replace "wayland-protocols" wayland-protocols-next)))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 6/7] gnu: Add asahi-mesa-headers. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer ` (4 preceding siblings ...) 2023-03-05 16:14 ` [bug#61959] [PATCH v3 5/7] gnu: Add asahi-mesa Roman Scherer @ 2023-03-05 16:14 ` Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 7/7] gnu: Add asahi-mesa-utils Roman Scherer 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:14 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-headers): New variable. --- gnu/packages/gl.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 3b3985df71..490b1051d2 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -661,6 +661,12 @@ (define-public asahi-mesa (replace "llvm" llvm-15) (replace "wayland-protocols" wayland-protocols-next)))))) +(define-public asahi-mesa-headers + (package/inherit mesa-headers + (name "asahi-mesa-headers") + (version (package-version asahi-mesa)) + (source (package-source asahi-mesa)))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v3 7/7] gnu: Add asahi-mesa-utils. 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer ` (5 preceding siblings ...) 2023-03-05 16:14 ` [bug#61959] [PATCH v3 6/7] gnu: Add asahi-mesa-headers Roman Scherer @ 2023-03-05 16:14 ` Roman Scherer 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-05 16:14 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-utils): New variable. --- gnu/packages/gl.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 490b1051d2..0b4c11db7b 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -667,6 +667,21 @@ (define-public asahi-mesa-headers (version (package-version asahi-mesa)) (source (package-source asahi-mesa)))) +(define-public asahi-mesa-utils + (package/inherit mesa-utils + (name "asahi-mesa-utils") + (version "8.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.mesa3d.org/demos/" version + "/mesa-demos-" version ".tar.bz2")) + (sha256 (base32 "1hdaf7pnh5h4f16pzrxqw3g5s37r5dkimsy46pv316phh05dz8nf")))) + (build-system meson-build-system) + (inputs + (modify-inputs (package-inputs mesa-utils) + (replace "mesa" asahi-mesa))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer ` (4 preceding siblings ...) 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer @ 2023-03-05 23:43 ` Denis 'GNUtoo' Carikli 2023-03-07 4:14 ` Winter via Guix-patches via 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer 7 siblings, 0 replies; 38+ messages in thread From: Denis 'GNUtoo' Carikli @ 2023-03-05 23:43 UTC (permalink / raw) To: 61959 [-- Attachment #1: Type: text/plain, Size: 2408 bytes --] Hi, > > The next step would be to support building a Linux with Rust > > modules. I'm waiting for some patches from the Rust team to do this. > > Can you explain more what you mean by this? As I understand, some GPU drivers are written in rust. Though the GPU driver and the display controller are separate hardware blocks, so one could use ARM Apple computers without 3D acceleration but with working displays and desktop environments. The 3D acceleration is also experimental anyway, so as I understand Asahi Linux users need to opt-in and install a specific package to be able to use that. What I wonder more generally here is also how to best deal with forks and upstreaming. As I understand Ashai is working with various upstream projects to upstream code. So there are several possible approaches that aren't necessarily mutually exclusive. The project status[1] has information on what works with upstream code. So for instance one way could be to add support though upstream projects. Here it means that the laptops touchpads currently won't work for instance, but almost all the important features for the Mac Mini from 2020 would work. That would still need a special kernel package built with 16K pages (that is needed for some hardware features related to the IOMMU), but it could probably be derived from the main kernel packages. And the benefit here is that the maintenance could be done for free if the new Linux packages are inherited from existing package and automatically use the same version. For the m1n1 package, Asahi Linux is the upstream, so there is probably nothing special there. > u-boot-apple-m1 is a modified version of u-boot from the Asahi Linux > team, which is unlikely to be upstreamed from what I heard in the > internet. Do you have pointers and references for that? Another way would be to (also) package all Asahi Linux forks whenever possible and use that. Though in that case I wonder what is the plan for updating the packages. For instance does Asahi Linux makes some releases? If not how to decide on the frequency of updates? And will there be any plans for migrating to upstream projects when forks are no longer necessary? PS: Note that I'm just a random Guix user, I'm not a maintainer. References: ----------- [1]https://github.com/AsahiLinux/docs/wiki/Feature-Support Denis. [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer ` (5 preceding siblings ...) 2023-03-05 23:43 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Denis 'GNUtoo' Carikli @ 2023-03-07 4:14 ` Winter via Guix-patches via 2023-03-08 12:14 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer 7 siblings, 1 reply; 38+ messages in thread From: Winter via Guix-patches via @ 2023-03-07 4:14 UTC (permalink / raw) To: 61959; +Cc: rekado, roman, GNUtoo Hi all, Hopefully everyone can see this properly (e.g. in their email clients). > I didn't receive Winter's email and just saw it in the web interface after I sent v2 of the patch series. Should I be subscribed to the whole guix-patches mailing list as well to receive them? I'm new to the email based workflow and sometimes still a bit lost. I mistakenly thought that Debbugs would forward my message to the participants, but it turns out you have to manually CC everyone if you don't have the existing conversation in your mailbox (e.g. through subscribing to the list). Maybe there's a better way to join the conversation I'm not aware of, but for now, I've just CC'd everyone manually. > I'm not sure about the ordering of libdrm. I saw the mails are not ordered by patch number on the web interface. Ah! Yes, you're right, I didn't realize they were out of order in the web interface... strange! > But looking at my Git history, and the patch number in the subject line, libdrm ([PATCH 4/7] gnu: libdrm: Update to 2.4.114) is updated before adding asahi-mesa ([PATCH 5/7] gnu: Add asahi-mesa). So, aren't they in the correct order? Yup, that looks good to me! Though, I do have to ask: is there a reason you swapped the additions of asahi-fwextract and asahi-mesa in v3? It's technically okay (that is, libdrm is bumped before asahi-mesa is added), but it may make more sense to group the two related changes together? Maybe I'm nit-picking too much ;) > However, rust-bindgen-cli isn't yet packaged, and the version I used previously (0.59.2) somehow disappeared from crates.io. They now only have versions > 0.61.0 available, which I plan to package. bindgen and bindgen-cli split into two crates with v0.61.0, see https://github.com/rust-lang/rust-bindgen/blob/a8c8638d28f135823e913dab69b8a0d4fa4bbf15/CHANGELOG.md#changed-4. I suspect if you check your previous code, you were pulling bindgen pre-split. > The rust team is updating many packages at the moment, so my plan was to wait until those made it into the main branch. Got it, thanks for the clarification. I was just asking because it did seem like building it was as simple as adding a few packages to inputs, so I was wondering if there was something I was missing. > I think the differences of package/inherit vs (inherit) aren't very clear to me. I'm guess I should use package/inherit to be able to use input transformations. Is that correct? Per my understanding, it has to to do with grafting, so maybe it only makes sense when a package is/can be grafted? I'm sure someone else can chime in with more concrete advice though, since both forms are used throughout the tree. Moving on to Denis' comments: > The 3D acceleration is also experimental anyway, so as I understand Asahi Linux users need to opt-in and install a specific package to be able to use that. Correct, it comprises of a kernel built with a different config, and their Mesa fork. > That would still need a special kernel package built with 16K pages (that is needed for some hardware features related to the IOMMU), but it could probably be derived from the main kernel packages. This is just a single configuration flag, AFAIK. In general, I'm unsure if upstreaming these packages are the right thing to do at this point in time, due to how fast the project is moving. The Asahi team is going to eventually upstream ~all of their patches, so in the meantime, it may make the most sense to put everything Asahi-related in a channel? Of course, once things have stabilized and things are upstreamed, the channel will get smaller and smaller, but I think it may be the best option here. (If any of you are interested in working on this, I'd be happy to help! Please reach out.) WDYT? Thanks, Winter ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH 0/7] Add some Asahi Linux packages 2023-03-07 4:14 ` Winter via Guix-patches via @ 2023-03-08 12:14 ` Roman Scherer 0 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:14 UTC (permalink / raw) To: Winter; +Cc: rekado, 61959, GNUtoo [-- Attachment #1: Type: text/plain, Size: 8040 bytes --] Hello everyone, I just sent v4 of the patch series, addressing a concern from Winter about the order of the patches. Winter <winter@winter.cafe> writes: > Hi all, > > Hopefully everyone can see this properly (e.g. in their email clients). > >> I didn't receive Winter's email and just saw it in the web interface >> after I sent v2 of the patch series. Should I be subscribed to the >> whole guix-patches mailing list as well to receive them? I'm new to >> the email based workflow and sometimes still a bit lost. > > I mistakenly thought that Debbugs would forward my message to the > participants, but it turns out you have to manually CC everyone if you > don't have the existing conversation in your mailbox (e.g. through > subscribing to the list). Maybe there's a better way to join the > conversation I'm not aware of, but for now, I've just CC'd everyone > manually. Yeah, I think that happend to me as well :) >> I'm not sure about the ordering of libdrm. I saw the mails are not ordered by patch number on the web interface. > > Ah! Yes, you're right, I didn't realize they were out of order in the web interface... strange! > >> But looking at my Git history, and the patch number in the subject >> line, libdrm ([PATCH 4/7] gnu: libdrm: Update to 2.4.114) is updated >> before adding asahi-mesa ([PATCH 5/7] gnu: Add asahi-mesa). So, >> aren't they in the correct order? > > Yup, that looks good to me! Though, I do have to ask: is there a > reason you swapped the additions of asahi-fwextract and asahi-mesa in > v3? It's technically okay (that is, libdrm is bumped before asahi-mesa > is added), but it may make more sense to group the two related changes > together? Maybe I'm nit-picking too much ;) I hope I addressed this in v4 of the patch series. >> However, rust-bindgen-cli isn't yet packaged, and the version I used previously (0.59.2) somehow disappeared from crates.io. They now only have versions > 0.61.0 available, which I plan to package. > > bindgen and bindgen-cli split into two crates with v0.61.0, see > https://github.com/rust-lang/rust-bindgen/blob/a8c8638d28f135823e913dab69b8a0d4fa4bbf15/CHANGELOG.md#changed-4. I > suspect if you check your previous code, you were pulling bindgen > pre-split. Aha, interesting. However, I still have the impression that some code disappeared from the crates repository. This was my original package definition that does not build anymore (it did a month ago). I will look into it. ``` (define-public rust-bindgen-cli (package (name "rust-bindgen-cli") (version "0.59.2") (source (origin (method url-fetch) (uri (crate-uri "bindgen-cli" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1f4fpycxmbrqk8r2x9brhfgjh86mzc6bngn4a9631x78b2jaklib")))) (build-system cargo-build-system) (arguments `(#:cargo-inputs (("rust-bindgen" ,rust-bindgen-0.59)) #:phases (modify-phases %standard-phases (add-before 'check 'disable-commandline-multiple-headers-test (lambda* (#:key outputs #:allow-other-keys) (substitute* "src/main.rs" (("fn commandline_multiple_headers") "#[ignore]\n fn commandline_multiple_headers"))))))) (inputs (list clang)) (home-page "https://rust-lang.github.io/rust-bindgen/") (synopsis "Generate Rust FFI bindings to C and C++ libraries") (description "This package is the CLI to rust-bindgen and can be used to automatically generate Rust FFI bindings to C and C++ libraries.") (license license:bsd-3))) ``` >> The rust team is updating many packages at the moment, so my plan was to wait until those made it into the main branch. > > Got it, thanks for the clarification. I was just asking because it did seem like building it was as simple as adding a few packages to inputs, so I was wondering if there was something I was missing. > >> I think the differences of package/inherit vs (inherit) aren't very clear to me. I'm guess I should use package/inherit to be able to use input transformations. Is that correct? > > Per my understanding, it has to to do with grafting, so maybe it only > makes sense when a package is/can be grafted? I'm sure someone else > can chime in with more concrete advice though, since both forms are > used throughout the tree. > > Moving on to Denis' comments: > >> The 3D acceleration is also experimental anyway, so as I understand Asahi Linux users need to opt-in and install a specific package to be able to use that. > > Correct, it comprises of a kernel built with a different config, and their Mesa fork. > >> That would still need a special kernel package built with 16K pages (that is needed for some hardware features related to the IOMMU), but it could probably be derived from the main kernel packages. Yes, I think so as well. The only missing thing to build this kernel is the Rust support (if you want the GPU driver) for building kernel modules. > This is just a single configuration flag, AFAIK. > > In general, I'm unsure if upstreaming these packages are the right > thing to do at this point in time, due to how fast the project is > moving. The Asahi team is going to eventually upstream ~all of their > patches, so in the meantime, it may make the most sense to put > everything Asahi-related in a channel? Of course, once things have > stabilized and things are upstreamed, the channel will get smaller and > smaller, but I think it may be the best option here. @Winter I actually have a Guix channel where these patches are coming from [1]. I asked a while ago on the guix-devel [2] mailing list if there is interest in adding some of those patches to Guix itself. At least Tobias showed interest, that's why I'm sending those patches. [1] https://github.com/r0man/asahi-guix [2] https://lists.gnu.org/archive/html/guix-devel/2023-02/msg00348.html > > (If any of you are interested in working on this, I'd be happy to help! Please reach out.) > > WDYT? > I'm interested in collaborating on this, be it here or in my channel. I'm especially interested in help writing a Guix bootloader for m1n1. I'm not too familiar with how multiple bootloaders work in Guix, and how updating m1n1 on a Guix reconfigure should work with regards to rolling back in case something went wrong. I think the m1n1 Guix bootloader should do something similar on system reconfigure, as this script here does: https://raw.githubusercontent.com/AsahiLinux/asahi-scripts/main/update-m1n1 Replying to some of Denis questions: >> u-boot-apple-m1 is a modified version of u-boot from the Asahi Linux >> team, which is unlikely to be upstreamed from what I heard in the >> internet. > > Do you have pointers and references for that? I can't find it anymore. :/ I might have read it somewhere on Reddit, the Fediverse or in one of Hector Martins presentation. I'll let you know when I find it again. > Another way would be to (also) package all Asahi Linux forks whenever > possible and use that. Though in that case I wonder what is the plan > for updating the packages. For instance does Asahi Linux makes some > releases? If not how to decide on the frequency of updates? I think they do rolling releases, since they are based on Arch Linux. You get support for the GPU by installing their linux-asahi-edge and mesa-asahi-edge packages. https://asahilinux.org/2022/12/gpu-drivers-now-in-asahi-linux/ In my channel I track their https://github.com/AsahiLinux/PKGBUILDs repository and usually update packages whenever there is a change on their side. > And will there be any plans for migrating to upstream projects when > forks are no longer necessary? > My plan was to update the Asahi package variants as long as they are needed, and fade them out eventually when everything is upstreamed on their side. Roman [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --] ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 0/7] Change patch order 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer ` (6 preceding siblings ...) 2023-03-07 4:14 ` Winter via Guix-patches via @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 1/7] gnu: Add m1n1 Roman Scherer ` (6 more replies) 7 siblings, 7 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer Hi Guix, here is another updated version of the patch series. It's the same as v3, except that I moved asahi-fwextract to be the last patch. The updated libdrm is needed for the asahi-mesa packages. asahi-fwextract is not related to the mesa patches, so I moved it to the bottom. Roman Scherer (7): gnu: Add m1n1. gnu: Add u-boot-apple-m1. gnu: libdrm: Update to 2.4.114 and adjust renamed options. gnu: Add asahi-mesa. gnu: Add asahi-mesa-headers. gnu: Add asahi-mesa-utils. gnu: Add asahi-fwextract. gnu/packages/bootloaders.scm | 59 ++++++++++++++++++++++++++++++ gnu/packages/firmware.scm | 42 ++++++++++++++++++++++ gnu/packages/gl.scm | 70 ++++++++++++++++++++++++++++++++++++ gnu/packages/xdisorg.scm | 12 +++---- 4 files changed, 177 insertions(+), 6 deletions(-) base-commit: 203578eef286f3b44cd82fd2eb965a828e21fbe7 -- 2.39.1 ^ permalink raw reply [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 1/7] gnu: Add m1n1. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 2/7] gnu: Add u-boot-apple-m1 Roman Scherer ` (5 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/bootloaders.scm (m1n1): New variable. --- gnu/packages/bootloaders.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ee47a9fad7..aa2fcc03dd 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -623,6 +623,42 @@ (define-public dtc tree binary files. These are board description files used by Linux and BSD.") (license license:gpl2+))) +(define-public m1n1 + (let ((commit "46f2811351806aafb3d56e02c107f95ac2ea85e3")) + (package + (name "m1n1") + (version (git-version "1.2.4" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/m1n1") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14chrqbs57v6i5vmf643svbi3s7h4fxrxly0bby7brf3w114nmpk")))) + (build-system gnu-build-system) + (supported-systems (list "aarch64-linux")) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "RELEASE" "1"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((dir (string-append (assoc-ref outputs "out") "/libexec/"))) + (mkdir-p dir) + (copy-file "build/m1n1.bin" (string-append dir "m1n1.bin"))))) + ;; There are no tests + (delete 'check)))) + (home-page "https://github.com/AsahiLinux/m1n1") + (synopsis "Boot loader and experimentation playground for Apple Silicon") + (description "m1n1 is the bootloader developed by the Asahi Linux project to bridge +the Apple (XNU) boot ecosystem to the Linux boot ecosystem.") + (license license:expat)))) + (define %u-boot-rockchip-inno-usb-patch ;; Fix regression in 2020.10 causing freezes on boot with USB boot enabled. ;; See https://gitlab.manjaro.org/manjaro-arm/packages/core/uboot-rockpro64/-/issues/4 -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 2/7] gnu: Add u-boot-apple-m1. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 1/7] gnu: Add m1n1 Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options Roman Scherer ` (4 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/bootloaders.scm (u-boot-apple-m1): New variable. --- gnu/packages/bootloaders.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index aa2fcc03dd..fc4ce4d908 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1032,6 +1032,29 @@ (define-public u-boot-am335x-boneblack (define-public u-boot-am335x-evm (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")) +(define-public u-boot-apple-m1 + (let ((base (make-u-boot-package "apple_m1" "aarch64-linux-gnu")) + (commit "54409548c3aa8cf4820f1bda69a26bb603a0a5a4")) + (package/inherit base + (version (git-version "2022.10-1" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/u-boot") + (commit commit))) + (file-name (git-file-name (package-name base) version)) + (sha256 + (base32 "1m1w6ajzsfpb59abncz3sa9b1waqjsnh2vm7js2n22xiw4km7nzx")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (delete 'disable-tools-libcrypto))))) + (native-inputs + (modify-inputs (package-native-inputs base) + (prepend libressl)))))) + (define*-public (make-u-boot-sunxi64-package board triplet #:key defconfig configs) (let ((base (make-u-boot-package -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 1/7] gnu: Add m1n1 Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 2/7] gnu: Add u-boot-apple-m1 Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 4/7] gnu: Add asahi-mesa Roman Scherer ` (3 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/xdisorg.scm (libdrm): Update to 2.4.114 and adjust renamed options. --- gnu/packages/xdisorg.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ec5cdbdc28..77c88c9987 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -709,7 +709,7 @@ (define-public pixman (define-public libdrm (package (name "libdrm") - (version "2.4.107") + (version "2.4.114") (source (origin (method url-fetch) (uri (string-append @@ -717,16 +717,16 @@ (define-public libdrm version ".tar.xz")) (sha256 (base32 - "127qf1rzhaf13vdd75a58v5q34617hvangjlfnlkcdh37gqcwm65")))) + "09nhk3jx3qzggl5vyii3yh4zm0npjqsbxhzvxrg2xla77a2cyj9h")))) (build-system meson-build-system) (arguments `(#:configure-flags '(,@(match (%current-system) ((or "armhf-linux" "aarch64-linux") - '("-Dexynos=true" - "-Domap=true" - "-Detnaviv=true" - "-Dtegra=true" + '("-Dexynos=enabled" + "-Domap=enabled" + "-Detnaviv=enabled" + "-Dtegra=enabled" "-Dfreedreno-kgsl=true")) (_ '()))) -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 4/7] gnu: Add asahi-mesa. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer ` (2 preceding siblings ...) 2023-03-08 12:13 ` [bug#61959] [PATCH v4 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 5/7] gnu: Add asahi-mesa-headers Roman Scherer ` (2 subsequent siblings) 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa): New variable. --- gnu/packages/gl.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 4ae96032cd..3b3985df71 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -52,6 +52,7 @@ (define-module (gnu packages gl) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tls) + #:use-module (gnu packages valgrind) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) #:use-module (gnu packages xdisorg) @@ -612,6 +613,54 @@ (define-public mesa-utils ;; glxdemo is public domain; others expat. (license (list license:expat license:public-domain)))) +(define-public asahi-mesa + (let ((commit "0a12b60a6b4363315ca3789e7e289240704a26da")) + (package/inherit mesa + (name "asahi-mesa") + (version (git-version "20221229" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/asahi/mesa") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0yjn55qy4890gi1s3dhzdhqqxrms4fzcibqr84a3vcc53ggiywmb")))) + (arguments + (substitute-keyword-arguments (package-arguments mesa) + ((#:configure-flags flags) + `(list "-Db_ndebug=true" + "-Db_lto=false" + "-Ddri3=enabled" + "-Degl=enabled" + "-Dgallium-drivers=swrast,virgl,kmsro,asahi" + "-Dgallium-extra-hud=true" + "-Dgallium-opencl=disabled" + "-Dgallium-rusticl=false" + "-Dgallium-va=disabled" + "-Dgallium-vdpau=disabled" + "-Dgallium-xa=disabled" + "-Dgbm=enabled" + "-Dgles1=disabled" + "-Dgles2=enabled" + "-Dglx=dri" + "-Dlibunwind=disabled" + "-Dllvm=enabled" + "-Dlmsensors=enabled" + "-Dmicrosoft-clc=disabled" + "-Dosmesa=true" + "-Dplatforms=x11,wayland" + "-Dshared-glapi=enabled" + "-Dvalgrind=enabled" + "-Dvulkan-drivers=swrast" + "-Dvulkan-layers=")))) + (inputs + (modify-inputs (package-inputs mesa) + (prepend `(,lm-sensors "lib") libglvnd libressl valgrind) + (replace "llvm" llvm-15) + (replace "wayland-protocols" wayland-protocols-next)))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 5/7] gnu: Add asahi-mesa-headers. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer ` (3 preceding siblings ...) 2023-03-08 12:13 ` [bug#61959] [PATCH v4 4/7] gnu: Add asahi-mesa Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 6/7] gnu: Add asahi-mesa-utils Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 7/7] gnu: Add asahi-fwextract Roman Scherer 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-headers): New variable. --- gnu/packages/gl.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 3b3985df71..490b1051d2 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -661,6 +661,12 @@ (define-public asahi-mesa (replace "llvm" llvm-15) (replace "wayland-protocols" wayland-protocols-next)))))) +(define-public asahi-mesa-headers + (package/inherit mesa-headers + (name "asahi-mesa-headers") + (version (package-version asahi-mesa)) + (source (package-source asahi-mesa)))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 6/7] gnu: Add asahi-mesa-utils. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer ` (4 preceding siblings ...) 2023-03-08 12:13 ` [bug#61959] [PATCH v4 5/7] gnu: Add asahi-mesa-headers Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 7/7] gnu: Add asahi-fwextract Roman Scherer 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/gl.scm (asahi-mesa-utils): New variable. --- gnu/packages/gl.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 490b1051d2..0b4c11db7b 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -667,6 +667,21 @@ (define-public asahi-mesa-headers (version (package-version asahi-mesa)) (source (package-source asahi-mesa)))) +(define-public asahi-mesa-utils + (package/inherit mesa-utils + (name "asahi-mesa-utils") + (version "8.5.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.mesa3d.org/demos/" version + "/mesa-demos-" version ".tar.bz2")) + (sha256 (base32 "1hdaf7pnh5h4f16pzrxqw3g5s37r5dkimsy46pv316phh05dz8nf")))) + (build-system meson-build-system) + (inputs + (modify-inputs (package-inputs mesa-utils) + (replace "mesa" asahi-mesa))))) + (define-public glew (package (name "glew") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
* [bug#61959] [PATCH v4 7/7] gnu: Add asahi-fwextract. 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer ` (5 preceding siblings ...) 2023-03-08 12:13 ` [bug#61959] [PATCH v4 6/7] gnu: Add asahi-mesa-utils Roman Scherer @ 2023-03-08 12:13 ` Roman Scherer 6 siblings, 0 replies; 38+ messages in thread From: Roman Scherer @ 2023-03-08 12:13 UTC (permalink / raw) To: 61959; +Cc: Roman Scherer * gnu/packages/firmware.scm (asahi-fwextract): New variable. --- gnu/packages/firmware.scm | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index a876aa727a..0d52349240 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -34,6 +34,7 @@ (define-module (gnu packages firmware) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system pyproject) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages admin) @@ -77,6 +78,47 @@ (define-module (gnu packages firmware) #:use-module (gnu packages xml) #:use-module (ice-9 match)) +(define-public asahi-fwextract + (let ((commit "0ac64c9ce1c460f4576162a82d239d7e8688a79e")) + (package + (name "asahi-fwextract") + (version (git-version "0.5.3" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AsahiLinux/asahi-installer") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1kj9ycy3f34fzm9bnirlcw9zm2sgipwrqzphdg5k099rbjbc7zmj")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "vendor") + (with-output-to-file "entry_points.txt" + (lambda () + (format #t "[console_scripts]\n") + (format #t "asahi-fwextract = asahi_firmware.update:main"))))))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'create-entrypoints 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/asahi-fwextract") + `("LD_LIBRARY_PATH" ":" prefix + (,(string-append (assoc-ref inputs "lzfse") "/lib")))))))))) + (inputs (list lzfse)) + (home-page "https://github.com/AsahiLinux/asahi-installer") + (synopsis "Asahi Linux firmware extractor") + (description "The Asahi Linux firmware extractor transform the firmware archive +provided by the Asahi Linux installer into a manifest and CPIO and TAR +archives that are compatible with the Linux kernel.") + (license license:expat)))) + (define-public ath9k-htc-firmware (package (name "ath9k-htc-firmware") -- 2.39.1 ^ permalink raw reply related [flat|nested] 38+ messages in thread
end of thread, other threads:[~2023-03-08 12:57 UTC | newest] Thread overview: 38+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-04 14:44 [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 1/7] gnu: Add m1n1 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 2/7] gnu: Add u-boot-apple-m1 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 3/7] gnu: Add asahi-fwextract Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 4/7] gnu: libdrm: Update to 2.4.114 Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 5/7] gnu: Add asahi-mesa Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 6/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-04 14:46 ` [bug#61959] [PATCH 7/7] gnu: Add asahi-mesa-utils Roman Scherer 2023-03-04 17:38 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Ricardo Wurmus 2023-03-05 10:53 ` Roman Scherer 2023-03-05 11:15 ` Roman Scherer 2023-03-04 19:42 ` Winter via Guix-patches via 2023-03-05 10:53 ` [bug#61959] [PATCH v2 1/7] gnu: Add m1n1 Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 2/7] gnu: Add u-boot-apple-m1 Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 3/7] gnu: libdrm: Update to 2.4.114 Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 4/7] gnu: Add asahi-fwextract Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 5/7] gnu: Add asahi-mesa Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 6/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-05 10:53 ` [bug#61959] [PATCH v2 7/7] gnu: Add asahi-mesa-utils Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 0/7] Add some Asahi Linux packages Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 1/7] gnu: Add m1n1 Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 2/7] gnu: Add u-boot-apple-m1 Roman Scherer 2023-03-05 16:13 ` [bug#61959] [PATCH v3 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 4/7] gnu: Add asahi-fwextract Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 5/7] gnu: Add asahi-mesa Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 6/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-05 16:14 ` [bug#61959] [PATCH v3 7/7] gnu: Add asahi-mesa-utils Roman Scherer 2023-03-05 23:43 ` [bug#61959] [PATCH 0/7] Add some Asahi Linux packages Denis 'GNUtoo' Carikli 2023-03-07 4:14 ` Winter via Guix-patches via 2023-03-08 12:14 ` Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 0/7] Change patch order Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 1/7] gnu: Add m1n1 Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 2/7] gnu: Add u-boot-apple-m1 Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 3/7] gnu: libdrm: Update to 2.4.114 and adjust renamed options Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 4/7] gnu: Add asahi-mesa Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 5/7] gnu: Add asahi-mesa-headers Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 6/7] gnu: Add asahi-mesa-utils Roman Scherer 2023-03-08 12:13 ` [bug#61959] [PATCH v4 7/7] gnu: Add asahi-fwextract Roman Scherer
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.