Skip to content

Commit

Permalink
kbuild: drop $(size_append) from cmd_zstd
Browse files Browse the repository at this point in the history
The appended file size is only used by the decompressors, which some
architectures support.

As the comment "zstd22 is used for kernel compression" says, cmd_zstd22
is used in arch/{mips,s390,x86}/boot/compressed/Makefile.

On the other hand, there is no good reason to append the file size to
cmd_zstd since it is used for other purposes.

Actually cmd_zstd is only used in usr/Makefile, where the appended file
size is rather harmful.

The initramfs with its file size appended is considered as corrupted
data, so commit 65e00e0 ("initramfs: refactor the initramfs build
rules") added 'override size_append := :' to make it no-op.

As a conclusion, this $(size_append) should not exist here.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
  • Loading branch information
masahir0y committed Jan 13, 2022
1 parent 82977af commit 64d8aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ quiet_cmd_xzmisc = XZMISC $@
# be used because it would require zstd to allocate a 128 MB buffer.

quiet_cmd_zstd = ZSTD $@
cmd_zstd = { cat $(real-prereqs) | $(ZSTD) -19; $(size_append); } > $@
cmd_zstd = cat $(real-prereqs) | $(ZSTD) -19 > $@

quiet_cmd_zstd22 = ZSTD22 $@
cmd_zstd22 = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
Expand Down

0 comments on commit 64d8aaa

Please sign in to comment.