Verified Commit 830b8ddc authored by Iggy Jackson's avatar Iggy Jackson
Browse files

Add zstd compression support

Now that 5.10 is out and supports zstd compression for the kernel and
initramfs, add support for zstd to mkinitfs. The benefits have been
discussed at length on lkml[1][2].

In my personal experience, the compression (mkinitfs) seems to be
slower, but decompression (booting) seems to be faster. I think most
people boot more than they mkinitfs.

The default is still gzip, so no change should be noticed unless
someone goes looking for trouble.

To test this functionality, just add the following to mkinitfs.conf:


parent 59204d36
......@@ -280,6 +280,7 @@ fi
case "$initfscomp" in
gzip) comp="$(command -v pigz 2>/dev/null || echo gzip) -9" ;;
xz) cmd_exists xz; comp="xz -C crc32 -T 0" ;;
zstd) cmd_exists zstd; comp="zstd -19" ;;
*) echo "Initramfs compression \"$initfscomp\" not supported!"; exit 1 ;;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment