summaryrefslogtreecommitdiff
path: root/nongnu/packages/linux.scm
diff options
context:
space:
mode:
Diffstat (limited to 'nongnu/packages/linux.scm')
-rw-r--r--nongnu/packages/linux.scm630
1 files changed, 517 insertions, 113 deletions
diff --git a/nongnu/packages/linux.scm b/nongnu/packages/linux.scm
index f5f396e..51bbfb0 100644
--- a/nongnu/packages/linux.scm
+++ b/nongnu/packages/linux.scm
@@ -1,9 +1,13 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020, 2021 James Smith <jsubuntuxp@disroot.org>
-;;; Copyright © 2020, 2021, 2022 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020-2024 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020, 2022 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020, 2021, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020, 2021, 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2021 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2021 Risto Stevcev <me@risto.codes>
@@ -12,29 +16,28 @@
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2022 Remco van 't Veer <remco@remworks.net>
-;;;
-;;; This program is free software: you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation, either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; This program is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+;;; Copyright © 2022 Simen Endsjø <simendsjo@gmail.com>
+;;; Copyright © 2022 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com>
+;;; Copyright © 2023 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2023 Jelle Licht <jlicht@fsfe.org>
+;;; Copyright © 2023 Adam Kandur <rndd@tuta.io>
+;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
+;;; Copyright © 2023 Ada Stevenson <adanskana@gmail.com>
+;;; Copyright © 2023 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2023 PRESFIL <presfil@protonmail.com>
(define-module (nongnu packages linux)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpio)
#:use-module (gnu packages linux)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
@@ -42,92 +45,294 @@
#:use-module (guix build-system trivial)
#:use-module (ice-9 match)
#:use-module (nonguix licenses)
+ #:use-module (srfi srfi-1)
#:export (corrupt-linux))
-(define (linux-urls version)
- "Return a list of URLS for Linux VERSION."
- (list (string-append "https://www.kernel.org/pub/linux/kernel/v"
- (version-major version) ".x/linux-" version ".tar.xz")))
+(define (linux-url version)
+ "Return a URL for Linux VERSION."
+ (string-append "mirror://kernel.org"
+ "/linux/kernel/v" (version-major version) ".x"
+ "/linux-" version ".tar.xz"))
-(define* (corrupt-linux freedo version hash #:key (name "linux"))
- (package
- (inherit freedo)
- (name name)
- (version version)
- (source (origin
- (method url-fetch)
- (uri (linux-urls version))
- (sha256 (base32 hash))))
- (home-page "https://www.kernel.org/")
- (synopsis "Linux kernel with nonfree binary blobs included")
- (description
- "The unmodified Linux kernel, including nonfree blobs, for running Guix
-System on hardware which requires nonfree software to function.")))
+;;; If you are corrupting the kernel on your own, consider using output of
+;;; this procedure as a base for your options:
+;;; (corrupt-linux linux-libre-lts
+;;; #:configs (cons* "CONFIG_FOO=y"
+;;; (nonguix-extra-linux-options linux-libre-lts)
+(define-public (nonguix-extra-linux-options linux-or-version)
+ "Return a list containing additional options that nonguix sets by default
+for a corrupted linux package of specified version. linux-or-version can be
+some freedo package or an output of package-version procedure."
+ (define linux-version
+ (if (package? linux-or-version)
+ (package-version linux-or-version)
+ linux-or-version))
+
+ (reverse (fold (lambda (opt opts)
+ (if (version>=? linux-version (car opt))
+ (cons* (cdr opt) opts)
+ opts))
+ '()
+ ;; List of additional options for nonguix corrupted linux.
+ ;; Each member is a pair of a minimal version (>=) and the
+ ;; option itself. Option has to be in a format suitable for
+ ;; (@ (guix build kconfig) modify-defconfig) procedure.
+ ;;
+ ;; Do note that this list is intended for enabling use of
+ ;; hardware requiring non-free firmware. If a configuration
+ ;; option does work under linux-libre, it should go into Guix
+ ;; actual.
+ '(
+ ;; Driver for MediaTek mt7921e wireless chipset
+ ("5.15" . "CONFIG_MT7921E=m")))))
+
+(define* (corrupt-linux freedo
+ #:key
+ (name "linux")
+ (configs (nonguix-extra-linux-options freedo))
+ (defconfig #f))
+
+ ;; TODO: This very directly depends on guix internals.
+ ;; Throw it all out when we manage kernel hashes.
+ (define gexp-inputs (@@ (guix gexp) gexp-inputs))
+
+ (define extract-gexp-inputs
+ (compose gexp-inputs force origin-uri))
+
+ (define (find-source-hash sources url)
+ (let ((versioned-origin
+ (find (lambda (source)
+ (let ((uri (origin-uri source)))
+ (and (string? uri) (string=? uri url)))) sources)))
+ (if versioned-origin
+ (origin-hash versioned-origin)
+ #f)))
+
+ (let* ((version (package-version freedo))
+ (url (linux-url version))
+ (pristine-source (package-source freedo))
+ (inputs (map gexp-input-thing (extract-gexp-inputs pristine-source)))
+ (sources (filter origin? inputs))
+ (hash (find-source-hash sources url)))
+ (package
+ (inherit
+ (customize-linux
+ #:name name
+ #:linux freedo
+ #:source (origin
+ (method url-fetch)
+ (uri url)
+ (hash hash))
+ #:configs configs
+ #:defconfig defconfig))
+ (version version)
+ (home-page "https://www.kernel.org/")
+ (synopsis "Linux kernel with nonfree binary blobs included")
+ (description
+ "The unmodified Linux kernel, including nonfree blobs, for running Guix System
+on hardware which requires nonfree software to function."))))
-(define-public linux-5.18
- (corrupt-linux linux-libre-5.18 "5.18.16"
- "1khi1npn8d8jimwdy8bf3r7l780mxdmvk5azdv419pk33qjqdxgi"))
+(define-public linux-6.7
+ (corrupt-linux linux-libre-6.7))
+
+(define-public linux-6.6
+ (corrupt-linux linux-libre-6.6))
+
+(define-public linux-6.1
+ (corrupt-linux linux-libre-6.1))
(define-public linux-5.15
- (corrupt-linux linux-libre-5.15 "5.15.59"
- "1jxw6fnc7yaw7r6193wy6l8wdlpy3frw48drnc3dnh3k0m1cdpg6"))
+ (corrupt-linux linux-libre-5.15))
(define-public linux-5.10
- (corrupt-linux linux-libre-5.10 "5.10.135"
- "0i1kahv739qpyyml7d7sx306nv7gp55i5d97vlb0fryfx4dsd6g4"))
+ (corrupt-linux linux-libre-5.10))
(define-public linux-5.4
- (corrupt-linux linux-libre-5.4 "5.4.209"
- "1kdnz99k7zspzaxqaxahbf6hncigy4cvjlb79jsy7a95qxxr31qf"))
+ (corrupt-linux linux-libre-5.4))
(define-public linux-4.19
- (corrupt-linux linux-libre-4.19 "4.19.254"
- "1rd40wmdaymbly2zvf60mjqsflkd4n1y232qz0ixn1rfl28yz62i"))
+ (corrupt-linux linux-libre-4.19))
-(define-public linux-4.14
- (corrupt-linux linux-libre-4.14 "4.14.290"
- "0zyxb99a7fa2l85vnzmvg2nry99clj20d4j38piqm921iqxak2j4"))
+(define-public linux linux-6.6)
+;; linux-lts points to the *newest* released long-term support version.
+(define-public linux-lts linux-6.1)
-(define-public linux-4.9
- (corrupt-linux linux-libre-4.9 "4.9.325"
- "04msx0x0d8v93zjr3jj0qqkgg7m4hb7rj6hk5vzrzasmgbjmb3dl"))
+(define-public linux-arm64-generic-5.10
+ (corrupt-linux linux-libre-arm64-generic-5.10 #:name "linux-arm64-generic"))
-(define-public linux linux-5.18)
-;; linux-lts points to the *newest* released long-term support version.
-(define-public linux-lts linux-5.15)
+(define-public linux-arm64-generic-5.4
+ (corrupt-linux linux-libre-arm64-generic-5.4 #:name "linux-arm64-generic"))
+
+(define-public linux-arm64-generic
+ (corrupt-linux linux-libre-arm64-generic #:name "linux-arm64-generic"))
+
+
+;;;
+;;; Linux-XanMod
+;;;
-(define-public linux-arm64-generic-5.18
- (corrupt-linux linux-libre-arm64-generic "5.18.16"
- "1khi1npn8d8jimwdy8bf3r7l780mxdmvk5azdv419pk33qjqdxgi"
- #:name "linux-arm64-generic"))
+(define* (make-linux-xanmod-source version xanmod-revision
+ #:key xanmod-branch kernel-hash xanmod-hash)
-(define-public linux-arm64-generic-5.15
- (corrupt-linux linux-libre-arm64-generic "5.15.59"
- "1jxw6fnc7yaw7r6193wy6l8wdlpy3frw48drnc3dnh3k0m1cdpg6"
- #:name "linux-arm64-generic"))
+ (define %upstream-linux-source
+ (@@ (gnu packages linux) %upstream-linux-source))
-(define-public linux-arm64-generic linux-arm64-generic-5.18)
+ (define kernel-source
+ (%upstream-linux-source (version-major+minor version) kernel-hash))
-(define-public linux-arm64-generic-lts linux-arm64-generic-5.15)
+ (define xanmod-patch
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://sourceforge/xanmod/releases/" xanmod-branch "/"
+ version "-" xanmod-revision "/patch-"
+ version "-" xanmod-revision ".xz"))
+ (sha256 xanmod-hash)))
+
+ (origin
+ (inherit kernel-source)
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ (let* ((xz-name (basename #+xanmod-patch))
+ (patch-xz-name (string-append (string-drop-right xz-name 3)
+ ".patch.xz"))
+ (patch-name (string-drop-right patch-xz-name 3)))
+ (copy-file #+xanmod-patch patch-xz-name)
+ (invoke #+(file-append xz "/bin/unxz") patch-xz-name)
+ (invoke #+(file-append patch "/bin/patch")
+ "--force" "--no-backup-if-mismatch"
+ #+@(origin-patch-flags kernel-source)
+ "--input" patch-name)
+ (for-each delete-file
+ (list patch-name
+ ;; EXTRAVERSION is used instead.
+ "localversion")))))))
+
+(define* (make-linux-xanmod version xanmod-revision source
+ #:key
+ (name "linux-xanmod")
+ (xanmod-defconfig "config_x86-64-v1"))
+
+ (define %default-extra-linux-options
+ (@@ (gnu packages linux) %default-extra-linux-options))
+
+ (define config->string
+ (@@ (gnu packages linux) config->string))
+
+ (define base-kernel
+ (customize-linux
+ #:name name
+ #:source source
+ #:defconfig xanmod-defconfig
+ ;; EXTRAVERSION is used instead.
+ #:configs (config->string
+ '(("CONFIG_LOCALVERSION" . "")))
+ #:extra-version xanmod-revision))
+
+ (package
+ (inherit base-kernel)
+ (version version)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-kernel)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ ;; Since `customize-linux' replaces the configure phase, we add
+ ;; XanMod defconfig beforehand to ensure compatibility of the
+ ;; resulting package with `customize-linux'.
+ (add-before 'configure 'add-xanmod-defconfig
+ (lambda _
+ (rename-file
+ (string-append "CONFIGS/xanmod/gcc/" #$xanmod-defconfig)
+ ".config")
+
+ ;; Adapted from `make-linux-libre*'.
+ (chmod ".config" #o666)
+ (let ((port (open-file ".config" "a"))
+ (extra-configuration
+ #$(config->string
+ (append %default-extra-linux-options
+ ;; NOTE: These are configs expected by Guix
+ ;; but missing from XanMod defconfig.
+ '(("CONFIG_BLK_DEV_NVME" . #t)
+ ("CONFIG_CRYPTO_XTS" . m)
+ ("CONFIG_VIRTIO_CONSOLE" . m))))))
+ (display extra-configuration port)
+ (close-port port))
+ (invoke "make" "oldconfig")
+
+ (rename-file
+ ".config"
+ (string-append "arch/x86/configs/" #$xanmod-defconfig))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base-kernel)
+ ;; cpio is needed for CONFIG_IKHEADERS.
+ (prepend cpio zstd)))
+ (home-page "https://xanmod.org/")
+ (supported-systems '("x86_64-linux"))
+ (synopsis "Linux kernel distribution with custom settings and new features")
+ (description
+ "This package provides XanMod kernel, a general-purpose Linux kernel
+distribution with custom settings and new features. It's built to provide a
+stable, responsive and smooth desktop experience.")))
+
+;; Linux-XanMod sources
+(define-public linux-xanmod-version "6.7.6")
+(define-public linux-xanmod-revision "xanmod1")
+(define-public linux-xanmod-source
+ (make-linux-xanmod-source
+ linux-xanmod-version
+ linux-xanmod-revision
+ #:xanmod-branch "main"
+ #:kernel-hash (base32 "0s8hbcsg7fdvspqam8kzcxygjsznr4zfi60nqgc81l3n4m518cgg")
+ #:xanmod-hash (base32 "0hv76dj9z17w6zcy25v1ndlmdw593wlbmnw5x903vidb3c6a1dfi")))
+
+(define-public linux-xanmod-lts-version "6.6.18")
+(define-public linux-xanmod-lts-revision "xanmod1")
+(define-public linux-xanmod-lts-source
+ (make-linux-xanmod-source
+ linux-xanmod-lts-version
+ linux-xanmod-lts-revision
+ #:xanmod-branch "lts"
+ #:kernel-hash (base32 "1l2nisx9lf2vdgkq910n5ldbi8z25ky1zvl67zgwg2nxcdna09nr")
+ #:xanmod-hash (base32 "1q33bd4a65l46333l2m7vjn46b0xhdbz508bq7q0bphbmy0bf35m")))
+
+;; Linux-XanMod packages
+(define-public linux-xanmod
+ (make-linux-xanmod linux-xanmod-version
+ linux-xanmod-revision
+ linux-xanmod-source))
+
+(define-public linux-xanmod-lts
+ (make-linux-xanmod linux-xanmod-lts-version
+ linux-xanmod-lts-revision
+ linux-xanmod-lts-source))
+
+
+;;;
+;;; Firmwares
+;;;
(define-public linux-firmware
(package
(name "linux-firmware")
- (version "20220509")
+ (version "20240115")
(source (origin
(method url-fetch)
- (uri (string-append "https://git.kernel.org/pub/scm/linux/kernel"
- "/git/firmware/linux-firmware.git/snapshot/"
- "linux-firmware-" version ".tar.gz"))
+ (uri (string-append "mirror://kernel.org/linux/kernel/firmware/"
+ "linux-firmware-" version ".tar.xz"))
(sha256
(base32
- "09461dcfxvzzsl768myywb64jivnxyx3m4apbygq4501l8h8ybig"))))
+ "13b75kd075famc58pvx4r9268pxn69nyihx7p3i6i7mvkgqayz5b"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key (make-flags '()) #:allow-other-keys)
+ (apply invoke "make" "install-nodedup" make-flags)))
(delete 'validate-runpath))))
(home-page
"https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
@@ -567,8 +772,8 @@ package contains nonfree firmware for the following chips:
(deprecated-package "rtl-bt-firmware" realtek-firmware))
(define-public rtl8192eu-linux-module
- (let ((commit "8396a4ebb4bde6b5c919d291838320f0e5b480dd")
- (revision "3"))
+ (let ((commit "a928f08c1dd4f9a1e84d85811a543e974551bc4f")
+ (revision "6"))
(package
(name "rtl8192eu-linux-module")
(version (git-version "0.0.0" revision commit))
@@ -581,7 +786,7 @@ package contains nonfree firmware for the following chips:
(file-name (git-file-name name version))
(sha256
(base32
- "0kbfrvrfbi1r6if9vi7ccn0nc4lcqp85insiksyg3kg99mx78xhk"))))
+ "1q26kyic4glmgy0hbaq46r067m6cqf7d41chgivyxn8y32rf1fgc"))))
(build-system linux-module-build-system)
(arguments
`(#:make-flags
@@ -603,8 +808,176 @@ network adapters.")
;; hal/rtl8192e/hal8192e_fw.c
(license gpl2))))
+(define-public rtl8821ce-linux-module
+ (let ((commit "a478095a45d8aa957b45be4f9173c414efcacc6f")
+ (revision "10"))
+ (package
+ (name "rtl8821ce-linux-module")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tomaspinho/rtl8821ce")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "00cn87jjrcxjqr3n8jv4w3n64zksmzz05fdr1gdvnbx1ab5739f6"))))
+ (build-system linux-module-build-system)
+ (arguments
+ (list #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "KSRC="
+ (assoc-ref %build-inputs
+ "linux-module-builder")
+ "/lib/modules/build"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key (make-flags '()) (parallel-build? #t)
+ #:allow-other-keys)
+ (apply invoke "make"
+ `(,@(if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '())
+ ,@make-flags)))))
+ #:tests? #f)) ; no test suite
+ (home-page "https://github.com/tomaspinho/rtl8821ce")
+ (synopsis "Linux driver for Realtek RTL8821CE wireless network adapters")
+ (description "This is Realtek's RTL8821CE Linux driver for wireless
+network adapters.")
+ ;; Rejected by Guix beause it contains a binary blob in:
+ ;; hal/rtl8821c/hal8821c_fw.c
+ (license gpl2))))
+
+(define-public rtl8821cu-linux-module
+ (let ((commit "a41ef7cabd1aa36fa2b4eb63a71cf719bff11b72")
+ (revision "1"))
+ (package
+ (name "rtl8821cu-linux-module")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/morrownr/8821cu-20210916")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0fnv4gm4adnf8gbjzc2lljh2a3i111159qira3w0qm1zhyqadaq0"))))
+ (build-system linux-module-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list (string-append "CC="
+ #$(cc-for-target))
+ (string-append "KSRC="
+ (assoc-ref %build-inputs
+ "linux-module-builder")
+ "/lib/modules/build"))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key (make-flags '())
+ (parallel-build? #t) #:allow-other-keys)
+ (apply invoke "make"
+ `(,@(if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '()) ,@make-flags)))))
+ #:tests? #f))
+ (home-page "https://github.com/morrownr/8821cu-20210916")
+ (synopsis "Linux driver for Realtek USB WiFi adapters")
+ (description
+ "Linux driver for USB WiFi adapters that are based on the
+Realtek RTL8811CU, RTL8821CU, RTL8821CUH and RTL8731AU chipsets.
+
+To work, in addition to installing the driver, you need
+to disable the conflicting rtw88 driver:
+
+@example
+(operating-system
+ ;; ...
+ ;; Blacklist conflicting kernel modules.
+ (kernel-arguments '(\"modprobe.blacklist=rtw88_8821cu\"))
+ (kernel-loadable-modules (list rtl8821cu-linux-module)))
+@end example")
+ ;; Rejected by Guix beause it contains a binary blob in:
+ ;; hal/rtl8821c/hal8821c_fw.c
+ (license (nonfree
+ "https://github.com/morrownr/8821cu-20210916/blob/main/LICENSE")))))
+
+(define-public rtl8812au-aircrack-ng-linux-module
+ (let ((commit "35308f4dd73e77fa572c48867cce737449dd8548")
+ (revision "11"))
+ (package
+ (inherit rtl8821ce-linux-module)
+ (name "rtl8812au-aircrack-ng-linux-module")
+ (version (git-version "5.6.4.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aircrack-ng/rtl8812au")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1clqrgmq5fhzybbiapmdbhg5qfx9k21r0hqa9pqmyinaqhvfnhfj"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Remove bundled tarballs, APKs, word lists, speadsheets,
+ ;; and other unnecessary unlicenced things.
+ (for-each delete-file-recursively (list "android"
+ "docs"
+ "tools"))))))
+ (supported-systems '("x86_64-linux" "i686-linux"))
+ (home-page "https://github.com/aircrack-ng/rtl8812au")
+ (synopsis "Linux driver for Realtek USB wireless network adapters")
+ (description
+ "This is Realtek's rtl8812au Linux driver for USB 802.11n wireless
+network adapters, modified by the aircrack-ng project to support monitor mode
+and frame injection. It provides a @code{88XXau} kernel module that supports
+RTL8812AU, RTL8821AU, and RTL8814AU chips.")
+ ;; Rejected by Guix beause it contains a binary blob in:
+ ;; hal/rtl8812a/hal8812a_fw.c
+ (license gpl2+))))
+
+(define-public r8168-linux-module
+ (package
+ (name "r8168-linux-module")
+ (version "8.052.01")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mtorromeo/r8168")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "01mi7hh92nc7jaxkfrpz7j0ci78djrhgmq0im4k1270mwmvr0yzj"))))
+ (arguments
+ (list #:tests? #f))
+ (build-system linux-module-build-system)
+ (home-page "https://github.com/mtorromeo/r8168")
+ (synopsis "Linux driver for Realtek PCIe network adapters")
+ (description
+ "Linux driver for Realtek PCIe network adapters. If the r8169 kernel module is
+giving you trouble, you can try this module.")
+ (license gpl2)))
+
(define broadcom-sta-version "6.30.223.271")
+(define (broadcom-sta-patch name commit hash)
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://raw.githubusercontent.com/NixOS/nixpkgs/"
+ commit
+ "/pkgs/os-specific/linux/broadcom-sta/"
+ name
+ ".patch"))
+ (sha256
+ (base32
+ hash))))
+
(define broadcom-sta-x86_64-source
(origin
(method url-fetch/tarbomb)
@@ -613,29 +986,30 @@ network adapters.")
(string-replace-substring broadcom-sta-version "." "_")
".tar.gz"))
(patches
- (parameterize
- ((%patch-path
- (map (lambda (directory)
- (string-append directory "/nongnu/packages/patches"))
- %load-path)))
- ;; https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/broadcom-sta
- ;; https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/broadcom-wl-dkms
- (search-patches "broadcom-sta-gcc.patch"
- "broadcom-sta-license.patch"
- "broadcom-sta-null-pointer-fix.patch"
- "broadcom-sta-rdtscl.patch"
- "broadcom-sta-linux-4.7.patch"
- "broadcom-sta-linux-4.8.patch"
- "broadcom-sta-debian-fix-kernel-warnings.patch"
- "broadcom-sta-linux-4.11.patch"
- "broadcom-sta-linux-4.12.patch"
- "broadcom-sta-linux-4.15.patch"
- "broadcom-sta-fix_mac_profile_discrepancy.patch"
- "broadcom-sta-linux-5.1.patch"
- ;; source: https://github.com/NixOS/nixpkgs/commit/8ce65087c333097ab714d23800b69fc471ec48ca
- "broadcom-sta-linux-5.6.patch"
- "broadcom-sta-linux-5.9.patch"
- "broadcom-sta-linux-5.10.patch")))
+ ;; Keep these in sync with the list at
+ ;; https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/broadcom-sta.
+ ;; Nixpkgs is good about keeping broadcom patches up to date so updating
+ ;; for a new kernel release should be as simple as chaging the commit to
+ ;; the newest available and adding any new patches.
+ (let ((commit "355042e2ff5933b245e804c5eaff4ec3f340e71b"))
+ (list
+ (broadcom-sta-patch "i686-build-failure" commit "1522w2gb698svlkb2b4lijbd740agvs2ibpz4g0jlv8v31cybkf4")
+ (broadcom-sta-patch "license" commit "0rwlhafcmpp97cknqwv8gwf8sbxgqavgci1ywfkdxiylh4mhcvhr")
+ (broadcom-sta-patch "linux-4.7" commit "1nn1p6j77s9zfpxy5gl6qg1kha45pc7ww0yfkn5dmhazi288wamf")
+ (broadcom-sta-patch "linux-4.8" commit "0bjx4ayi30jbdm3sh38p52d6dnb3c44mqzqi8g51hhbn1kghkmq9")
+ (broadcom-sta-patch "linux-4.11" commit "1s3n87v9cn3qicd5v4wzj20psl4gcn1ghz0fnsq60n05rriicywp")
+ (broadcom-sta-patch "linux-4.12" commit "1kj7sfnw9hxjxzqm48565vniq7fkhapaqadfpw6l9bcnpf53xld3")
+ (broadcom-sta-patch "linux-4.15" commit "0bvk7nrvqa066dpn6vvb6x00yrxa37iqv87135kay9mllmkjd70b")
+ (broadcom-sta-patch "linux-5.1" commit "1kykpzhs19dwww6grav3qxsd28kn8y84i4b4csx2y5m2j629ncn0")
+ (broadcom-sta-patch "linux-5.6" commit "0v1jkaf60jgjkrjfcmx1gin4b65cdv39glqy7l3cswkmzb60lz4l")
+ (broadcom-sta-patch "linux-5.9" commit "1sgmbaahydk4j3i1jf8q1fz3a210fmakrpz0w1n9v3dcn23ladah")
+ (broadcom-sta-patch "linux-5.17" commit "1qsllvykhs3nvjwv8d6bgsm2sc9a1lxf8yqf6fa99p60ggd253ps")
+ (broadcom-sta-patch "linux-5.18" commit "1img0a0vqnkmq4c21aywq2ajyigzcfhbbpg1hw9nx7cbj9hf6d0l")
+ (broadcom-sta-patch "linux-6.0" commit "0rv74j5giafzl19f01yvfa5rgvsdvcimxzhks2fp44wpnxq241nb")
+ (broadcom-sta-patch "linux-6.1" commit "1pvx1h7iimcbfqdc13n1980ngxk9q6iyip8svn293x4h7jn472kf")
+ (broadcom-sta-patch "pedantic-fix" commit "1kxmw1iyxnfwad75h981sak5qk16p81xy1f2qxss2d0v97vkfkl5")
+ (broadcom-sta-patch "null-pointer-fix" commit "15c2vxgf7v5wy4s8w9jk7irf3fxxghy05gxmav1ss73a2azajdx7")
+ (broadcom-sta-patch "gcc" commit "0jcqk2vapyy2pbsjv9n8b3qp6vqz17d6s07cr04cx7075q7yhz5h"))))
(sha256
(base32
"1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz"))))
@@ -661,7 +1035,7 @@ network adapters.")
(_ broadcom-sta-i686-source)))
(build-system linux-module-build-system)
(arguments
- `(#:linux ,linux-lts
+ `(#:linux ,linux
#:tests? #f))
(supported-systems '("i686-linux" "x86_64-linux"))
(home-page "https://www.broadcom.com/support/802.11")
@@ -682,10 +1056,7 @@ Linux device driver for the following chipsets:
@item BCM4331
@item BCM4352
@item BCM4360
-@end itemize
-
-It is recommended that anyone who uses this package stays with Linux LTS
-releases.")
+@end itemize")
(license (nonfree "https://www.broadcom.com/support/802.11"))))
(define-public broadcom-bt-firmware
@@ -780,10 +1151,44 @@ chipsets from Broadcom:
"/b60fa04881bf8f9b9d578f57d1dfa596cae2a82e"
"/LICENSE.broadcom_bcm20702")))))
+(define-public facetimehd
+ (package
+ (name "facetimehd")
+ (version "0.6.8")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/patjak/facetimehd")
+ (commit version)))
+ (file-name (git-file-name "facetimehd" version))
+ (sha256
+ (base32
+ "1g0ky9w5klkjndf30mjymq78r6yls9gri9x702nn8qkmgkjbqdsg"))))
+ (build-system linux-module-build-system)
+ (arguments
+ '(#:tests? #f))
+ (synopsis "Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam")
+ (description "Linux driver for the FacetimeHD webcam. According to Apple the
+following models contain a Facetime HD camera and should be compatible with this
+driver:
+@itemize
+@item iMac (21,5\", since mid 2011)
+@item iMac (27\", since mid 2011)
+@item MacBook Air (since mid 2011)
+@item MacBook Pro (15\", since early 2011)
+@item MacBook Pro (17\", since early 2011)
+@item MacBook Pro (13\", since early 2011)
+@item Thunderbolt display
+@end itemize")
+ (home-page "https://github.com/patjak/facetimehd")
+ (license gpl2)
+ (supported-systems '("i686-linux" "x86_64-linux"))))
+
(define-public intel-microcode
(package
(name "intel-microcode")
- (version "20220809")
+ (version "20231114")
(source
(origin
(method git-fetch)
@@ -794,15 +1199,15 @@ chipsets from Broadcom:
(commit (string-append "microcode-" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0252ig6lp39rh87zgiadsmlwjwjr6q0275k5j28rpbq6f108pjxx"))))
+ (base32 "07c7hkwpvb9056s73s55sg04cxr1d9n1sd9r1g7sm3gh70yc17ki"))))
(build-system copy-build-system)
(arguments
- `(#:install-plan
- (let ((doc (string-append "share/doc/" ,name "-" ,version "/")))
- `(("intel-ucode" "lib/firmware/")
- ("README.md" ,doc)
- ("releasenote.md" ,doc)
- ("security.md" ,doc)))))
+ (list #:install-plan
+ #~(let ((doc (string-append "share/doc/" #$name "-" #$version "/")))
+ `(("intel-ucode" "lib/firmware/")
+ ("README.md" ,doc)
+ ("releasenote.md" ,doc)
+ ("security.md" ,doc)))))
(home-page
"https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files")
(synopsis "Processor microcode firmware for Intel CPUs")
@@ -836,16 +1241,15 @@ documented in the respective processor revision guides.")
(define-public sof-firmware
(package
(name "sof-firmware")
- (version "1.7")
+ (version "2.2.6")
(source
(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/thesofproject/sof-bin")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
+ (method url-fetch)
+ (uri (string-append "https://github.com/thesofproject/sof-bin/releases/download/v"
+ version "/sof-bin-v" version ".tar.gz"))
(sha256
- (base32 "1fb4rxgg3haxqg2gcm89g7af6v0a0h83c1ar2fyfa8h8pcf7hik7"))))
+ (base32
+ "018901g5hshrqf2d0rn7yhzxcy4gmdc4v6167df880kdcfkw48lk"))))
(build-system copy-build-system)
(arguments
`(#:install-plan