To make the bootconfig format more platform independent, use 8-bytes hexadecimal ASCII string for size and checksum field in the footer. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. This commit updates the document to define the format. Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx> --- Documentation/admin-guide/bootconfig.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst index 363599683784..1c6d6919d9e6 100644 --- a/Documentation/admin-guide/bootconfig.rst +++ b/Documentation/admin-guide/bootconfig.rst @@ -140,7 +140,11 @@ Since the boot configuration file is loaded with initrd, it will be added to the end of the initrd (initramfs) image file with padding, size, checksum and 12-byte magic word as below. -[initrd][bootconfig][padding][size(u32)][checksum(u32)][#BOOTCONFIG\n] +[initrd][bootconfig][padding][size][checksum][#BOOTCONFIG\n] + +The size and checksum fields are 8 bytes hexadecimal ASCII numbers fully +padded with '0' on the left to the full width of the field, for example, +the integer 1234 is represented by the ASCII string "000004d2". When the boot configuration is added to the initrd image, the total file size is aligned to 4 bytes. To fill the gap, null characters