瀏覽代碼

kexectools: Disable only on RISC-V if Linux.

The isKexecable flag treated Linux without kexec as just a normal
variant, when it really should be treated as a special case incurring
complexity debt to support.
wip-nanopi-m4v2
Shea Levy 8 年之前
父節點
當前提交
cdf9a78a3e
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 5C0BD6957D86FE27
共有 6 個檔案被更改,包括 7 行新增7 行删除
  1. +2
    -0
      lib/meta.nix
  2. +0
    -2
      lib/systems/inspect.nix
  3. +1
    -1
      nixos/modules/system/boot/kexec.nix
  4. +1
    -0
      pkgs/os-specific/linux/kexectools/default.nix
  5. +2
    -1
      pkgs/os-specific/linux/systemd/default.nix
  6. +1
    -3
      pkgs/top-level/all-packages.nix

+ 2
- 0
lib/meta.nix 查看文件

@@ -86,4 +86,6 @@ rec {
then { system = elem; }
else { parsed = elem; };
in lib.matchAttrs pattern platform;

enableIfAvailable = p: if p.meta.available or true then [ p ] else [];
}

+ 0
- 2
lib/systems/inspect.nix 查看文件

@@ -39,8 +39,6 @@ rec {
isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ];
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];

isKexecable = map (family: { kernel = kernels.linux; cpu.family = family; })
[ "x86" "arm" "aarch64" "mips" ];
isEfi = map (family: { cpu.family = family; })
[ "x86" "arm" "aarch64" ];
isSeccomputable = map (family: { kernel = kernels.linux; cpu.family = family; })


+ 1
- 1
nixos/modules/system/boot/kexec.nix 查看文件

@@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }:

{
config = lib.mkIf (pkgs.kexectools != null) {
config = lib.mkIf (pkgs.kexectools.meta.available) {
environment.systemPackages = [ pkgs.kexectools ];

systemd.services."prepare-kexec" =


+ 1
- 0
pkgs/os-specific/linux/kexectools/default.nix 查看文件

@@ -22,5 +22,6 @@ stdenv.mkDerivation rec {
homepage = http://horms.net/projects/kexec/kexec-tools;
description = "Tools related to the kexec Linux feature";
platforms = platforms.linux;
badPlatforms = platforms.riscv;
};
}

+ 2
- 1
pkgs/os-specific/linux/systemd/default.nix 查看文件

@@ -41,7 +41,8 @@ in stdenv.mkDerivation rec {
buildInputs =
[ linuxHeaders libcap kmod xz pam acl
/* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2
libmicrohttpd kexectools libseccomp libffi audit lz4 bzip2 libapparmor
libmicrohttpd ] ++ stdenv.lib.meta.enableIfAvailable kexectools ++
[ libseccomp libffi audit lz4 bzip2 libapparmor
iptables gnu-efi
# This is actually native, but we already pull it from buildPackages
pythonLxmlEnv


+ 1
- 3
pkgs/top-level/all-packages.nix 查看文件

@@ -3131,9 +3131,7 @@ with pkgs;

keepalived = callPackage ../tools/networking/keepalived { };

kexectools = if hostPlatform.isKexecable
then callPackage ../os-specific/linux/kexectools { }
else null;
kexectools = callPackage ../os-specific/linux/kexectools { };

keybase = callPackage ../tools/security/keybase { };



Loading…
取消
儲存