Remove enableIntel* and enableGo7007 options.

Update nixos-hardware-scan.pl to generate files without these options.

svn path=/nixos/branches/fix-style/; revision=13856
This commit is contained in:
Nicolas Pierron 2009-01-25 15:48:59 +00:00
parent 6086aee542
commit fa3437cb35
5 changed files with 32 additions and 82 deletions

View file

@ -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 <<EOF ;
{
require = [$requireList];
boot = {
initrd = {
extraKernelModules = [ $initrdKernelModules ];
@ -216,12 +229,15 @@ print <<EOF ;
maxJobs = $cpus;
};
# list of file systems which can be mounted.
fileSystems = [
];
# list of swap devices.
swapDevices = [
];
networking = {
enableIntel3945ABGFirmware = $enableIntel3945ABGFirmware;
# Warning: setting this option to `true' requires acceptance of the
# firmware license, see http://ipw2200.sourceforge.net/firmware.php?fid=7.
enableIntel2200BGFirmware = $enableIntel2200BGFirmware;
};
services = {
@ -229,7 +245,7 @@ print <<EOF ;
xserver = {
videoDriver = "$videoDriver";
};
};
}
EOF

View file

@ -9,7 +9,6 @@ let
kernelPackages = mkOption {
default = pkgs.kernelPackages;
example = pkgs.kernelPackages_2_6_25;
merge = backwardPkgsFunMerge;
description = "
This option allows you to override the Linux kernel used by
NixOS. Since things like external kernel module packages are
@ -57,7 +56,6 @@ let
description = ''
A list of additional packages supplying kernel modules.
'';
merge = backwardPkgsFunListMerge;
};
kernelModules = mkOption {
@ -148,14 +146,13 @@ in
{
require = [
options
# udev
];
system = {
# include kernel modules.
modulesTree = [ kernel ]
# this line should be removed!
++ pkgs.lib.optional config.hardware.enableGo7007 kernelPackages.wis_go7007
++ config.boot.extraModulePackages;
modulesTree = [ kernel ] ++ config.boot.extraModulePackages;
};
services = {

View file

@ -209,21 +209,6 @@ in
};
};
# Hm, this sounds like a catch-all...
hardware = {
enableGo7007 = mkOption {
default = false;
merge = obsoleteMerge;
description = ''
Enable this option to get support for the WIS GO7007SB
multi-format video encoder, which is used in a number of
devices such as the Plextor ConvertX TV402U USB TV device.
'';
};
};
networking = {
@ -275,45 +260,6 @@ in
";
};
enableIntel2200BGFirmware = mkOption {
default = false;
merge = obsoleteMerge;
description = "
Turn on this option if you want firmware for the Intel
PRO/Wireless 2200BG to be loaded automatically. This is
required if you want to use this device. Intel requires you to
accept the license for this firmware, see
<link xlink:href='http://ipw2200.sourceforge.net/firmware.php?fid=7'/>.
";
};
enableIntel3945ABGFirmware = mkOption {
default = false;
merge = obsoleteMerge;
description = "
This option enables automatic loading of the firmware for the Intel
PRO/Wireless 3945ABG.
";
};
enableIntel4965AGNFirmware = mkOption {
default = false;
merge = obsoleteMerge;
description = "
This option enables automatic loading of the firmware for the Intel
PRO/Wireless 4965AGN.
";
};
enableZydasZD1211Firmware = mkOption {
default = false;
merge = obsoleteMerge;
description = "
This option enables automatic loading of the firmware for the Zydas
ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip.
";
};
localCommands = mkOption {
default = "";
example = "text=anything; echo You can put $text here.";

View file

@ -155,7 +155,6 @@ rec {
++ pkgs.lib.optional config.networking.defaultMailServer.directDelivery pkgs.ssmtp
++ config.environment.extraPackages
++ pkgs.lib.optional config.fonts.enableFontDir fontDir
++ pkgs.lib.optional config.hardware.enableGo7007 kernelPackages.wis_go7007
# NSS modules need to be in `systemPath' so that (i) the builder
# chroot gets to seem them, and (ii) applications can benefit from

View file

@ -147,16 +147,8 @@ let
inherit modprobe config;
inherit (pkgs) stdenv writeText substituteAll udev procps;
inherit (pkgs.lib) cleanSource;
firmwareDirs =
pkgs.lib.optional config.networking.enableIntel2200BGFirmware pkgs.ipw2200fw
++ pkgs.lib.optional config.networking.enableIntel3945ABGFirmware pkgs.iwlwifi3945ucode
++ pkgs.lib.optional config.networking.enableIntel4965AGNFirmware kernelPackages.iwlwifi4965ucode
++ pkgs.lib.optional config.networking.enableZydasZD1211Firmware pkgs.zd1211fw
++ pkgs.lib.optional config.hardware.enableGo7007 "${kernelPackages.wis_go7007}/firmware"
++ config.services.udev.addFirmware;
extraUdevPkgs =
pkgs.lib.optional config.hardware.enableGo7007 kernelPackages.wis_go7007
++ config.services.udev.addUdevPkgs;
firmwareDirs = config.services.udev.addFirmware;
extraUdevPkgs = config.services.udev.addUdevPkgs;
})
# Makes LVM logical volumes available.