summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <[email protected]>2022-12-12 09:02:49 -0500
committerMaxim Cournoyer <[email protected]>2022-12-12 09:02:49 -0500
commitf184be73defd62f46a14dbdb96df3fa61806f3be (patch)
tree842b127645c7a3f5ef6383262a3358a3340e4cda /gnu/packages/linux.scm
parentc9974889ef69fbe6199a9bb1cb2fa5a594130114 (diff)
parent94e9651241b3e827531779717952d386535801f3 (diff)
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm348
1 files changed, 186 insertions, 162 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 75f38a923a..d88f47c167 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -68,6 +68,7 @@
;;; Copyright © 2022 Hunter Jozwiak <[email protected]>
;;; Copyright © 2022 Hilton Chain <[email protected]>
;;; Copyright © 2022 Stefan <[email protected]>
+;;; Copyright © 2022 Demis Balbach <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -194,6 +195,104 @@
#:export (customize-linux
make-defconfig))
+
+
+;;;
+;;; Linux kernel customization functions.
+;;;
+
+(define* (customize-linux #:key name
+ (linux linux-libre)
+ source
+ defconfig
+ (configs "")
+ extra-version)
+ "Make a customized Linux package NAME derived from the LINUX package.
+
+If NAME is not given, then it defaults to the same name as the LINUX package.
+
+Unless SOURCE is given the source of LINUX is used.
+
+A DEFCONFIG file to be used can be given as an origin, as a file-like object
+(file-append, local-file etc.), or as a string with the name of a defconfig file
+available in the Linux sources. If DEFCONFIG is not given, then a defconfig
+file will be saved from the LINUX package configuration.
+
+Additional CONFIGS will be used to modify the given or saved defconfig, which
+will finally be used to build Linux.
+
+CONFIGS can be a list of strings, with one configuration per line. The usual
+defconfig syntax has to be used, but there is a special extension to ease the
+removal of configurations. Comment lines are supported as well.
+
+Here is an example:
+
+ '(;; This string defines the version tail in 'uname -r'.
+ \"CONFIG_LOCALVERSION=\\\"-handcrafted\\\"
+ ;; This '# CONFIG_... is not set' syntax has to match exactly!
+ \"# CONFIG_BOOT_CONFIG is not set\"
+ \"CONFIG_NFS_SWAP=y\"
+ ;; This is a multiline configuration:
+ \"CONFIG_E1000=y
+# This is a comment, below follows an extension to unset a configuration:
+CONFIG_CMDLINE_EXTEND\")
+
+A string of configurations instead of a list of configuration strings is also
+possible.
+
+EXTRA-VERSION can be a string overwriting the EXTRAVERSION setting of the LINUX
+package, after being prepended by a hyphen. It will be visible in the output
+of 'uname -r' behind the Linux version numbers."
+ (package
+ (inherit linux)
+ (name (or name (package-name linux)))
+ (source (or source (package-source linux)))
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments linux)
+ ((#:imported-modules imported-modules %gnu-build-system-modules)
+ `((guix build kconfig) ,@imported-modules))
+ ((#:modules modules)
+ `((guix build kconfig) ,@modules))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'configure
+ (lambda* (#:key inputs #:allow-other-keys #:rest arguments)
+ (setenv "EXTRAVERSION"
+ #$(and extra-version
+ (not (string-null? extra-version))
+ (string-append "-" extra-version)))
+ (let* ((configs (string-append "arch/" #$(linux-srcarch)
+ "/configs/"))
+ (guix_defconfig (string-append configs
+ "guix_defconfig")))
+ #$(cond
+ ((not defconfig)
+ #~(begin
+ ;; Call the original 'configure phase.
+ (apply (assoc-ref #$phases 'configure) arguments)
+ ;; Save a defconfig file.
+ (invoke "make" "savedefconfig")
+ ;; Move the saved defconfig to the proper location.
+ (rename-file "defconfig"
+ guix_defconfig)))
+ ((string? defconfig)
+ ;; Use another existing defconfig from the Linux sources.
+ #~(rename-file (string-append configs #$defconfig)
+ guix_defconfig))
+ (else
+ ;; Copy the defconfig input to the proper location.
+ #~(copy-file #$defconfig guix_defconfig)))
+ (chmod guix_defconfig #o644)
+ (modify-defconfig guix_defconfig '#$configs)
+ (invoke "make" "guix_defconfig")
+ (verify-config ".config" guix_defconfig))))))))))
+
+(define (make-defconfig uri sha256-as-base32)
+ (origin (method url-fetch)
+ (uri uri)
+ (sha256 (base32 sha256-as-base32))))
+
(define (linux-srcarch)
"Return the linux SRCARCH name, which is set in the toplevel Makefile of
Linux and denotes the architecture-specific directory name below arch/ in its
@@ -378,17 +477,17 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
;; The current "stable" kernels. That is, the most recently released major
;; versions that are still supported upstream.
-(define-public linux-libre-6.0-version "6.0.10")
+(define-public linux-libre-6.0-version "6.0.12")
(define-public linux-libre-6.0-gnu-revision "gnu")
(define deblob-scripts-6.0
(linux-libre-deblob-scripts
linux-libre-6.0-version
linux-libre-6.0-gnu-revision
(base32 "0iwbjrgiwch5v1xpnm9wk9zqw2v6lxja0k8yj2x0amxc9ma68176")
- (base32 "06iqxkg5hakzvmz6gcz878k1sr553zbng2j1b2whgfg7zmhxkb34")))
+ (base32 "16g2bin3xay30zfss1vlb7pwcss5giaxaksp4v1gk05wn51wjrqr")))
(define-public linux-libre-6.0-pristine-source
(let ((version linux-libre-6.0-version)
- (hash (base32 "1l0xak4w7c16cg8lhracy8r18zzdl0x5s654w6ivyw6dhk6pzr9r")))
+ (hash (base32 "00ag63lnxw2gijw3b6v29lhrlv480m12954q5zh4jawlz3nk1dw9")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-6.0)))
@@ -396,37 +495,37 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
;; The "longterm" kernels — the older releases with long-term upstream support.
;; Here are the support timelines:
;; <https://www.kernel.org/category/releases.html>
-(define-public linux-libre-5.15-version "5.15.80")
+(define-public linux-libre-5.15-version "5.15.82")
(define-public linux-libre-5.15-gnu-revision "gnu")
(define deblob-scripts-5.15
(linux-libre-deblob-scripts
linux-libre-5.15-version
linux-libre-5.15-gnu-revision
(base32 "0vj60bra81fmbx3lz924czbhxs4dmvd4d584g9mcs80b7c4q52kg")
- (base32 "0h8a48dvgxyj3v08lp99kh5pfa93r4rks78cj0j1rwz1516xk8h3")))
+ (base32 "1m73pgx8v047xb2gck2g7j7khniis8c9akn9vhzgsdfglrf8p6fj")))
(define-public linux-libre-5.15-pristine-source
(let ((version linux-libre-5.15-version)
- (hash (base32 "0kgxznd3sfbmnygjvp9dzhzg5chxlaxk6kldxmh1y0njcrj1lciv")))
+ (hash (base32 "0r8v7113favmch2x6br7jk6idihza99l9qyd7ik99i5sg6xzdvpw")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-5.15)))
-(define-public linux-libre-5.10-version "5.10.156")
+(define-public linux-libre-5.10-version "5.10.158")
(define-public linux-libre-5.10-gnu-revision "gnu1")
(define deblob-scripts-5.10
(linux-libre-deblob-scripts
linux-libre-5.10-version
linux-libre-5.10-gnu-revision
(base32 "0mw7qn77y9c6wrnw4rjvf75cpm1w6n1aqqhf8cnghcb97p2yxxrf")
- (base32 "1m9l554w6a72mq0kf7ggm44z247m2yz6zhafwqxh96qpjpcaabpj")))
+ (base32 "0a96g4pjdgwvxn2wpz6rfc8nwdlkw138r9pp66kvfrrn08i313ii")))
(define-public linux-libre-5.10-pristine-source
(let ((version linux-libre-5.10-version)
- (hash (base32 "08srjps110zi4ivzh0z2jf78ddyfj2wivdliffb2f03jr9j9k7k7")))
+ (hash (base32 "1rq7lyp41fydybs53rcdjhiy271arh95xch16s5s3jhhanxj82hy")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-5.10)))
-(define-public linux-libre-5.4-version "5.4.225")
+(define-public linux-libre-5.4-version "5.4.226")
(define-public linux-libre-5.4-gnu-revision "gnu1")
(define deblob-scripts-5.4
(linux-libre-deblob-scripts
@@ -436,12 +535,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(base32 "1bgblfkcnrabnr9hpdl07qgps57h6bq4v5pjrxs798vq43db66va")))
(define-public linux-libre-5.4-pristine-source
(let ((version linux-libre-5.4-version)
- (hash (base32 "1ak0qlxzfylgvkldh2whq4mzynh1rymhnnc1yif9a5s3f7v9dxar")))
+ (hash (base32 "0i4s1hl5q0ax55z7m5krzyw1zj9v03q8jcfksknb6qrg3lm5a7qc")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-5.4)))
-(define-public linux-libre-4.19-version "4.19.267")
+(define-public linux-libre-4.19-version "4.19.268")
(define-public linux-libre-4.19-gnu-revision "gnu1")
(define deblob-scripts-4.19
(linux-libre-deblob-scripts
@@ -451,12 +550,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(base32 "0g1yhzxm3ixfll6n630v7lddcyvf888sg114nimh0lkvzd180s99")))
(define-public linux-libre-4.19-pristine-source
(let ((version linux-libre-4.19-version)
- (hash (base32 "035yxx13jz5f5ig2r6ybzgivm8vjafgnvjws0jfzha4w6klf7r9l")))
+ (hash (base32 "0kr0di4gr6p57c8h6ybcli01kazq235npbh6qrpx0hpmqcdcx6r1")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-4.19)))
-(define-public linux-libre-4.14-version "4.14.300")
+(define-public linux-libre-4.14-version "4.14.301")
(define-public linux-libre-4.14-gnu-revision "gnu1")
(define deblob-scripts-4.14
(linux-libre-deblob-scripts
@@ -466,12 +565,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(base32 "00i91lx938nqlgy63hiricqd0fnbbf26vgya9c5lb7m1f4x324im")))
(define-public linux-libre-4.14-pristine-source
(let ((version linux-libre-4.14-version)
- (hash (base32 "047vmh09icm45g7mnmdvyj9cam7747bcpah1s7n9dm5i2j2f906y")))
+ (hash (base32 "16zrpfadsnznpl37crbq5g1hz1ch0zfp2a75yzlqy2fs0f7fxlmc")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-4.14)))
-(define-public linux-libre-4.9-version "4.9.334")
+(define-public linux-libre-4.9-version "4.9.335")
(define-public linux-libre-4.9-gnu-revision "gnu1")
(define deblob-scripts-4.9
(linux-libre-deblob-scripts
@@ -481,7 +580,7 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(base32 "0bib3641dbcqdkx3anna3caxnsg3nw9cnmhcklq0s93g3m57041h")))
(define-public linux-libre-4.9-pristine-source
(let ((version linux-libre-4.9-version)
- (hash (base32 "0sjh492mfic6llgwb957nj7gd7c0dvqnk97ngq8d50sjsyjznyk9")))
+ (hash (base32 "0agb1avdqxbmb0z751f5c4d6s7k9zb6dq04z82gx0v4zzrhxhkzd")))
(make-linux-libre-source version
(%upstream-linux-source version hash)
deblob-scripts-4.9)))
@@ -523,14 +622,12 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS."
(define-public linux-libre-5.15-source
(source-with-patches linux-libre-5.15-pristine-source
(list %boot-logo-patch
- %linux-libre-arm-export-__sync_icache_dcache-patch
- (search-patch "linux-libre-infodocs-target.patch"))))
+ %linux-libre-arm-export-__sync_icache_dcache-patch)))
(define-public linux-libre-5.10-source
(source-with-patches linux-libre-5.10-pristine-source
(list %boot-logo-patch
- %linux-libre-arm-export-__sync_icache_dcache-patch
- (search-patch "linux-libre-infodocs-target.patch"))))
+ %linux-libre-arm-export-__sync_icache_dcache-patch)))
(define-public linux-libre-5.4-source
(source-with-patches linux-libre-5.4-pristine-source
@@ -798,10 +895,9 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(configuration-file #f)
(defconfig "defconfig")
(extra-options %default-extra-linux-options)
- (build-doc? (doc-supported? version))
(patches
`(,%boot-logo-patch
- ,@(if build-doc?
+ ,@(if (doc-supported? version)
(list (search-patch
"linux-libre-infodocs-target.patch"))
'()))))
@@ -815,8 +911,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
#:extra-version extra-version
#:configuration-file configuration-file
#:defconfig defconfig
- #:extra-options extra-options
- #:build-doc? build-doc?))
+ #:extra-options extra-options))
(define* (make-linux-libre* version gnu-revision source supported-systems
#:key
@@ -825,10 +920,7 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
;; See kernel-config for an example.
(configuration-file #f)
(defconfig "defconfig")
- (extra-options %default-extra-linux-options)
- (build-doc? (doc-supported? version)))
- (when (and build-doc? (not (doc-supported? version)))
- (error "unsupported 'build-doc?' for kernels <5.10"))
+ (extra-options %default-extra-linux-options))
(package
(name (if extra-version
(string-append "linux-libre-" extra-version)
@@ -853,20 +945,6 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
(substitute* (find-files
"." "^Makefile(\\.include)?$")
(("/bin/pwd") "pwd"))))
- #$@(if build-doc?
- #~((add-before 'configure 'build-doc
- (lambda _
- (substitute* "Documentation/Makefile"
- ;; Remove problematic environment check script.
- ((".*scripts/sphinx-pre-install.*") ""))
- (invoke "make" "infodocs")))
- (add-after 'build-doc 'install-doc
- (lambda _
- (with-directory-excursion "Documentation/output"
- (invoke "make" "-C" "texinfo" "install-info"
- (string-append "infodir=" #$output
- "/share/info"))))))
- #~())
(add-before 'configure 'set-environment
(lambda* (#:key target #:allow-other-keys)
;; Avoid introducing timestamps.
@@ -966,19 +1044,6 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration."
("gmp" ,gmp)
("mpfr" ,mpfr)
("mpc" ,mpc)
-
- ;; For generating the documentation.
- ,@(if build-doc?
- ;; TODO: remove fontconfig after the 5.10 kernel is dropped.
- ;; Also replace python-wrapper by python at that time.
- `(("fontconfig" ,fontconfig)
- ("graphviz" ,graphviz)
- ("python" ,python-wrapper)
- ("python-sphinx" ,python-sphinx)
- ("texinfo" ,texinfo)
- ("which" ,which))
- '())
-
,@(match (let ((arch (platform-linux-architecture
(lookup-platform-by-target-or-system
(or (%current-target-system)
@@ -1017,6 +1082,43 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
(define-public linux-libre-source linux-libre-6.0-source)
(define-public linux-libre linux-libre-6.0)
+(define-public linux-libre-documentation
+ (package
+ (inherit linux-libre)
+ (name "linux-libre-documentation")
+ (arguments
+ (list
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (substitute* "Documentation/Makefile"
+ ;; Remove problematic environment check script.
+ ((".*scripts/sphinx-pre-install.*") ""))
+ (invoke "make" "infodocs")))
+ (replace 'install
+ (lambda _
+ (let* ((info-dir (string-append #$output "/share/info"))
+ (info (string-append info-dir
+ "/TheLinuxKernel.info.gz")))
+ (with-directory-excursion "Documentation/output"
+ (invoke "make" "-C" "texinfo" "install-info"
+ (string-append "infodir=" info-dir)))
+ ;; Create a symlink, for convenience.
+ (symlink info (string-append info-dir
+ "/linux.info.gz"))))))))
+ (native-inputs
+ (list graphviz
+ perl
+ python
+ python-sphinx
+ texinfo
+ which))
+ (synopsis "Documentation for the kernel Linux-Libre")
+ (description "This package provides the documentation for the kernel
+Linux-Libre, as an Info manual. To consult it, run @samp{info linux}.")))
+
(define-public linux-libre-5.15
(make-linux-libre* linux-libre-5.15-version
linux-libre-5.15-gnu-revision
@@ -1262,111 +1364,6 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
;;;
-;;; Linux kernel customization functions.
-;;;
-
-(define* (customize-linux #:key name
- (linux linux-libre)
- source
- defconfig
- (configs "")
- extra-version)
- "Make a customized Linux package NAME derived from the LINUX package.
-
-If NAME is not given, then it defaults to the same name as the LINUX package.
-
-Unless SOURCE is given the source of LINUX is used.
-
-A DEFCONFIG file to be used can be given as an origin, as a file-like object
-(file-append, local-file etc.), or as a string with the name of a defconfig file
-available in the Linux sources. If DEFCONFIG is not given, then a defconfig
-file will be saved from the LINUX package configuration.
-
-Additional CONFIGS will be used to modify the given or saved defconfig, which
-will finally be used to build Linux.
-
-CONFIGS can be a list of strings, with one configuration per line. The usual
-defconfig syntax has to be used, but there is a special extension to ease the
-removal of configurations. Comment lines are supported as well.
-
-Here is an example:
-
- '(;; This string defines the version tail in 'uname -r'.
- \"CONFIG_LOCALVERSION=\\\"-handcrafted\\\"
- ;; This '# CONFIG_... is not set' syntax has to match exactly!
- \"# CONFIG_BOOT_CONFIG is not set\"
- \"CONFIG_NFS_SWAP=y\"
- ;; This is a multiline configuration:
- \"CONFIG_E1000=y
-# This is a comment, below follows an extension to unset a configuration:
-CONFIG_CMDLINE_EXTEND\")
-
-A string of configurations instead of a list of configuration strings is also
-possible.
-
-EXTRA-VERSION can be a string overwriting the EXTRAVERSION setting of the LINUX
-package, after being prepended by a hyphen. It will be visible in the output
-of 'uname -r' behind the Linux version numbers."
- (package
- (inherit linux)
- (name (or name (package-name linux)))
- (source (or source (package-source linux)))
- (arguments
- (substitute-keyword-arguments
- (package-arguments linux)
- ((#:imported-modules imported-modules %gnu-build-system-modules)
- `((guix build kconfig) ,@imported-modules))
- ((#:modules modules)
- `((guix build kconfig) ,@modules))
- ((#:phases phases)
- #~(modify-phases #$phases
- (replace 'configure
- (lambda* (#:key inputs #:allow-other-keys #:rest arguments)
- (setenv "EXTRAVERSION"
- #$(and extra-version
- (not (string-null? extra-version))
- (string-append "-" extra-version)))
- (let* ((configs
- (string-append "arch/" #$(linux-srcarch) "/configs/"))
- (guix_defconfig
- (string-append configs "guix_defconfig")))
- #$(cond
- ((not defconfig)
- #~(begin
- ;; Call the original 'configure phase.
- (apply (assoc-ref #$phases 'configure) arguments)
- ;; Save a defconfig file.
- (invoke "make" "savedefconfig")
- ;; Move the saved defconfig to the proper location.
- (rename-file "defconfig"
- guix_defconfig)))
- ((string? defconfig)
- ;; Use another existing defconfig from the Linux sources.
- #~(rename-file (string-append configs #$defconfig)
- guix_defconfig))
- (else
- ;; Copy the defconfig input to the proper location.
- #~(copy-file (assoc-ref inputs "guix_defconfig")
- guix_defconfig)))
- (chmod guix_defconfig #o644)
- (modify-defconfig guix_defconfig '#$configs)
- (invoke "make" "guix_defconfig")
- (verify-config ".config" guix_defconfig))))))))
- (native-inputs
- (append (if (or (not defconfig)
- (string? defconfig))
- '()
- ;; The defconfig should be an origin or file-like object.
- `(("guix_defconfig" ,defconfig)))
- (package-native-inputs linux)))))
-
-(define (make-defconfig uri sha256-as-base32)
- (origin (method url-fetch)
- (uri uri)
- (sha256 (base32 sha256-as-base32))))
-
-
-;;;
;;; Linux kernel modules.
;;;
@@ -1531,6 +1528,33 @@ battery charging thresholds, keyboard backlight, fans and thermal monitors,
and the notification, WiFi, and Bluetooth LED.")
(license license:gpl2)))
+(define-public tuxedo-keyboard
+ (package
+ (name "tuxedo-keyboard")
+ (version "3.1.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tuxedocomputers/tuxedo-keyboard.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17n14yh55yrxx4qbx4ph9drbzx2ll4kdsfmlngrdgizhyzk7z7zv"))))
+ (build-system linux-module-build-system)
+ (arguments
+ (list #:tests? #f)) ; no test suite
+ (home-page "https://github.com/tuxedocomputers/tuxedo-keyboard")
+ (synopsis "Linux kernel modules to control keyboard on most Tuxedo computers")
+ (description
+ "This package provides the @code{tuxedo_keyboard}, @code{tuxedo_io},
+@code{clevo_wmi} @acronym{WMI, Windows Management Engine} and the
+@code{clevo_acpi} @acronym{ACPI, Advanced Configuration and Power Interface}
+kernel modules to control the keyboard on most Tuxedo computers. Only white
+backlight only models are currently not supported. The @code{tuxedo_io} module
+is also needed for the @code{tuxedo-control-center} (short tcc) package.")
+ (license license:gpl3+)))
+
(define-public ec
(package
(name "ec")
@@ -9444,7 +9468,7 @@ provides user-space tools for creating EROFS file systems.")
(sha256
(base32 "0r0339mg4rc12p63iiq2kwdqn1zjakyiv014i2a2l9s8v5rjik41"))))
(native-inputs (list autoconf automake libtool))
- (inputs (list sqlite))
+ (inputs (list perl sqlite))
(arguments
`(#:configure-flags
(list "--enable-all"