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>
Showing
- Documentation/admin-guide/bootconfig.rst 7 additions, 3 deletionsDocumentation/admin-guide/bootconfig.rst
- include/linux/bootconfig.h 3 additions, 0 deletionsinclude/linux/bootconfig.h
- init/Kconfig 1 addition, 1 deletioninit/Kconfig
- init/main.c 5 additions, 1 deletioninit/main.c
- tools/bootconfig/main.c 32 additions, 11 deletionstools/bootconfig/main.c
- tools/bootconfig/test-bootconfig.sh 1 addition, 1 deletiontools/bootconfig/test-bootconfig.sh
Loading
Please register or sign in to comment