diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-05-12 20:48:11 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2024-05-29 22:01:23 -0400 |
commit | 4114060cd0ca2188de525436ea56ecea22ab40a8 (patch) | |
tree | 113ab530140a1f03f061145338e482af27fd3991 /doc/guix-cookbook.texi | |
parent | c3566fccb6fa25b70bf2e78fafe71f9048a6a719 (diff) |
gnu: linux: Turn %default-extra-linux-options into a procedure.
This is to allow version-specific options to the list of defaults.
* gnu/packages/linux.scm (%default-extra-linux-options): Transform to...
(default-extra-linux-options): ... this procedure, which accepts a 'version'
argument.
(make-linux-libre, linux-libre-arm-generic, linux-libre-arm-generic-5.10)
(linux-libre-arm-generic-5.4, linux-libre-arm64-generic)
(linux-libre-arm64-generic-5.10, linux-libre-arm64-generic-5.4)
(linux-libre-riscv64-generic, linux-libre-mips64el-fuloong2e)
(linux-libre-with-bpf): Adjust accordingly.
* doc/guix-cookbook.texi (Customizing the Kernel): Adjust accordingly.
Change-Id: Ifd3be8b7ed8699bada224a938dbc84205366ff3d
Diffstat (limited to 'doc/guix-cookbook.texi')
-rw-r--r-- | doc/guix-cookbook.texi | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 93874489c2..dd30483436 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1682,7 +1682,7 @@ creates a package. ;; See kernel-config for an example. (configuration-file #f) (defconfig "defconfig") - (extra-options %default-extra-linux-options)) + (extra-options (default-extra-linux-options version))) ...) @end lisp @@ -1750,7 +1750,7 @@ The second way to create a custom kernel is to pass a new value to the it: @lisp -(define %default-extra-linux-options +(define (default-extra-linux-options version) `(;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #true) ;; Modules required for initrd: @@ -1800,7 +1800,7 @@ custom kernel: %file-systems %efi-support %emulation - (@@@@ (gnu packages linux) %default-extra-linux-options))) + ((@@@@ (gnu packages linux) default-extra-linux-options) version))) (define-public linux-libre-macbook41 ;; XXX: Access the internal 'make-linux-libre*' procedure, which is @@ -1814,11 +1814,12 @@ custom kernel: #:extra-options %macbook41-config-options)) @end lisp -In the above example @code{%file-systems} is a collection of flags enabling -different file system support, @code{%efi-support} enables EFI support and -@code{%emulation} enables a x86_64-linux machine to act in 32-bit mode also. -@code{%default-extra-linux-options} are the ones quoted above, which had to be -added in since they were replaced in the @code{extra-options} keyword. +In the above example @code{%file-systems} is a collection of flags +enabling different file system support, @code{%efi-support} enables EFI +support and @code{%emulation} enables a x86_64-linux machine to act in +32-bit mode also. The @code{default-extra-linux-options} procedure is +the one defined above, which had to be used to avoid loosing the default +configuration options of the @code{extra-options} keyword. This all sounds like it should be doable, but how does one even know which modules are required for a particular system? Two places that can be helpful |