From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EErkG6jymmCAbgEAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 23:10:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oJyXF6jymmCRUgAA1q6Kng (envelope-from ) for ; Tue, 11 May 2021 21:10:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E3D72162D9 for ; Tue, 11 May 2021 23:09:59 +0200 (CEST) Received: from localhost ([::1]:37236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgZdd-0007pi-QQ for larch@yhetil.org; Tue, 11 May 2021 17:09:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZck-0006jW-9Z for bug-guix@gnu.org; Tue, 11 May 2021 17:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgZck-000538-1n for bug-guix@gnu.org; Tue, 11 May 2021 17:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgZcj-00049j-Sm for bug-guix@gnu.org; Tue, 11 May 2021 17:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48266: support dynamic loading of modules from initrd Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 11 May 2021 21:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48266 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Vagrant Cascadian Received: via spool by 48266-submit@debbugs.gnu.org id=B48266.162076732715954 (code B ref 48266); Tue, 11 May 2021 21:09:01 +0000 Received: (at 48266) by debbugs.gnu.org; 11 May 2021 21:08:47 +0000 Received: from localhost ([127.0.0.1]:37646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgZcU-00049F-Qh for submit@debbugs.gnu.org; Tue, 11 May 2021 17:08:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgZcS-000492-BJ for 48266@debbugs.gnu.org; Tue, 11 May 2021 17:08:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38198) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgZcM-0004pZ-Ka; Tue, 11 May 2021 17:08:38 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33400 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZcM-0001rQ-75; Tue, 11 May 2021 17:08:38 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87pmy3shrq.fsf@yucca> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?UTF-8?Q?Flor=C3=A9al?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 11 May 2021 23:08:35 +0200 In-Reply-To: <87pmy3shrq.fsf@yucca> (Vagrant Cascadian's message of "Thu, 06 May 2021 13:56:41 -0700") Message-ID: <87sg2tugfg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48266@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620767400; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=NjpMWEnlHmJkjX0G2vD1TEqAmgWbhHkdvJKA5TUtFPM=; b=jooJLmRH9VsaL+eSoxKcw954B1AZvDIZF4eoEp+rg0ft9Cntyv+igw7DfIe6T17fwgisfp wOWWHn+iOIkW3/0D4FusW/waM+5+Abpl6mXartLYeWihpKwjgOAPKw4lOhjCZcpiI1dP/L YcwgTSj0WioWRf5hJ0jREQJoi6WtbLhKSuAZTEQ8W49cZXJ+y8oLiw43c1XUwNDodY8OG0 Ii9Oi01pLTNUwkzS6SDg9Ur3CUVXf8pUPKJ8P/e9Dr8Pv9lEVBDYLZyaakthQIu8JmXjYE 0ms4aWJgr8jbh3rK5HS/XdbPfWyc/5lmVmajD2Iz72ROWn+6fb48q+2nwaQVvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620767400; a=rsa-sha256; cv=none; b=aSt5cpH48YB30ozv+ic9HNPz9W1vnGtlFL0voHsF9koDiiJysvfpcUsNhhg5ehhutSdvZM +efBy2gtCSQso+80n6/gv6UIJlkwcvgFBlyN6TmRPlcQKeHOkthp9HzwnRE4QCoGyRUqn/ 0o7ycX46gmz+btt106ZlLgGibDE/eQH9TBoF9qt3BspS43RdjCuhKPZFLNxh7uQ/1WxIe5 bEu7V4EytQVTTbt08Iojdl+cJ3gs+wjW+vAv88oi8bH4aZucmsAA8kJN/uXImc811TAXTo coHpKf8Rnjd5ja98XSICSjp5RhfQDDShebdKQQKr9LKQPzXS/R4SSvozFj75ZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: E3D72162D9 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: /imy9431mZgl Hi! Vagrant Cascadian skribis: > Initially, I tried adding just the obviously mmc related modules, but > this gave me guile prompt from the initramfs as it failed to find the > rootfs. Notably, even with the above list, I still need to explore > additional modules to load in order to get the display and keyboard to > work from the initramfs, in case I wanted to use this with encrypted > rootfs... > > The above list of modules could almost certainly be trimmed, but even > getting a bootable system for pinebook pro took about 20 tries, and the > process of defining the modules is further complicated by several > factors... > > * The filesystem names of the modules (e.g. dw_mmc-pltfm) do not > necessarily match the runtime name from lsmod (e.g. dw_mmc_pltfm). > This becomes a good deal of trial and error to figure out which > modules to add. > > * One needs to manually resolve the soft and hard dependencies of the > modules, and ensure they are loaded, and include them in the list. > > * If upstream changes the module name (which does happen from time to > time), you have to update the system config.scm to the new module > names. > > * If some functionality changes from a module to a built-in, or > vice-versa, the system config.scm needs manual updating. > > * Switching system between two different arm boards potentially requires > entirely different lists of modules. Note that =E2=80=98guix system init=E2=80=99, =E2=80=98reconfigure=E2=80=99= , and =E2=80=98deploy=E2=80=99 error out if drivers for a storage device are missing (see =E2=80=98check-device-initrd-modules=E2=80=99). Now, that doesn=E2=80=99t help if you=E2=80=99re using =E2=80=98guix system= image=E2=80=99, which perhaps is what you were doing? I wonder how we could take advantage of that code in such a scenario. > Rather than handling modules one at a time, I would propose to at least > add an option that can add whole directory trees of modules to the > initrd (e.g. kernel/drivers/usb/)... and then use modprobe (or udev?) > to handle the dependencies. Maybe opt-in at first, but longer-term, > explore making it default? I remember Danny and I worked on something along these lines in the past but it didn=E2=80=99t completely materialize (some of the machinery is alre= ady here, though). That said, we still wouldn=E2=80=99t want to include too mu= ch in the initrd, would we? Thanks, Ludo=E2=80=99.