From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:53510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBmom-0000z7-3v for guix-patches@gnu.org; Wed, 03 Apr 2019 16:49:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBmok-0007OB-9t for guix-patches@gnu.org; Wed, 03 Apr 2019 16:49:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBmog-0007Gi-3o for guix-patches@gnu.org; Wed, 03 Apr 2019 16:49:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hBmof-0000uB-PT for guix-patches@gnu.org; Wed, 03 Apr 2019 16:49:01 -0400 Subject: [bug#35110] [PATCH 1/3] gnu: Add make-linux-module. Resent-Message-ID: Date: Wed, 3 Apr 2019 22:48:23 +0200 From: Danny Milosavljevic Message-ID: <20190403224823.66d25e12@scratchpost.org> In-Reply-To: <87wokargjc.fsf@gnu.org> References: <20190402192729.5262-1-dannym@scratchpost.org> <20190402192855.5314-1-dannym@scratchpost.org> <87wokargjc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/l_rwo1yNuN3uiMmwH9f7Y6."; protocol="application/pgp-signature" 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35110@debbugs.gnu.org --Sig_/l_rwo1yNuN3uiMmwH9f7Y6. Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, 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 I started on it but haven't finished it yet. >That would avoid having to create a package object that cannot be built, j= ust It can be built, it's just not very useful standalone because it only conta= ins 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). I don't understand how a build system would enable us to remove this step. (If it can, that's cool!) > to pass it to =E2=80=98make-linux-module=E2=80=99. =E2=80=98linux-libre= =E2=80=99 and =E2=80=98kmod=E2=80=99 would be > implicit inputs. >=20 > > +;; FIXME: Remove CONFIG_MODULE_SRCVERSION_ALL=3Dy from our configs. =20 >=20 > 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. > Is it OK to use the default GCC? Definitely not. It has to be exactly the same gcc as used in building the Linux kernel. > Other than that it looks really cool! It's just a quick hack. I've started with the build system but it was too much work and I didn't understand the mechanisms well enough. 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 'inst= all 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. --Sig_/l_rwo1yNuN3uiMmwH9f7Y6. Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlylHBcACgkQ5xo1VCww uqUqZwf/WcWRyzwxBFMSnEU+KT9yHCOedS8pqdhNK7iNhphWjXPg3/lrvAzws8KD 8p83YPYT2jG51W8hAFw/f7yzBt1GcKOLOyxSp0lIbmMyVaW3Bxx+wukhhQYPhJt/ G5PE07PQseDT2woONEEiyd/KGjZwMysO/hIyDCW80LwlFaARAeHKemyrFzKWRxlt 2Jm1HZ05kbncRolofpH//QlcnaTv2wRv5FpfxpSDK5eZJfD3tQ0RYrR4j31GfPR5 7yQId9WOHP6H168fhjzs80hKrc+kHjFXTLfOg9UT4bzN0E5KvFfeAaIHOzF2H+SU 0rUWjyt68pVcssBibzsHnPDtzA9Jyg== =pI7R -----END PGP SIGNATURE----- --Sig_/l_rwo1yNuN3uiMmwH9f7Y6.--