diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-02-20 13:18:42 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-02-20 23:52:34 +0100 |
commit | 85c46b78da58398be1c5166f55063c0512decd39 (patch) | |
tree | 61c46743c7f5dd9eaec9afa135020da8b5e66d04 /tools/bootconfig/test-bootconfig.sh | |
parent | bootconfig: Set CONFIG_BOOT_CONFIG=n by default (diff) | |
download | linux-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 'tools/bootconfig/test-bootconfig.sh')
-rwxr-xr-x | tools/bootconfig/test-bootconfig.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh index 1de06de328e2..adafb7c50940 100755 --- a/tools/bootconfig/test-bootconfig.sh +++ b/tools/bootconfig/test-bootconfig.sh @@ -49,7 +49,7 @@ xpass $BOOTCONF -a $TEMPCONF $INITRD new_size=$(stat -c %s $INITRD) echo "File size check" -xpass test $new_size -eq $(expr $bconf_size + $initrd_size + 9) +xpass test $new_size -eq $(expr $bconf_size + $initrd_size + 9 + 12) echo "Apply command repeat test" xpass $BOOTCONF -a $TEMPCONF $INITRD |