From fa3437cb35967735391ca7b4bd673b44c986b56c Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Sun, 25 Jan 2009 15:48:59 +0000 Subject: [PATCH] Remove enableIntel* and enableGo7007 options. Update nixos-hardware-scan.pl to generate files without these options. svn path=/nixos/branches/fix-style/; revision=13856 --- installer/nixos-hardware-scan.pl | 38 +++++++++++++++------- system/kernel.nix | 9 ++---- system/options.nix | 54 -------------------------------- system/system.nix | 1 - upstart-jobs/default.nix | 12 ++----- 5 files changed, 32 insertions(+), 82 deletions(-) diff --git a/installer/nixos-hardware-scan.pl b/installer/nixos-hardware-scan.pl index e3277fa035d4..d21e92cd51bd 100644 --- a/installer/nixos-hardware-scan.pl +++ b/installer/nixos-hardware-scan.pl @@ -4,6 +4,7 @@ use File::Spec; use File::Basename; +my @requireList = (); my @kernelModules = (); my @initrdKernelModules = (); @@ -56,8 +57,6 @@ push @kernelModules, "kvm-amd" if hasCPUFeature "svm"; # modules are auto-detected so we don't need to list them here. # However, some are needed in the initrd to boot the system. -my $enableIntel2200BGFirmware = "false"; -my $enableIntel3945ABGFirmware = "false"; my $videoDriver = "vesa"; sub pciCheck { @@ -97,11 +96,13 @@ sub pciCheck { # Can't rely on $module here, since the module may not be loaded # due to missing firmware. Ideally we would check modules.pcimap # here. - $enableIntel2200BGFirmware = "true" if $vendor eq "0x8086" && + push @requireList, "(import ./configurations/hardware/network/Intel2200BG.nix)" if + $vendor eq "0x8086" && ($device eq "0x1043" || $device eq "0x104f" || $device eq "0x4220" || $device eq "0x4221" || $device eq "0x4223" || $device eq "0x4224"); - $enableIntel3945ABGFirmware = "true" if $vendor eq "0x8086" && + push @requireList, "(import ./configurations/hardware/network/Intel3945ABG.nix)" if + $vendor eq "0x8086" && ($device eq "0x4229" || $device eq "0x4230" || $device eq "0x4222" || $device eq "0x4227"); @@ -197,14 +198,26 @@ sub toNixExpr { return $res; } +sub multiLineList { + my $indent = shift; + my $res = ""; + foreach my $s (@_) { + $res .= "\n$indent $s"; + } + $res .= "\nindent"; + return $res; +} + my $initrdKernelModules = toNixExpr(removeDups @initrdKernelModules); my $kernelModules = toNixExpr(removeDups @kernelModules); - +my $requireList = multiLineList(" ", removeDups @requireList); ## This is a generated file. Do not modify! ## Make changes to /etc/nixos/configuration.nix instead. print <