All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org
Subject: [for-next][PATCH 06/12] docs: bootconfig: Add how to use bootconfig for kernel parameters
Date: Wed, 08 Sep 2021 15:18:57 -0400	[thread overview]
Message-ID: <20210908191954.240146988@goodmis.org> (raw)
In-Reply-To: 20210908191851.381347939@goodmis.org

From: Masami Hiramatsu <mhiramat@kernel.org>

Add a section to describe how to use the bootconfig for
specifying kernel and init parameters. This is an important
section because it is the reason why this document is under
the admin-guide.

Link: https://lkml.kernel.org/r/163077086399.222577.5881779375643977991.stgit@devnote2

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Documentation/admin-guide/bootconfig.rst | 39 +++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst
index 6a79f2e59396..a1860fc0ca88 100644
--- a/Documentation/admin-guide/bootconfig.rst
+++ b/Documentation/admin-guide/bootconfig.rst
@@ -178,7 +178,7 @@ update the boot loader and the kernel image itself as long as the boot
 loader passes the correct initrd file size. If by any chance, the boot
 loader passes a longer size, the kernel fails to find the bootconfig data.
 
-To do this operation, Linux kernel provides "bootconfig" command under
+To do this operation, Linux kernel provides ``bootconfig`` command under
 tools/bootconfig, which allows admin to apply or delete the config file
 to/from initrd image. You can build it by the following command::
 
@@ -196,6 +196,43 @@ To remove the config from the image, you can use -d option as below::
 Then add "bootconfig" on the normal kernel command line to tell the
 kernel to look for the bootconfig at the end of the initrd file.
 
+
+Kernel parameters via Boot Config
+=================================
+
+In addition to the kernel command line, the boot config can be used for
+passing the kernel parameters. All the key-value pairs under ``kernel``
+key will be passed to kernel cmdline directly. Moreover, the key-value
+pairs under ``init`` will be passed to init process via the cmdline.
+The parameters are concatinated with user-given kernel cmdline string
+as the following order, so that the command line parameter can override
+bootconfig parameters (this depends on how the subsystem handles parameters
+but in general, earlier parameter will be overwritten by later one.)::
+
+ [bootconfig params][cmdline params] -- [bootconfig init params][cmdline init params]
+
+Here is an example of the bootconfig file for kernel/init parameters.::
+
+ kernel {
+   root = 01234567-89ab-cdef-0123-456789abcd
+ }
+ init {
+  splash
+ }
+
+This will be copied into the kernel cmdline string as the following::
+
+ root="01234567-89ab-cdef-0123-456789abcd" -- splash
+
+If user gives some other command line like,::
+
+ ro bootconfig -- quiet
+
+The final kernel cmdline will be the following::
+
+ root="01234567-89ab-cdef-0123-456789abcd" ro bootconfig -- splash quiet
+
+
 Config File Limitation
 ======================
 
-- 
2.32.0

  parent reply	other threads:[~2021-09-08 19:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 19:18 [for-next][PATCH 00/12] tracing: More updates for 5.15 Steven Rostedt
2021-09-08 19:18 ` [for-next][PATCH 01/12] tracing: Add migrate-disabled counter to tracing output Steven Rostedt
2021-09-08 19:18 ` [for-next][PATCH 02/12] tracing: Fix some alloc_event_probe() error handling bugs Steven Rostedt
2021-09-08 19:18 ` [for-next][PATCH 03/12] tracing/osnoise: Fix missed cpus_read_unlock() in start_per_cpu_kthreads() Steven Rostedt
2021-09-08 19:18 ` [for-next][PATCH 04/12] init: bootconfig: Remove all bootconfig data when the init memory is removed Steven Rostedt
2021-09-08 19:18 ` [for-next][PATCH 05/12] init/bootconfig: Reorder init parameter from bootconfig and cmdline Steven Rostedt
2021-09-08 19:18 ` Steven Rostedt [this message]
2021-09-08 19:18 ` [for-next][PATCH 07/12] tools/bootconfig: Fix tracing_on option checking in ftrace2bconf.sh Steven Rostedt
2021-09-08 19:18 ` [for-next][PATCH 08/12] bootconfig: Fix missing return check of xbc_node_compose_key function Steven Rostedt
2021-09-08 19:28   ` Steven Rostedt
2021-09-08 19:19 ` [for-next][PATCH 09/12] tools/bootconfig: Show whole test command for each test case Steven Rostedt
2021-09-08 19:19 ` [for-next][PATCH 10/12] tracing: synth events: increase max fields count Steven Rostedt
2021-09-08 19:19 ` [for-next][PATCH 11/12] tracing: Dynamically allocate the per-elt hist_elt_data array Steven Rostedt
2021-09-08 19:19 ` [for-next][PATCH 12/12] selftests/ftrace: Exclude "(fault)" in testing add/remove eprobe events Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210908191954.240146988@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.