help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable modules in Linux configuration.


From: Marius Bakke
Subject: Re: Enable modules in Linux configuration.
Date: Mon, 31 Jul 2017 23:39:14 +0200
User-agent: Notmuch/0.25 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu)

Dmitry Nikolaev <address@hidden> writes:

> But it looks too complex for me. Is there an easier way to enable
> additional modules in Linux configuration? Shouldn't I use "extra-options"
> in make-linux-libre function? How could I do that?

I suppose we could export the various Linux-Libre variables so that the
following (untested) would work:

--8<---------------cut here---------------start------------->8---
(use-package-modules linux)
(operating-system
  (kernel
    (make-linux-libre %linux-libre-version %linux-libre-hash
                      %intel-compatible-systems
                      #:extra-options
                      (cons ("CONFIG_REISER4" . m)
                            %default-extra-linux-options)
--8<---------------cut here---------------start------------->8---

It would be a convenient way to add custom options and patches without
maintaing a full-blown kernel configuration on the side.

Just to cover all bases, here's what I do today for a custom
kernel configuration file next to a GuixSD 'config.scm':
 
--8<---------------cut here---------------end--------------->8---
(define-module (my packages)
  #:use-module (gnu packages linux))

(define kernel-config
  (string-append (dirname (current-filename)) "/kernel.config"))

(define-public my-kernel
  (package
    (inherit linux-libre)
    (native-inputs
     `(("kconfig" ,kernel-config)
       ,@(alist-delete "kconfig"
                       (package-native-inputs linux-libre))))))

(use-modules (my packages))
(operating-system
  [...]
  (kernel my-kernel)
--8<---------------cut here---------------end--------------->8---

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]