diff options
-rw-r--r-- | PKGBUILD | 1 | ||||
-rwxr-xr-x | lsinitcpio | 7 | ||||
-rw-r--r-- | mkinitcpio.conf | 1 |
3 files changed, 8 insertions, 1 deletions
@@ -14,6 +14,7 @@ makedepends=('asciidoc' 'git' 'sed') optdepends=('xz: Use lzma or xz compression for the initramfs image' 'bzip2: Use bzip2 compression for the initramfs image' 'lzop: Use lzo compression for the initramfs image' + 'lz4: Use lz4 compression for the initramfs image' 'mkinitcpio-nfs-utils: Support for root filesystem on NFS') backup=(etc/mkinitcpio.conf) @@ -69,7 +69,7 @@ size_to_human() { } detect_filetype() { - case $(hexdump -n 6 -e '"%c"' "$1") in + case $(hexdump -n 6 -e '"%c"' "$1") in '070701') # no compression return @@ -90,6 +90,11 @@ detect_filetype() { return fi + if [[ $(hexdump -n 4 -e '"%x"' "$1") == '184d2204' ]]; then + echo 'lz4' + return + fi + if [[ $(hexdump -n 3 -e '"%c"' "$1") == 'BZh' ]]; then echo 'bzip2' return diff --git a/mkinitcpio.conf b/mkinitcpio.conf index 7616809..c4d5e06 100644 --- a/mkinitcpio.conf +++ b/mkinitcpio.conf @@ -59,6 +59,7 @@ HOOKS="base udev autodetect modconf block filesystems keyboard fsck" #COMPRESSION="lzma" #COMPRESSION="xz" #COMPRESSION="lzop" +#COMPRESSION="lz4" # COMPRESSION_OPTIONS # Additional options for the compressor |