From: "Ludovic Courtès" <ludo@gnu.org>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 35110@debbugs.gnu.org
Subject: [bug#35110] [PATCH 1/3] gnu: Add make-linux-module.
Date: Thu, 04 Apr 2019 09:48:34 +0200 [thread overview]
Message-ID: <87ef6ius6l.fsf@gnu.org> (raw)
In-Reply-To: <20190403224823.66d25e12@scratchpost.org> (Danny Milosavljevic's message of "Wed, 3 Apr 2019 22:48:23 +0200")
Hi Danny,
Danny Milosavljevic <dannym@scratchpost.org> skribis:
> On Wed, 03 Apr 2019 22:16:07 +0200
> Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Would it make sense to turn it into a ‘linux-module-build-system’?
>
> I started on it but haven't finished it yet.
>
>>That would avoid having to create a package object that cannot be built, just
>
> It can be built, it's just not very useful standalone because it only contains
> the source code and a few build artifacts (only the ones required to start
> building a module). On the other hand it can be substituted and that's nice
> (if we can cut down the source code a lot, that is).
Can it be built (I’m talking about the ‘vhba-module’ package that you
sent)? I’d expect it to look for the Linux makefile snippet and to fail
at that point, no?
> I don't understand how a build system would enable us to remove this step.
> (If it can, that's cool!)
We’d directly write:
(define-public vhba-module
(package
(name "vhba-module")
;; …
(build-system linux-module-build-system))
and that would abstract away the choice of dependencies (linux-libre,
kmod, GCC) and the set of build phases.
>> > +;; FIXME: Remove CONFIG_MODULE_SRCVERSION_ALL=y from our configs.
>>
>> What does that flag do?
>
> It adds a field "srcversion" to the ELF file of the module which is a hash of
> all the source files used to build it.
>
> Instead of removing it, we can also merge bug# 35111 instead and use that.
>
> Otherwise, the problem is that if CONFIG_MODULE_SRCVERSION_ALL is set and
> bug# 35111 not merged, one cannot build standalone modules because those
> would require the file "Module.symvers" of the completely built kernel
> to be available.
>
> Linux would also write a new file "Module.symvers" in the MODPOST step of
> the build of the module.
OK. Sounds like we should merge #35111 then.
> For example, the lowest maintenance overhead would be to somehow have
> most of linux-libre's phases be injected into the module package and have
> both build in one build environment. I.e. the module would have a package
> which would actually have phases 'unpack 'prepare-linux 'build 'check 'install
> where all the phases except for 'prepare-linux would be module-specific and
> 'prepare-linux would unpack the linux source and do everything just
> like the linux-libre package would have done, up until the 'build phase.
> It turned out that's too complicated to get to work for me for now.
What about factorizing these phases in a new (guix build
linux-module-build-system) module, which would export them as
‘%standard-phases’? Then packages using ‘linux-module-build-system’
would use these phases by default, like we do for the other build
systems.
Does that make sense?
Thank you,
Ludo’.
next prev parent reply other threads:[~2019-04-04 7:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 19:27 [bug#35110] [PATCH 0/3] Add support for loadable modules Danny Milosavljevic
2019-04-02 19:28 ` [bug#35110] [PATCH 1/3] gnu: Add make-linux-module Danny Milosavljevic
2019-04-02 19:28 ` [bug#35110] [PATCH 2/3] gnu: Add vhba-module-linux-libre Danny Milosavljevic
2019-04-02 21:51 ` Pierre Neidhardt
2019-04-02 22:36 ` Danny Milosavljevic
2019-04-03 6:48 ` Pierre Neidhardt
2019-04-02 19:28 ` [bug#35110] [PATCH 3/3] gnu: linux-libre: Disable module versioning Danny Milosavljevic
2019-04-03 20:16 ` [bug#35110] [PATCH 1/3] gnu: Add make-linux-module Ludovic Courtès
2019-04-03 20:48 ` Danny Milosavljevic
2019-04-04 7:48 ` Ludovic Courtès [this message]
2019-04-05 11:05 ` [bug#35110] [PATCH v2 0/2] Add support for loadable modules Danny Milosavljevic
2019-04-05 11:05 ` [bug#35110] [PATCH v2 1/2] Add (guix build-system linux-module) Danny Milosavljevic
2019-04-11 10:50 ` Ludovic Courtès
2019-04-11 15:53 ` bug#35110: " Danny Milosavljevic
2019-04-05 11:05 ` [bug#35110] [PATCH v2 2/2] gnu: Add vhba-module Danny Milosavljevic
2019-04-11 10:51 ` Ludovic Courtès
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ef6ius6l.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=35110@debbugs.gnu.org \
--cc=dannym@scratchpost.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.