diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2020-11-19 08:53:40 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2020-11-19 16:55:44 +0300 |
commit | e1cef2d4c379b2aab43a7dc9601f645048209090 (patch) | |
tree | 078d33adcf1381603da63c4b6e4c9bbfb4073fee /include/linux/bootconfig.h | |
parent | a995e6bc0524450adfd6181dfdcd9d0520cfaba5 (diff) | |
download | linux-e1cef2d4c379b2aab43a7dc9601f645048209090.tar.xz |
tools/bootconfig: Align the bootconfig applied initrd image size to 4
Align the bootconfig applied initrd image size to 4. To fill the gap,
the bootconfig command uses null characters in between the bootconfig
data and the footer. This will expands the footer size but don't change
the checksum.
Thus the block image of the initrd file with bootconfig is as follows.
[initrd][bootconfig][(pad)][size][csum]["#BOOTCONFIG\n"]
Link: https://lkml.kernel.org/r/160576522046.320071.8550680670010950634.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/bootconfig.h')
-rw-r--r-- | include/linux/bootconfig.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h index 9903088891fa..2696eb0fc149 100644 --- a/include/linux/bootconfig.h +++ b/include/linux/bootconfig.h @@ -12,6 +12,9 @@ #define BOOTCONFIG_MAGIC "#BOOTCONFIG\n" #define BOOTCONFIG_MAGIC_LEN 12 +#define BOOTCONFIG_ALIGN_SHIFT 2 +#define BOOTCONFIG_ALIGN (1 << BOOTCONFIG_ALIGN_SHIFT) +#define BOOTCONFIG_ALIGN_MASK (BOOTCONFIG_ALIGN - 1) /* XBC tree node */ struct xbc_node { |