Merge tag 'x86-boot-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 boot updates from Ingo Molnar: "The main change in this cycle was to add support for ZSTD-compressed kernel and initrd images. ZSTD has a very fast decompressor, yet it compresses better than gzip" * tag 'x86-boot-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation: dontdiff: Add zstd compressed files .gitignore: Add ZSTD-compressed files x86: Add support for ZSTD compressed kernel x86: Bump ZO_z_extra_bytes margin for zstd usr: Add support for zstd compressed initramfs init: Add support for zstd compressed kernel lib: Add zstd support to decompress lib: Prepare zstd for preboot environment, improve performance
This commit is contained in:
@@ -413,6 +413,28 @@ quiet_cmd_xzkern = XZKERN $@
|
||||
quiet_cmd_xzmisc = XZMISC $@
|
||||
cmd_xzmisc = cat $(real-prereqs) | $(XZ) --check=crc32 --lzma2=dict=1MiB > $@
|
||||
|
||||
# ZSTD
|
||||
# ---------------------------------------------------------------------------
|
||||
# Appends the uncompressed size of the data using size_append. The .zst
|
||||
# format has the size information available at the beginning of the file too,
|
||||
# but it's in a more complex format and it's good to avoid changing the part
|
||||
# of the boot code that reads the uncompressed size.
|
||||
#
|
||||
# Note that the bytes added by size_append will make the zstd tool think that
|
||||
# the file is corrupt. This is expected.
|
||||
#
|
||||
# zstd uses a maximum window size of 8 MB. zstd22 uses a maximum window size of
|
||||
# 128 MB. zstd22 is used for kernel compression because it is decompressed in a
|
||||
# single pass, so zstd doesn't need to allocate a window buffer. When streaming
|
||||
# decompression is used, like initramfs decompression, zstd22 should likely not
|
||||
# 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); } > $@
|
||||
|
||||
quiet_cmd_zstd22 = ZSTD22 $@
|
||||
cmd_zstd22 = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
|
||||
|
||||
# ASM offsets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user