Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3033397pxu; Tue, 8 Dec 2020 01:28:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjyGEum8xUZaN1wnCwHRxfUvYD5RPL+LpG5dLIlasGzdAxQjwITTHqcxbidC2V+iB4BZvw X-Received: by 2002:aa7:cac2:: with SMTP id l2mr23790178edt.141.1607419703347; Tue, 08 Dec 2020 01:28:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607419703; cv=none; d=google.com; s=arc-20160816; b=BwOX/M/OL0h7YHc2vDFuo5gxanhxEhGu1Dn/KVKUlkxIrPkSPOqnjzvzgNWXZq13OZ GUPLidI+C/elZpbDTvy1YHHBHKcbZIxd8aEDqYx4rQ67+tEf6TKhg0t0BM3CtkABFNEc 4W0GehseqY2MujWFHliKt3/+/p5hWSWksa+KfijQQcKyCyi15etCthlGntAMiVx0WaRC Iaw66+OAfjYeoafW+FlBIAZxq9JXB8Ima3MUWZEaEJCryDcC84BRS8JytID/O7ywhZdn CaFcj8uThYalGXmd7SUm3f7HbZSJA2ZEOBlOF7ksGD2zvWv+8a87cLiMELG0DCqAfhEr xMCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:user-agent:date:message-id:cc:to:subject:from; bh=G8McSxoxh9PBT6szFYNBbifQmS7FV2SSRTRQJctBqHg=; b=eC88yd3QkQxgDNqJetjapnCPfqcSb1pyX+sBppu2N7Yd30oVyUtXbKWPqMqA1tqQPS ioFAp2bnrRBlIP9ARQFdjGdwpG0qBC525jdUK3QnJd4jCb0ZMi3qcqg1oGgujrbPtAce 7wBnwFZBl1fnN/6kplXAlPCIen3ekQ2SEZoj7fEoSgka1mjGC+gnnZSGKrbAsuG5CQQ+ JdJ6Zq6XsVcrbVojRsWlM6BBbdA6eKcpK4m7hE0LR236STFCN0bmY+5v7bxDoCfENSFg n+r9CRCnN8tej6OwO2DmxpXNMoOCgMpstiUG3uGWIvCs5/t+5HbRco23JhJIiRBK2jX2 uQ+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu3si5148162edb.376.2020.12.08.01.28.01; Tue, 08 Dec 2020 01:28:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728829AbgLHJYu (ORCPT + 99 others); Tue, 8 Dec 2020 04:24:50 -0500 Received: from mx3.molgen.mpg.de ([141.14.17.11]:57611 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726114AbgLHJYu (ORCPT ); Tue, 8 Dec 2020 04:24:50 -0500 Received: from [192.168.0.3] (unknown [95.90.244.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id AE6BC2064713F; Tue, 8 Dec 2020 10:24:08 +0100 (CET) From: Paul Menzel Subject: Pass modules to Linux kernel without initrd To: LKML Cc: Luis Chamberlain , Hans de Goede , Ben Hutchings Message-ID: <6fbaf375-389d-6581-55a1-78bbe2852e2d@molgen.mpg.de> Date: Tue, 8 Dec 2020 10:24:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Linux folks, Trying to reduce the boot time of standard distributions, I would like to get rid of the initrd. The initrd is for mounting the root file system and on most end user systems with standard distributions that means loading the bus driver for the drive and the file system driver. Everyone could build their own Linux kernel and build the drivers into the Linux kernel, but most users enjoy using the distribution Linux kernel, which build the drivers as modules to support a lot of systems. (I think Fedora builds the default file system driver (of the installer) into the Linux kernel.) A custom minimal initrd init script only loading the modules would also work, but as libkmod depends on libcrypto, which as a shared library is already three megabytes in size. Building libkmod statically would mean for distributions, that you need hooks to rebuild libkmod each time OpenSSL is updated (to get the changes). Similar to passing firmware and microcode update files to Linux or building these into the Linux kernel image, would it be possible to append the required modules to the Linux kernel image, and Linux would load these? Probably you are going to say, that is not how it works, but maybe I am lucky and you know a solution, or could point me to the right direction how such a think could be implemented. Kind regards, Paul