From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esI8F-0005Ml-U5 for guix-patches@gnu.org; Sat, 03 Mar 2018 20:08:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esI8A-0003Ml-Rr for guix-patches@gnu.org; Sat, 03 Mar 2018 20:08:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:35443) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esI8A-0003MM-O1 for guix-patches@gnu.org; Sat, 03 Mar 2018 20:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1esI8A-0002YK-Dh for guix-patches@gnu.org; Sat, 03 Mar 2018 20:08:02 -0500 Subject: [bug#30604] [PATCH v8 3/7] linux-boot: Load kernel modules only when the hardware is present. Resent-Message-ID: Date: Sun, 4 Mar 2018 02:06:43 +0100 From: Danny Milosavljevic Message-ID: <20180304020643.6773e016@scratchpost.org> In-Reply-To: <87sh9g4vy1.fsf@gnu.org> References: <20180302153408.14091-1-dannym@scratchpost.org> <20180303135533.6112-1-dannym@scratchpost.org> <20180303135533.6112-4-dannym@scratchpost.org> <87sh9g4vy1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/2j+BS72XcrZBeirf3UmbMmD"; 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: 30604@debbugs.gnu.org --Sig_/2j+BS72XcrZBeirf3UmbMmD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Sat, 03 Mar 2018 23:48:38 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > + (system* "/sbin/modprobe" "-q" "--" modalias)))) =20 >=20 > If we change =E2=80=98flat-linux-module-directory=E2=80=99 to produce a = =E2=80=98modules.alias=E2=80=99 > file, here we could read =E2=80=98modules.aliases=E2=80=99 directly and l= oad the right > thing. >=20 > With the patch below, we get =E2=80=98needed-modules=E2=80=99, and we cou= ld simply do: >=20 > (for-each (catch-ENOENT load-linux-module*) > (needed-modules > (known-module-aliases (string-append linux-module-directory > "/modules.alias")))) >=20 > and we can do away with kmod=E2=80=99s modprobe. It's not kmod's modprobe anymore. It's our pure-Guile implementation. Linux lazy-invokes modprobe (for example when mounting stuff), so /sbin/modprobe is never going away - but it can be our implementation. I doubt it will take the modules from the correct directory with your patch. (Of course otherwise it looks much nicer - but I think it won't pass the te= sts) My newest version (v9) will use the same procedure for both computing the l= ist of modules for flat-linux-module-directory and the list of modules that are= to be modprobed - I think it's nice to be able to keep those in sync so we don= 't get nasty surprises. Let's see how that goes... --Sig_/2j+BS72XcrZBeirf3UmbMmD Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlqbRqMACgkQ5xo1VCww uqXDwQgAowI5zaIU+SBYbyZPcBgJoXZC0c5raPEdUouIjGTcIY3A0uIY9hLfuMDX kX+Sg60ZEvxBtoJmsy9eMNKlvuzVduB8jNEouH1MQcUBLu6wSLvHhkQRHjamAHkN oRKpLTj429itvdQ0jNewulqshW3xeeneepYDITKFD/sOAHt/ek0DFthYYxIJUEXY PXLkJ+O2mCyspt4uoc+8L+4dtEO9gv3asmu4mhk8D5+bXZ0DgBVsNqmQrOe3XSkc S0no3CafpSInmq+HuGAbFwnJcQbp1ISd3AoSMXEBAfaSVoaE/ZzKFKLgavNuvbpD SQdW8dstK+ZyUiOP6KiaG3g5tn2AHg== =Qtnk -----END PGP SIGNATURE----- --Sig_/2j+BS72XcrZBeirf3UmbMmD--