[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/10: gnu: make-linux-libre: Add extra-options parameter.
From: |
David Craven |
Subject: |
02/10: gnu: make-linux-libre: Add extra-options parameter. |
Date: |
Tue, 13 Sep 2016 19:03:11 +0000 (UTC) |
dvc pushed a commit to branch master
in repository guix.
commit 90c18c321e579992a8f4961dd280d8c04f1ea3c2
Author: David Craven <address@hidden>
Date: Thu Sep 8 16:47:52 2016 +0200
gnu: make-linux-libre: Add extra-options parameter.
* gnu/packages/linux.scm (linux-libre): Use
%default-extra-linux-options.
(config->string, %default-extra-linux-options): New variables.
---
gnu/packages/linux.scm | 45 ++++++++++++++++++++++++++++++---------------
1 file changed, 30 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d4946af..1cf80cf 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -247,12 +247,38 @@ for ARCH and optionally VARIANT, or #f if there is no
such configuration."
(file (string-append "gnu/packages/" name)))
(if file-exists? (search-path %load-path file) #f)))
+(define %default-extra-linux-options
+ `(("CONFIG_NET_9P" . m)
+ ("CONFIG_NET_9P_VIRTIO" . m)
+ ("CONFIG_VIRTIO_BLK" . m)
+ ("CONFIG_VIRTIO_NET" . m)
+ ;; https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
+ ("CONFIG_DEVPTS_MULTIPLE_INSTANCES" . #t)
+ ("CONFIG_VIRTIO_PCI" . m)
+ ("CONFIG_VIRTIO_BALLOON" . m)
+ ("CONFIG_VIRTIO_MMIO" . m)
+ ("CONFIG_FUSE_FS" . m)
+ ("CONFIG_CIFS" . m)
+ ("CONFIG_9P_FS" . m)))
+
+(define (config->string options)
+ (string-join (map (match-lambda
+ ((option . 'm)
+ (string-append option "=m"))
+ ((option . #t)
+ (string-append option "=y"))
+ ((option . #f)
+ (string-append option "=n")))
+ options)
+ "\n"))
+
(define* (make-linux-libre version hash
#:key
;; A function that takes an arch and a variant.
;; See kernel-config for an example.
(configuration-file #f)
- (defconfig "defconfig"))
+ (defconfig "defconfig")
+ (extra-options %default-extra-linux-options))
(package
(name "linux-libre")
(version version)
@@ -314,20 +340,9 @@ for ARCH and optionally VARIANT, or #f if there is no such
configuration."
;; Appending works even when the option wasn't in the
;; file. The last one prevails if duplicated.
- (let ((port (open-file ".config" "a")))
- (display (string-append "CONFIG_NET_9P=m\n"
- "CONFIG_NET_9P_VIRTIO=m\n"
- "CONFIG_VIRTIO_BLK=m\n"
- "CONFIG_VIRTIO_NET=m\n"
- ;;
https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00039.html
- "CONFIG_DEVPTS_MULTIPLE_INSTANCES=y\n"
- "CONFIG_VIRTIO_PCI=m\n"
- "CONFIG_VIRTIO_BALLOON=m\n"
- "CONFIG_VIRTIO_MMIO=m\n"
- "CONFIG_FUSE_FS=m\n"
- "CONFIG_CIFS=m\n"
- "CONFIG_9P_FS=m\n")
- port)
+ (let ((port (open-file ".config" "a"))
+ (extra-configuration ,(config->string extra-options)))
+ (display extra-configuration port)
(close-port port))
(zero? (system* "make" "oldconfig")))))
- branch master updated (0a1d859 -> 035d359), David Craven, 2016/09/13
- 03/10: gnu: make-linux-libre: Add extra-version parameter., David Craven, 2016/09/13
- 04/10: gnu: make-linux-libre: Add zImage to output., David Craven, 2016/09/13
- 05/10: gnu: make-linux-libre: Add supported-systems parameter., David Craven, 2016/09/13
- 06/10: gnu: linux-libre: Use kmod., David Craven, 2016/09/13
- 01/10: gnu: Use make-linux-libre., David Craven, 2016/09/13
- 08/10: gnu: Add linux-libre-beagle-bone-black., David Craven, 2016/09/13
- 07/10: gnu: Add linux-libre-arm-generic., David Craven, 2016/09/13
- 09/10: gnu: libnfsidmap: Move to (gnu packages linux)., David Craven, 2016/09/13
- 02/10: gnu: make-linux-libre: Add extra-options parameter.,
David Craven <=
- 10/10: gnu: module-init-tools: Move to (gnu packages linux)., David Craven, 2016/09/13