summaryrefslogtreecommitdiffstats
path: root/Documentation/admin-guide/bootconfig.rst
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-02-20 13:18:42 +0100
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-02-20 23:52:34 +0100
commit85c46b78da58398be1c5166f55063c0512decd39 (patch)
tree61c46743c7f5dd9eaec9afa135020da8b5e66d04 /Documentation/admin-guide/bootconfig.rst
parentbootconfig: Set CONFIG_BOOT_CONFIG=n by default (diff)
downloadlinux-85c46b78da58398be1c5166f55063c0512decd39.tar.xz
linux-85c46b78da58398be1c5166f55063c0512decd39.zip
bootconfig: Add bootconfig magic word for indicating bootconfig explicitly
Add bootconfig magic word to the end of bootconfig on initrd image for indicating explicitly the bootconfig is there. Also tools/bootconfig treats wrong size or wrong checksum or parse error as an error, because if there is a bootconfig magic word, there must be a bootconfig. The bootconfig magic word is "#BOOTCONFIG\n", 12 bytes word. Thus the block image of the initrd file with bootconfig is as follows. [Initrd][bootconfig][size][csum][#BOOTCONFIG\n] Link: http://lkml.kernel.org/r/158220112263.26565.3944814205960612841.stgit@devnote2 Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'Documentation/admin-guide/bootconfig.rst')
-rw-r--r--Documentation/admin-guide/bootconfig.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst
index b342a6796392..5e7609936507 100644
--- a/Documentation/admin-guide/bootconfig.rst
+++ b/Documentation/admin-guide/bootconfig.rst
@@ -102,9 +102,13 @@ Boot Kernel With a Boot Config
==============================
Since the boot configuration file is loaded with initrd, it will be added
-to the end of the initrd (initramfs) image file. The Linux kernel decodes
-the last part of the initrd image in memory to get the boot configuration
-data.
+to the end of the initrd (initramfs) image file with size, checksum and
+12-byte magic word as below.
+
+[initrd][bootconfig][size(u32)][checksum(u32)][#BOOTCONFIG\n]
+
+The Linux kernel decodes the last part of the initrd image in memory to
+get the boot configuration data.
Because of this "piggyback" method, there is no need to change or
update the boot loader and the kernel image itself.