From b78ac9e1087c261dc3d4d8796c331245e3067175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 18 Mar 2012 10:02:58 +0000 Subject: [PATCH] Fixing the mkOverride for the kernelPackages in crashdump (I misunderstood mkOverride in the prev commit). Adding an option on kernelParams for the postcrash kernel. svn path=/nixos/trunk/; revision=33230 --- modules/misc/crashdump.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/misc/crashdump.nix b/modules/misc/crashdump.nix index 790e75a40196..fff459c9ab43 100644 --- a/modules/misc/crashdump.nix +++ b/modules/misc/crashdump.nix @@ -4,6 +4,8 @@ with pkgs.lib; let crashdump = config.boot.crashDump; + + kernelParams = concatStringsSep " " crashdump.kernelParams; in ###### interface { @@ -31,6 +33,12 @@ in kernel configuration parameters for the crash dump to work. ''; }; + kernelParams = mkOption { + default = [ "debug1devices" ]; + description = '' + Parameters that will be passed to the kernel kexec-ed on crash. + ''; + }; }; }; }; @@ -42,13 +50,13 @@ in postBootCommands = '' ${pkgs.kexectools}/sbin/kexec -p /var/run/current-system/kernel \ --initrd=/var/run/current-system/initrd \ - --append="init=$(readlink -f /var/run/current-system/init) system=$(readlink -f /var/run/current-system) debug1devices irqpoll maxcpus=1 reset_devices" --reset-vga --console-vga + --append="init=$(readlink -f /var/run/current-system/init) system=$(readlink -f /var/run/current-system) irqpoll maxcpus=1 reset_devices ${kernelParams}" --reset-vga --console-vga ''; kernelParams = [ "crashkernel=64M" "nmi_watchdog=1" ]; - kernelPackages = mkOverride 200 (crashdump.kernelPackages // { + kernelPackages = mkOverride 50 (crashdump.kernelPackages // { kernel = crashdump.kernelPackages.kernel.override (attrs: { extraConfig = (optionalString (attrs ? extraConfig) attrs.extraConfig) +