kernel config: add support for CONFIG_SQUASHFS_ZSTD (#52967)

Also, allow override `make-squashfs.nix` compression parameters.
This commit is contained in:
Danylo Hlynskyi 2019-01-17 15:24:44 +02:00 committed by GitHub
parent 83963ba209
commit 23a13b562c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,9 @@
, # The root directory of the squashfs filesystem is filled with the
# closures of the Nix store paths listed here.
storeContents ? []
, # Compression parameters.
# For zstd compression you can use "zstd -Xcompression-level 6".
comp ? "xz -Xdict-size 100%"
}:
stdenv.mkDerivation {
@ -20,6 +23,6 @@ stdenv.mkDerivation {
# Generate the squashfs image.
mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $out \
-keep-as-directory -all-root -b 1048576 -comp xz -Xdict-size 100%
-keep-as-directory -all-root -b 1048576 -comp ${comp}
'';
}

View File

@ -320,6 +320,7 @@ let
SQUASHFS_LZO = yes;
SQUASHFS_XZ = yes;
SQUASHFS_LZ4 = yes;
SQUASHFS_ZSTD = whenAtLeast "4.14" yes;
# Native Language Support modules, needed by some filesystems
NLS = yes;