From 739ef5e82a91be136ddeb09ed373dd2e3da2d538 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 15 Jan 2009 15:00:30 +0000 Subject: [PATCH] * Various hacks needed to get the NVIDIA driver to build on Linux 2.6.28. In particular the arch-specific headers are in a different place now. (I'd like to do "make headers_install", but it doesn't install all the headers that are needed to build external kernel modules. What a mess.) * Add Linux 2.6.28 to the channel. svn path=/nixpkgs/trunk/; revision=13775 --- pkgs/os-specific/linux/kernel/builder.sh | 13 ++++++++----- pkgs/os-specific/linux/nvidia/builder.sh | 2 ++ pkgs/top-level/build-for-release.nix | 7 +++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/builder.sh b/pkgs/os-specific/linux/kernel/builder.sh index c5805d3242e4..38d437f3375a 100644 --- a/pkgs/os-specific/linux/kernel/builder.sh +++ b/pkgs/os-specific/linux/kernel/builder.sh @@ -122,11 +122,14 @@ installPhase() { cp -a scripts $out/lib/modules/$version/build # copy include files - mkdir -p $out/lib/modules/$version/build/include - cd include - cp -a acpi config linux math-emu media net pcmcia rxrpc scsi sound video asm asm-generic $out/lib/modules/$version/build/include - cp -a `readlink asm` $out/lib/modules/$version/build/include - cd .. + includeDir=$out/lib/modules/$version/build/include + mkdir -p $includeDir + (cd include && cp -a acpi config linux math-emu media net pcmcia rxrpc scsi sound video asm-generic $includeDir) + if test -e arch/$archDir/include/asm; then + cp -a arch/$archDir/include/asm $includeDir + else + cp -a include/$archDir $includeDir + fi fi } diff --git a/pkgs/os-specific/linux/nvidia/builder.sh b/pkgs/os-specific/linux/nvidia/builder.sh index eaec6d56ed0a..16bc0628b9b6 100755 --- a/pkgs/os-specific/linux/nvidia/builder.sh +++ b/pkgs/os-specific/linux/nvidia/builder.sh @@ -22,6 +22,8 @@ buildPhase() { kernelVersion=$(cd $kernel/lib/modules && ls) sysSrc=$(echo $kernel/lib/modules/$kernelVersion/build/) unset src # used by the nv makefile + # Hack necessary to compile on 2.6.28. + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$sysSrc/include/asm/mach-default" make SYSSRC=$sysSrc module cd ../../.. } diff --git a/pkgs/top-level/build-for-release.nix b/pkgs/top-level/build-for-release.nix index bf2aa7bba052..884a22a0e08b 100644 --- a/pkgs/top-level/build-for-release.nix +++ b/pkgs/top-level/build-for-release.nix @@ -264,6 +264,13 @@ let inherit (pkgs.kernelPackages_2_6_27) kernel klibc +# splashutils + ; + }; + kernelPackages_2_6_28 = pkgs.recurseIntoAttrs { + inherit (pkgs.kernelPackages_2_6_28) + kernel + klibc # splashutils ; };