From 71ed6194e1c4fa17d8c6eae83e01ca38e05233d5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 12 Dec 2009 18:55:17 +0000 Subject: [PATCH] * Get fbcondecor to work. * Barf on ignored options. svn path=/nixpkgs/branches/kernel-config/; revision=18914 --- pkgs/os-specific/linux/kernel/builder.sh | 12 ++++++------ .../linux/kernel/generate-config.pl | 2 +- pkgs/os-specific/linux/kernel/generic.nix | 11 +---------- pkgs/os-specific/linux/kernel/linux-2.6.29.nix | 14 +++----------- pkgs/top-level/all-packages.nix | 18 +++++++++++++++++- 5 files changed, 28 insertions(+), 29 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/builder.sh b/pkgs/os-specific/linux/kernel/builder.sh index 0d3b561d247..59def5799b4 100644 --- a/pkgs/os-specific/linux/kernel/builder.sh +++ b/pkgs/os-specific/linux/kernel/builder.sh @@ -1,6 +1,10 @@ source $stdenv/setup +export SHELL=bash +export ARCH=$arch + + configurePhase() { if test -n "$preConfigure"; then eval "$preConfigure"; @@ -10,12 +14,8 @@ configurePhase() { export INSTALL_MOD_PATH=$out - # Get rid of any "localversion" files installed by patches. - if test -z "$allowLocalVersion"; then - rm -f localversion* - fi - # Set our own localversion, if specified. + rm -f localversion* if test -n "$localVersion"; then echo "$localVersion" > localversion-nix fi @@ -28,7 +28,7 @@ configurePhase() { # Create the config file. echo "generating kernel configuration..." echo "$kernelConfig" > kernel-config - ARCH=$arch KERNEL_CONFIG=kernel-config SHELL=bash NIX_INDENT_MAKE= perl -w $generateConfig + KERNEL_CONFIG=kernel-config perl -w $generateConfig } diff --git a/pkgs/os-specific/linux/kernel/generate-config.pl b/pkgs/os-specific/linux/kernel/generate-config.pl index d421707727c..2acba32e8d7 100644 --- a/pkgs/os-specific/linux/kernel/generate-config.pl +++ b/pkgs/os-specific/linux/kernel/generate-config.pl @@ -123,7 +123,7 @@ while () { close CONFIG; foreach my $name (sort (keys %answers)) { - print STDERR "unused option: $name\n" + die "unused option: $name\n" unless defined $config{$name}; die "option not set correctly: $name\n" if $config{$name} && $config{$name} ne $answers{$name}; diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 8e6bd462ed3..85fd91ca1bb 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -56,10 +56,8 @@ stdenv.mkDerivation { generateConfig = ./generate-config.pl; - inherit preConfigure; + inherit preConfigure src module_init_tools localVersion; - inherit src config; - patches = map (p: p.patch) kernelPatches; kernelConfig = @@ -77,13 +75,6 @@ stdenv.mkDerivation { if stdenv.system == "x86_64-linux" then "x86_64" else abort "Platform ${stdenv.system} is not supported."; - makeFlags = if userModeLinux then "ARCH=um SHELL=bash" else ""; - - inherit module_init_tools; - - allowLocalVersion = false; # don't allow patches to set a suffix - inherit localVersion; # but do allow the user to set one. - meta = { description = (if userModeLinux then diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.29.nix b/pkgs/os-specific/linux/kernel/linux-2.6.29.nix index e619287d8a4..120fd182f20 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.29.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.29.nix @@ -33,7 +33,9 @@ import ./generic.nix ( XEN y # We need 64 GB (PAE) support for Xen guest support. - HIGHMEM64G y + ${stdenv.lib.optionalString (stdenv.system == "i686-linux") '' + HIGHMEM64G y + ''} # Enable the kernel's built-in memory tester. MEMTEST y @@ -91,16 +93,6 @@ import ./generic.nix ( # Some settings to make sure that fbcondecor works - in particular, # disable tileblitting and the drivers that need it. - FB y - FB_TILEBLITTING n - FB_MATROX n - FB_S3 n - FB_VT8623 n - FB_ARK n - FB_CFB_FILLRECT y - FB_CFB_COPYAREA y - FB_CFB_IMAGEBLIT y - FB_VESA y # Enable various FB devices. FB_EFI y diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 097150524e8..cb1bc81e871 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5477,7 +5477,23 @@ let url = http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.6-2.6.29.2.patch; sha256 = "1yppvji13sgnql62h4wmskzl9l198pp1pbixpbymji7mr4a0ylx1"; }; - extraConfig = "CONFIG_FB_CON_DECOR=y"; + extraConfig = + '' + FB_CON_DECOR y + + # fbcondecor is picky about some other settings. + FB y + FB_TILEBLITTING n + FB_MATROX n + FB_S3 n + FB_VT8623 n + FB_ARK n + FB_CFB_FILLRECT y + FB_CFB_COPYAREA y + FB_CFB_IMAGEBLIT y + FB_VESA y + FRAMEBUFFER_CONSOLE y + ''; features = { fbConDecor = true; }; } { name = "sec_perm-2.6.24";