unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Loading modules built using linux-module-build-system
Date: Thu, 14 Nov 2019 17:31:43 +0100	[thread overview]
Message-ID: <20191114173143.6924e46e@scratchpost.org> (raw)
In-Reply-To: <87k18x3r3g.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]

Hi Ludo,

On Tue, 22 Oct 2019 14:24:51 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

> I’m wondering if we could avoid clobbering the global profile with the
> kernel and module packages, though (as is currently the case.)

Sounds good.

> >  (define* (operating-system-profile os)
> >    "Return a derivation that builds the system profile of OS."
> >    (mlet* %store-monad
> > -      ((services -> (operating-system-services os))
> > -       (profile (fold-services services
> > -                               #:target-type profile-service-type)))
> > +      ((kernel -> (operating-system-kernel os))
> > +       (services -> (operating-system-services os))
> > +       (profile (cons kernel (fold-services services
> > +                                            #:target-type
> > +                                            profile-service-type))))
> >      (match profile
> >        (("profile" profile)
> >         (return profile)))))  
> 
> The value of ‘profile’ above can never match this pattern, or am I
> missing something?

Ahhhhh!  Now I see it.

> Besides, I wonder how much is missing from (gnu build linux-modules) to
> do this without resorting to kmod.  :-)

True :)

> Maybe we should not add this hook by default, to avoid overhead for a
> very unusual use case.  The caller of ‘profile-derivation’ could add it
> when needed.

I think the eventual overhead of it is minimal because it can just check
whether "lib/modules" is anywhere in the source and if not, skip everything.

> Thinking more about it, what about handling the union/profile thing in
> ‘operating-system-directory-base-entries’?  We could still use
> ‘profile-derivation’ with the hook you wrote, but we’d be able to keep
> that here instead of adding it to (guix profiles).

Should we just change out the "kernel" entry to be the union?  After all,
that's what actually happens at runtime as far as the Linux kernel is
concerned.

> Also, if we take that route, we would probably need a
> ‘linux-module-packages’ field in <operating-system>.

Or make the `kernel` field a list, including linux-libre ;-)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-11-14 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 22:50 Loading modules built using linux-module-build-system Jelle Licht
2019-10-21 15:30 ` Jelle Licht
2019-10-21 18:27 ` Danny Milosavljevic
2019-10-21 18:49   ` Danny Milosavljevic
2019-10-21 21:39     ` Danny Milosavljevic
2019-10-22 12:24       ` Ludovic Courtès
2019-11-14 16:31         ` Danny Milosavljevic [this message]
2019-11-17 20:35           ` Ludovic Courtès
2019-12-22 20:06             ` Danny Milosavljevic
2019-12-30 18:55               ` Ludovic Courtès
2019-10-22  6:52     ` Giovanni Biscuolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114173143.6924e46e@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).