From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Resolving Linux module dependencies Date: Fri, 28 Nov 2014 08:58:50 +0100 Message-ID: <87r3wnbvt1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuGSA-0006Gv-76 for guix-devel@gnu.org; Fri, 28 Nov 2014 02:59:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuGS4-0001zY-Q0 for guix-devel@gnu.org; Fri, 28 Nov 2014 02:58:58 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:42448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuGS4-0001zT-J1 for guix-devel@gnu.org; Fri, 28 Nov 2014 02:58:52 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D5D9B3F62 for ; Fri, 28 Nov 2014 08:58:50 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3bqpJIwtXq1L for ; Fri, 28 Nov 2014 08:58:50 +0100 (CET) Received: from pluto (pluto.bordeaux.inria.fr [193.50.110.57]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A07D91093 for ; Fri, 28 Nov 2014 08:58:50 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel In light of , I realized that the na=C3=AFve handling of kernel modules (=C3=A0 la =E2=80= =98insmod=E2=80=99) in the initrd and at boot time did not scale: one had to specify the dependencies of the modules to be loaded from the initrd and do so in topological order. For a moment I contemplated the idea of writing libkmod bindings to do that, and then realized that using Andy=E2=80=99s ELF parser would get us t= here more quickly. So the recent commits import the ELF parser from Guile 2.1, then use it to obtain module dependency information in (gnu build linux-boot), use that dependency information to copy the closure of the user-specified modules to the initrd, and finally load the closure of the user-specified modules (=C3=A0 la =E2=80=98modprobe=E2=80=99.) Comments & bug reports welcome! I was happy to see we could get things done this quickly thanks to the ELF parser. :-) Ludo=E2=80=99.