From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 08/17] gnu: make-linux-libre: Add additional-configuration parameter. Date: Sun, 11 Sep 2016 23:13:31 +0200 Message-ID: <874m5mi1hg.fsf@gnu.org> References: <20160909013641.GA9202@jasmine> <20160909123426.18499-1-david@craven.ch> <20160909123426.18499-8-david@craven.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjC4K-0001xL-51 for guix-devel@gnu.org; Sun, 11 Sep 2016 17:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjC4G-0003Cc-01 for guix-devel@gnu.org; Sun, 11 Sep 2016 17:13:39 -0400 In-Reply-To: <20160909123426.18499-8-david@craven.ch> (David Craven's message of "Fri, 9 Sep 2016 14:34:17 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel@gnu.org David Craven skribis: > * gnu/packages/linux.scm (linux-libre): Use > %default-additional-kernel-configuration. > (%default-additional-kernel-configuration): New variable. > --- > gnu/packages/linux.scm | 32 ++++++++++++++++++-------------- > 1 file changed, 18 insertions(+), 14 deletions(-) > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index ab20f6e..f629045 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -257,10 +257,26 @@ for SYSTEM and optionally VARIANT, or #f if there i= s no such configuration." > (file (string-append "gnu/packages/" name))) > (search-path %load-path file))) >=20=20 > +(define %default-additional-kernel-configuration > + (string-append "CONFIG_NET_9P=3Dm\n" > + "CONFIG_NET_9P_VIRTIO=3Dm\n" > + "CONFIG_VIRTIO_BLK=3Dm\n" > + "CONFIG_VIRTIO_NET=3Dm\n" > + ;; https://lists.gnu.org/archive/html/guix-devel/2014-0= 4/msg00039.html > + "CONFIG_DEVPTS_MULTIPLE_INSTANCES=3Dy\n" > + "CONFIG_VIRTIO_PCI=3Dm\n" > + "CONFIG_VIRTIO_BALLOON=3Dm\n" > + "CONFIG_VIRTIO_MMIO=3Dm\n" > + "CONFIG_FUSE_FS=3Dm\n" > + "CONFIG_CIFS=3Dm\n" > + "CONFIG_9P_FS=3Dm\n")) > + > (define* (make-linux-libre version hash > #:key > (configuration-file #f) > - (defconfig "defconfig")) > + (defconfig "defconfig") > + (additional-configuration > + %default-additional-kernel-configuration)) Why not, but from the rest of the patch it=E2=80=99s not clear if it=E2=80= =99s actually used, is it? If we take that route, I would suggest a more idiomatic approach, like: (define %default-extra-linux-options `(("CONFIG_NET_9P" . m) ("CONFIG_SOMETHING" . #f) ("CONFIG_SOMETHING_ELSE" . #t))) This alist could be turned into a string that can be appended to the config: (string-join (string-map (match-lambda ((option . 'm) (string-append option "=3Dm")) ((option . #t) (string-append option "=3Dy")) ((option . #f) (string-append option "=3Dn"))) options) "\n") WDYT? Ludo=E2=80=99.