mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
commit
44864fd0f4
@ -513,7 +513,12 @@ in
|
||||
};
|
||||
|
||||
boot.initrd.compressor = mkOption {
|
||||
default = "gzip";
|
||||
default = (
|
||||
if lib.versionAtLeast config.boot.kernelPackages.kernel.version "5.9"
|
||||
then "zstd"
|
||||
else "gzip"
|
||||
);
|
||||
defaultText = "zstd if the kernel supports it (5.9+), gzip if not.";
|
||||
type = types.unspecified; # We don't have a function type...
|
||||
description = ''
|
||||
The compressor to use on the initrd image. May be any of:
|
||||
|
@ -654,7 +654,10 @@ let
|
||||
|
||||
MODULE_COMPRESS = yes;
|
||||
MODULE_COMPRESS_XZ = yes;
|
||||
KERNEL_XZ = yes;
|
||||
|
||||
# use zstd for kernel compression if newer than 5.9, else xz.
|
||||
KERNEL_XZ = whenOlder "5.9" yes;
|
||||
KERNEL_ZSTD = whenAtLeast "5.9" yes;
|
||||
|
||||
SYSVIPC = yes; # System-V IPC
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
|
||||
, libelf, cpio, elfutils
|
||||
, libelf, cpio, elfutils, zstd, gawk
|
||||
, writeTextFile
|
||||
}:
|
||||
|
||||
@ -120,7 +120,7 @@ let
|
||||
# See also https://kernelnewbies.org/BuildId
|
||||
sed -i Makefile -e 's|--build-id|--build-id=none|'
|
||||
|
||||
sed -i scripts/ld-version.sh -e "s|/usr/bin/awk|${buildPackages.gawk}/bin/awk|"
|
||||
patchShebangs scripts/ld-version.sh
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
@ -306,7 +306,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
|
||||
enableParallelBuilding = true;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
|
||||
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd ]
|
||||
++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
|
||||
++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
|
||||
# Removed util-linuxMinimal since it should not be a dependency.
|
||||
|
Loading…
Reference in New Issue
Block a user