summaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-12 20:48:11 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-29 22:01:23 -0400
commit4114060cd0ca2188de525436ea56ecea22ab40a8 (patch)
tree113ab530140a1f03f061145338e482af27fd3991 /gnu/packages/linux.scm
parentc3566fccb6fa25b70bf2e78fafe71f9048a6a719 (diff)
downloadguix-patches-4114060cd0ca2188de525436ea56ecea22ab40a8.tar
guix-patches-4114060cd0ca2188de525436ea56ecea22ab40a8.tar.gz
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 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm24
1 files changed, 12 insertions, 12 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d061935c8c..fca309e73e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -852,7 +852,7 @@ ARCH and optionally VARIANT, or #f if there is no such configuration."
(config (search-auxiliary-file file)))
(and config (local-file config))))
-(define %default-extra-linux-options
+(define (default-extra-linux-options version)
`(;; Make the kernel config available at /proc/config.gz
("CONFIG_IKCONFIG" . #t)
("CONFIG_IKCONFIG_PROC" . #t)
@@ -965,7 +965,7 @@ ARCH and optionally VARIANT, or #f if there is no such configuration."
;; for an example.
(configuration-file #f)
(defconfig "defconfig")
- (extra-options %default-extra-linux-options)
+ (extra-options (default-extra-linux-options version))
(patches
`(,%boot-logo-patch
,@(if (apply-infodoc-patch? version)
@@ -991,7 +991,7 @@ 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))
+ (extra-options (default-extra-linux-options version)))
(package
(name (if extra-version
(string-append "linux-libre-" extra-version)
@@ -1243,7 +1243,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
(append
`(;; needed to fix the RTC on rockchip platforms
("CONFIG_RTC_DRV_RK808" . #t))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-version))))
(define-public linux-libre-arm-generic-5.10
(make-linux-libre* linux-libre-5.10-version
@@ -1256,7 +1256,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
(append
`(;; needed to fix the RTC on rockchip platforms
("CONFIG_RTC_DRV_RK808" . #t))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-5.10-version))))
(define-public linux-libre-arm-generic-5.4
(make-linux-libre* linux-libre-5.4-version
@@ -1269,7 +1269,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
(append
`(;; needed to fix the RTC on rockchip platforms
("CONFIG_RTC_DRV_RK808" . #t))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-5.4-version))))
(define-public linux-libre-arm-generic-4.19
(make-linux-libre* linux-libre-4.19-version
@@ -1321,7 +1321,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
("CONFIG_BATTERY_CW2015" . m)
("CONFIG_CHARGER_GPIO" . m)
("CONFIG_SND_SOC_ES8316" . m))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-version))))
(define-public linux-libre-arm64-generic-5.10
(make-linux-libre* linux-libre-5.10-version
@@ -1347,7 +1347,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
("CONFIG_BATTERY_CW2015" . m)
("CONFIG_CHARGER_GPIO" . m)
("CONFIG_SND_SOC_ES8316" . m))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-5.10-version))))
(define-public linux-libre-arm64-generic-5.4
(make-linux-libre* linux-libre-5.4-version
@@ -1360,7 +1360,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
(append
`(;; needed to fix the RTC on rockchip platforms
("CONFIG_RTC_DRV_RK808" . #t))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-5.4-version))))
(define-public linux-libre-riscv64-generic
(make-linux-libre* linux-libre-version
@@ -1384,7 +1384,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
("CONFIG_HW_RANDOM_VIRTIO" . m)
("CONFIG_VIRTIO_CONSOLE" . m)
("CONFIG_CRYPTO_XTS" . m))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-version))))
(define-public linux-libre-mips64el-fuloong2e
(make-linux-libre* linux-libre-version
@@ -1396,7 +1396,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
#:extra-options
(append
`(("CONFIG_OVERLAY_FS" . m))
- %default-extra-linux-options)))
+ (default-extra-linux-options linux-libre-version))))
(define-public linux-libre-with-bpf
(let ((base-linux-libre
@@ -1410,7 +1410,7 @@ Linux kernel. It has been modified to remove all non-free binary blobs.")
#:configuration-file kernel-config
#:extra-options
(append %bpf-extra-linux-options
- %default-extra-linux-options))))
+ (default-extra-linux-options linux-libre-6.8-version)))))
(package
(inherit base-linux-libre)
(inputs (modify-inputs (package-inputs base-linux-libre)