diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-05-28 09:05:38 +0200 |
---|---|---|
committer | K900 <me@0upti.me> | 2024-06-12 19:14:52 +0300 |
commit | 0aaefb79163643004e217e403dabb34dc054f377 (patch) | |
tree | 1efad4acfac35d6317533e342d74a9e2b119a8ed | |
parent | e6aff28cc12fdfc937826354f19527ad009a9ae8 (diff) |
linux/common-config: update for 6.10
We assume RISC-V uses an uncompressed kernel in lib/systems/platforms.nix. Since this is the first Linux version to support either xz or zstd compressed kernels on RISC-V, we can't change platforms.nix to match the other platforms without breaking builds of older kernel versions, so let's just preserve the old behaviour. We could in future decide to use gzip-compressed kernels on RISC-V, which is supported going back further. (cherry picked from commit 9f18414c6b7daa5b83210984bfb124e4f7c3340e)
-rw-r--r-- | pkgs/os-specific/linux/kernel/common-config.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index a27feea36efb8..4d76cb1f99742 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -352,7 +352,8 @@ let # (stable) amdgpu support for bonaire and newer chipsets DRM_AMDGPU_CIK = yes; # Allow device firmware updates - DRM_DP_AUX_CHARDEV = yes; + DRM_DP_AUX_CHARDEV = whenOlder "6.10" yes; + DRM_DISPLAY_DP_AUX_CHARDEV = whenAtLeast "6.10" yes; # amdgpu display core (DC) support DRM_AMD_DC_DCN1_0 = whenOlder "5.6" yes; DRM_AMD_DC_DCN2_0 = whenBetween "5.3" "5.6" yes; @@ -769,8 +770,10 @@ let # i686 issues: https://github.com/NixOS/nixpkgs/pull/117961#issuecomment-812106375 useZstd = stdenv.buildPlatform.is64bit && versionAtLeast version "5.9"; in { - KERNEL_XZ = mkIf (!useZstd) yes; - KERNEL_ZSTD = mkIf useZstd yes; + # stdenv.hostPlatform.linux-kernel.target assumes uncompressed on RISC-V. + KERNEL_UNCOMPRESSED = mkIf stdenv.hostPlatform.isRiscV yes; + KERNEL_XZ = mkIf (!stdenv.hostPlatform.isRiscV && !useZstd) yes; + KERNEL_ZSTD = mkIf (!stdenv.hostPlatform.isRiscV && useZstd) yes; HID_BATTERY_STRENGTH = yes; # enabled by default in x86_64 but not arm64, so we do that here |