home: hub: mkinitfs

Download patch

ref: e4e03c8b411edde5e908798ffb99cc85f8cca610
parent: 0e21540360f884abd453a71293361a7dc62db844
author: HC <hcs@hmkbilcon.dk>
date: Fri Mar 18 05:23:49 CDT 2022

Add support for LZ4 compression

--- a/mkinitfs.in
+++ b/mkinitfs.in
@@ -194,7 +194,7 @@
 options:
 	-b  prefix files and kernel modules with basedir
 	-c  use configfile instead of $config
-	-C  initramfs compression (gzip|xz|zstd defaults to $initfscomp)
+	-C  initramfs compression (gzip|xz|zstd|lz4 defaults to $initfscomp)
 	-f  use fstab instead of $fstab
 	-F  use specified features
 	-h  print this help
@@ -302,6 +302,7 @@
 	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" ;;
+	lz4) cmd_exists lz4; comp="lz4 --favor-decSpeed --best -lz" ;;
 	*) echo "Initramfs compression \"$initfscomp\" not supported!"; exit 1 ;;
 esac