Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1db88b5c6500
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 44864fd0f4d3
Choose a head ref
  • 5 commits
  • 3 files changed
  • 3 contributors

Commits on Dec 27, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    Mic92 Jörg Thalheim
    Copy the full SHA
    2d0ba1f View commit details
  2. kernel/manual-config: add zstd to nativeBuildDeps.

    Required to build with zstd compression.
    
    Refs #101108
    archseer authored and Atemu committed Dec 27, 2020
    Copy the full SHA
    9fee546 View commit details

Commits on Dec 28, 2020

  1. kernel: use zstd compression on 5.9+.

    archseer authored and Atemu committed Dec 28, 2020
    Copy the full SHA
    9461f0a View commit details
  2. nixos/stage-1: set zstd as the default compressor when supported

    Co-authored-by: Atemu <atemu.main@gmail.com>
    archseer and Atemu committed Dec 28, 2020
    Copy the full SHA
    a6b5693 View commit details

Commits on Dec 29, 2020

  1. Merge pull request #107703 from Atemu/kernel-use-zstd

    kernel: use zstd
    lheckemann authored Dec 29, 2020
    Copy the full SHA
    44864fd View commit details
Showing with 13 additions and 5 deletions.
  1. +6 −1 nixos/modules/system/boot/stage-1.nix
  2. +4 −1 pkgs/os-specific/linux/kernel/common-config.nix
  3. +3 −3 pkgs/os-specific/linux/kernel/manual-config.nix
7 changes: 6 additions & 1 deletion nixos/modules/system/boot/stage-1.nix
Original file line number Diff line number Diff line change
@@ -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:
5 changes: 4 additions & 1 deletion pkgs/os-specific/linux/kernel/common-config.nix
Original file line number Diff line number Diff line change
@@ -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

6 changes: 3 additions & 3 deletions pkgs/os-specific/linux/kernel/manual-config.nix
Original file line number Diff line number Diff line change
@@ -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.