Skip to content

Commit 0522749

Browse files
mhiramatrostedt
authored andcommitted
docs: bootconfig: Add the endianness of fields
Add a description about the endianness of the size and the checksum fields. Those must be stored as le32 instead of u32. This will allow us to apply bootconfig to the cross build initrd without caring the endianness. Link: https://lkml.kernel.org/r/160583936246.547349.10964204130590955409.stgit@devnote2 Reported-by: Steven Rostedt <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent e868435 commit 0522749

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/admin-guide/bootconfig.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ Since the boot configuration file is loaded with initrd, it will be added
140140
to the end of the initrd (initramfs) image file with padding, size,
141141
checksum and 12-byte magic word as below.
142142

143-
[initrd][bootconfig][padding][size(u32)][checksum(u32)][#BOOTCONFIG\n]
143+
[initrd][bootconfig][padding][size(le32)][checksum(le32)][#BOOTCONFIG\n]
144+
145+
The size and checksum fields are unsigned 32bit little endian value.
144146

145147
When the boot configuration is added to the initrd image, the total
146148
file size is aligned to 4 bytes. To fill the gap, null characters

0 commit comments

Comments
 (0)