unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: linux-libre: Make configuration more robust.
@ 2014-04-06 15:51 Alírio Eyng
  2014-04-06 19:47 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Alírio Eyng @ 2014-04-06 15:51 UTC (permalink / raw)
  To: guix-devel

"enabling additional modules...": for search it is just a few lines
after "starting phase `build'" and it would need change when options
not enabling modules are added.
For my next patch, I will add compatibility to my hardware. I don't
think splitting in vm and hardware kernel is useful, WDYT?

From 2cdd7ac96bcf89bfe98de1d8f966c3a307ef3de3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C3=ADrio=20Eyng?= <alirioeyng@gmail.com>
Date: Sun, 6 Apr 2014 15:37:33 +0000
Subject: [PATCH] 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.
---
 gnu/packages/linux.scm | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 21daf0b..f927aac 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 doesn't was in
+                      ;; the file. The last 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))

-- 
1.8.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: linux-libre: Make configuration more robust.
  2014-04-06 15:51 [PATCH] gnu: linux-libre: Make configuration more robust Alírio Eyng
@ 2014-04-06 19:47 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-04-06 19:47 UTC (permalink / raw)
  To: Alírio Eyng; +Cc: guix-devel

Alírio Eyng <alirioeyng@gmail.com> skribis:

> For my next patch, I will add compatibility to my hardware. I don't
> think splitting in vm and hardware kernel is useful, WDYT?

No, I think it’s better to keep just one, covering a wide range of uses.

> From 2cdd7ac96bcf89bfe98de1d8f966c3a307ef3de3 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Al=C3=ADrio=20Eyng?= <alirioeyng@gmail.com>
> Date: Sun, 6 Apr 2014 15:37:33 +0000
> Subject: [PATCH] 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.

Applied, with:

> +                      ;; Appending works even when the option doesn't was in
> +                      ;; the file. The last prevails if duplicated.

... typo fixed.

Thanks, and welcome! :-)

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-06 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-06 15:51 [PATCH] gnu: linux-libre: Make configuration more robust Alírio Eyng
2014-04-06 19:47 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).