diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2020-08-19 23:58:34 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2020-08-19 23:58:34 +0000 |
commit | 3c2d2a718dd44c1826842baf7f1513ee379b5740 (patch) | |
tree | 6a3f9041182730456f20b72fde1570283dc64b75 | |
parent | d7ae5c6dca1358a97979dcacf0505e9fa56a8e66 (diff) | |
parent | e94f410c71e90598b4fabca3970c7f282b5bd0a0 (diff) |
Merge branch 'add_zstd_format' into 'master'
un-,mkinitramfs: add support for zstd
Closes: #955469
See merge request kernel-team/initramfs-tools!33
-rw-r--r-- | conf/initramfs.conf | 2 | ||||
-rwxr-xr-x | mkinitramfs | 1 | ||||
-rwxr-xr-x | unmkinitramfs | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/conf/initramfs.conf b/conf/initramfs.conf index dd76996..1d782f3 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -38,7 +38,7 @@ BUSYBOX=auto KEYMAP=n # -# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ] +# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ] # COMPRESS=gzip diff --git a/mkinitramfs b/mkinitramfs index 29ead4d..17d808e 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -184,6 +184,7 @@ gzip) # If we're doing a reproducible build, use gzip -n fi ;; lz4) compress="lz4 -9 -l" ;; +zstd) compress="zstd -q -19 -T0" ;; xz) compress="xz --check=crc32" # If we're not doing a reproducible build, enable multithreading test -z "${SOURCE_DATE_EPOCH}" && compress="$compress --threads=0" diff --git a/unmkinitramfs b/unmkinitramfs index 3f8c75d..d1226c3 100755 --- a/unmkinitramfs +++ b/unmkinitramfs @@ -31,6 +31,8 @@ xcpio() if gzip -t "$archive" >/dev/null 2>&1 ; then gzip -c -d "$archive" + elif zstd -q -c -t "$archive" >/dev/null 2>&1 ; then + zstd -q -c -d "$archive" elif xzcat -t "$archive" >/dev/null 2>&1 ; then xzcat "$archive" elif lz4cat -t < "$archive" >/dev/null 2>&1 ; then |