[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250913003842.41944-19-safinaskar@gmail.com>
Date: Sat, 13 Sep 2025 00:37:57 +0000
From: Askar Safin <safinaskar@...il.com>
To: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Christian Brauner <brauner@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@....de>,
Jens Axboe <axboe@...nel.dk>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Aleksa Sarai <cyphar@...har.com>,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Julian Stecklina <julian.stecklina@...erus-technology.de>,
Gao Xiang <hsiangkao@...ux.alibaba.com>,
Art Nikpal <email2tema@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Eric Curtin <ecurtin@...hat.com>,
Alexander Graf <graf@...zon.com>,
Rob Landley <rob@...dley.net>,
Lennart Poettering <mzxreary@...inter.de>,
linux-arch@...r.kernel.org,
linux-alpha@...r.kernel.org,
linux-snps-arc@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-csky@...r.kernel.org,
linux-hexagon@...r.kernel.org,
loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org,
linux-mips@...r.kernel.org,
linux-openrisc@...r.kernel.org,
linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org,
sparclinux@...r.kernel.org,
linux-um@...ts.infradead.org,
x86@...nel.org,
Ingo Molnar <mingo@...hat.com>,
linux-block@...r.kernel.org,
initramfs@...r.kernel.org,
linux-api@...r.kernel.org,
linux-doc@...r.kernel.org,
linux-efi@...r.kernel.org,
linux-ext4@...r.kernel.org,
"Theodore Y . Ts'o" <tytso@....edu>,
linux-acpi@...r.kernel.org,
Michal Simek <monstr@...str.eu>,
devicetree@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>,
Kees Cook <kees@...nel.org>,
Thorsten Blum <thorsten.blum@...ux.dev>,
Heiko Carstens <hca@...ux.ibm.com>,
patches@...ts.linux.dev
Subject: [PATCH RESEND 18/62] doc: modernize Documentation/driver-api/early-userspace/early_userspace_support.rst
Update it to reflect initrd removal
Signed-off-by: Askar Safin <safinaskar@...il.com>
---
.../early_userspace_support.rst | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/Documentation/driver-api/early-userspace/early_userspace_support.rst b/Documentation/driver-api/early-userspace/early_userspace_support.rst
index 61bdeac1bae5..0ca923c1007b 100644
--- a/Documentation/driver-api/early-userspace/early_userspace_support.rst
+++ b/Documentation/driver-api/early-userspace/early_userspace_support.rst
@@ -127,28 +127,22 @@ mailing list at https://www.zytor.com/mailman/listinfo/klibc
How does it work?
=================
-The kernel has currently 3 ways to mount the root filesystem:
+The kernel has currently 2 ways to mount the root filesystem:
a) all required device and filesystem drivers compiled into the kernel, no
- initrd. init/main.c:init() will call prepare_namespace() to mount the
+ initramfs. init/main.c:kernel_init_freeable() will call prepare_namespace() to mount the
final root filesystem, based on the root= option and optional init= to run
- some other init binary than listed at the end of init/main.c:init().
+ some other init binary than listed at the end of init/main.c:kernel_init().
-b) some device and filesystem drivers built as modules and stored in an
- initrd. The initrd must contain a binary '/linuxrc' which is supposed to
- load these driver modules. It is also possible to mount the final root
- filesystem via linuxrc and use the pivot_root syscall. The initrd is
- mounted and executed via prepare_namespace().
-
-c) using initramfs. The call to prepare_namespace() must be skipped.
+b) using initramfs. The call to prepare_namespace() must be skipped.
This means that a binary must do all the work. Said binary can be stored
into initramfs either via modifying usr/gen_init_cpio.c or via the new
- initrd format, an cpio archive. It must be called "/init". This binary
+ initramfs format, an cpio archive. It must be called "/init". This binary
is responsible to do all the things prepare_namespace() would do.
To maintain backwards compatibility, the /init binary will only run if it
comes via an initramfs cpio archive. If this is not the case,
- init/main.c:init() will run prepare_namespace() to mount the final root
+ init/main.c:kernel_init_freeable() will run prepare_namespace() to mount the final root
and exec one of the predefined init binaries.
Bryan O'Sullivan <bos@...pentine.com>
--
2.47.2
Powered by blists - more mailing lists