aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlírio Eyng <alirioeyng@gmail.com>2014-04-06 15:51:36 +0000
committerLudovic Courtès <ludo@gnu.org>2014-04-06 21:45:20 +0200
commitc0888b3fe4311c0f8178e1a4e610308f6705f624 (patch)
tree401dd5b4d16aa8b0e805af48ba36de05b68736a3
parent574e86f9cf7a62a235f3b1cfa215b82e47bcd5a7 (diff)
downloadguix-c0888b3fe4311c0f8178e1a4e610308f6705f624.tar
guix-c0888b3fe4311c0f8178e1a4e610308f6705f624.tar.gz
gnu: linux-libre: Make configuration more robust.
* gnu/packages/linux.scm (linux-libre): Append all configuration instead of replacing. Order configuration like "make oldconfig" output. Remove useless output. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/linux.scm29
1 files changed, 11 insertions, 18 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 21daf0b06c..c9f5bbcceb 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -162,26 +162,19 @@
(let ((build (assoc-ref %standard-phases 'build)))
(and (zero? (system* "make" "defconfig"))
(begin
- (format #t "enabling additional modules...~%")
- (substitute* ".config"
- (("^# CONFIG_CIFS.*$")
- "CONFIG_CIFS=m\n")
- (("^# CONFIG_FUSE_FS.*$")
- "CONFIG_FUSE_FS=m\n")
- (("^# CONFIG_([[:graph:]]*)VIRTIO([[:graph:]]*) .*$"
- _ before after)
- (string-append "CONFIG_" before "VIRTIO"
- after "=m\n")))
-
- ;; XXX: For some reason, some virtio modules need to be
- ;; explicitly added.
+ ;; 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_VIRTIO=m\n"
- "CONFIG_NET_9P=m\n"
- "CONFIG_9P_FS=m\n"
- "CONFIG_VIRTIO_NET=m\n"
+ (display (string-append "CONFIG_NET_9P=m\n"
+ "CONFIG_NET_9P_VIRTIO=m\n"
"CONFIG_VIRTIO_BLK=m\n"
- "CONFIG_VIRTIO_BALLOON=m\n")
+ "CONFIG_VIRTIO_NET=m\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)
(close-port port))