From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBx7P-0001oa-Qi for guix-patches@gnu.org; Thu, 04 Apr 2019 03:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBx7O-0001Bm-PH for guix-patches@gnu.org; Thu, 04 Apr 2019 03:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58327) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBx7O-0001Ba-Gm for guix-patches@gnu.org; Thu, 04 Apr 2019 03:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hBx7O-0006CZ-AJ for guix-patches@gnu.org; Thu, 04 Apr 2019 03:49:02 -0400 Subject: [bug#35110] [PATCH 1/3] gnu: Add make-linux-module. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190402192729.5262-1-dannym@scratchpost.org> <20190402192855.5314-1-dannym@scratchpost.org> <87wokargjc.fsf@gnu.org> <20190403224823.66d25e12@scratchpost.org> Date: Thu, 04 Apr 2019 09:48:34 +0200 In-Reply-To: <20190403224823.66d25e12@scratchpost.org> (Danny Milosavljevic's message of "Wed, 3 Apr 2019 22:48:23 +0200") Message-ID: <87ef6ius6l.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 35110@debbugs.gnu.org Hi Danny, Danny Milosavljevic skribis: > On Wed, 03 Apr 2019 22:16:07 +0200 > Ludovic Court=C3=A8s wrote: > >> Would it make sense to turn it into a =E2=80=98linux-module-build-system= =E2=80=99?=20=20 > > 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 con= tains > 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 n= ice > (if we can cut down the source code a lot, that is). Can it be built (I=E2=80=99m talking about the =E2=80=98vhba-module=E2=80= =99 package that you sent)? I=E2=80=99d 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=E2=80=99d directly write: (define-public vhba-module (package (name "vhba-module") ;; =E2=80=A6 (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=3Dy from our configs.= =20=20 >>=20 >> What does that flag do? > > It adds a field "srcversion" to the ELF file of the module which is a has= h 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 'in= stall > where all the phases except for 'prepare-linux would be module-specific a= nd > '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 =E2=80=98%standard-phases=E2=80=99? Then packages using =E2=80=98linux-mod= ule-build-system=E2=80=99 would use these phases by default, like we do for the other build systems. Does that make sense? Thank you, Ludo=E2=80=99.