diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 024b1ffe9fa..3a92c2f4d29 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -1,30 +1,34 @@ -{stdenv, fetchurl, perl, bison, mktemp, kernel - , version ? "1.5" - , sha256 ? "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017" - , subdir ? "" - , addPreBuild ? "" -}: +{stdenv, fetchurl, perl, bison, mktemp, kernelHeaders}: assert stdenv.isLinux; +let version = "1.5"; in + stdenv.mkDerivation { name = "klibc-${version}"; - #builder = ./builder.sh; + + src = fetchurl { + url = "mirror://kernel/linux/libs/klibc/klibc-${version}.tar.bz2"; + sha256 = "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017"; + }; + makeFlags = ["V=1" "prefix=$out" "SHLIBDIR=$out/lib"]; + preBuild = '' makeFlags=$(eval "echo $makeFlags") - mkdir -p linux/include - cp -prd $kernel/lib/modules/*/build/include/* linux/include/ + mkdir linux + cp -prsd ${kernelHeaders}/include linux/ chmod -R u+w linux/include/ - '' + addPreBuild; - src = fetchurl { - url = "mirror://kernel/linux/libs/klibc/${subdir}klibc-${version}.tar.bz2"; - inherit sha256; -# url = mirror://kernel/linux/libs/klibc/Testing/klibc-1.5.14.tar.bz2; -# sha256 = "1cmrqpgamnv2ns7dlxjm61zc88dxm4ff0aya413ij1lmhp2h2sfc"; - }; - inherit kernel; + ''; # */ + + # Install static binaries as well. + postInstall = '' + dir=$out/lib/klibc/bin.static + mkdir $dir + cp $(find $(find . -name static) -type f ! -name "*.g" -a ! -name ".*") $dir/ + cp usr/dash/sh $dir/ + ''; + buildInputs = [perl bison mktemp]; - #patches = [./install.patch]; } diff --git a/pkgs/os-specific/linux/splashutils/1.3.nix b/pkgs/os-specific/linux/splashutils/1.3.nix index 9775f66a1b7..51c53dd2a79 100644 --- a/pkgs/os-specific/linux/splashutils/1.3.nix +++ b/pkgs/os-specific/linux/splashutils/1.3.nix @@ -2,10 +2,12 @@ stdenv.mkDerivation { name = "splashutils-1.3"; + src = fetchurl { url = http://dev.gentoo.org/~spock/projects/splashutils/archive/splashutils-1.3.tar.bz2; md5 = "c7c92b98e34b860511aa57bd29d62f76"; }; + patches = [ ./purity.patch ./no-fbsplash.patch diff --git a/pkgs/os-specific/linux/splashutils/no-fbsplash.patch b/pkgs/os-specific/linux/splashutils/no-fbsplash.patch index a39fda6591c..f83275ea84a 100644 --- a/pkgs/os-specific/linux/splashutils/no-fbsplash.patch +++ b/pkgs/os-specific/linux/splashutils/no-fbsplash.patch @@ -1,21 +1,67 @@ -diff --git a/splash.h b/splash.h -index 5dccfe0..eae2939 100644 ---- a/splash.h -+++ b/splash.h -@@ -30,10 +30,14 @@ #endif - */ - #ifdef TARGET_KERNEL - #include -- #include -+ #ifdef CONFIG_FBSPLASH -+ #include -+ #endif - #else - #include -- #include -+ #ifdef CONFIG_FBSPLASH -+ #include -+ #endif - #endif - - /* +diff -rc splashutils-1.3-orig/splash.h splashutils-1.3/splash.h +*** splashutils-1.3-orig/splash.h 2006-07-15 00:02:23.000000000 +0200 +--- splashutils-1.3/splash.h 2009-01-29 16:41:00.000000000 +0100 +*************** +*** 21,40 **** + */ + #ifdef TARGET_KERNEL + #include +- #include + #else + #include +- #include + #endif + + /* + * Necessary to avoid compilation errors when fbsplash support is + * disabled. + */ +- #if !defined(CONFIG_FBSPLASH) + #define FB_SPLASH_IO_ORIG_USER 0 + #define FB_SPLASH_IO_ORIG_KERNEL 1 +! #endif + + /* + * Adjustable settings +--- 21,60 ---- + */ + #ifdef TARGET_KERNEL + #include + #else + #include + #endif + + /* + * Necessary to avoid compilation errors when fbsplash support is + * disabled. + */ + #define FB_SPLASH_IO_ORIG_USER 0 + #define FB_SPLASH_IO_ORIG_KERNEL 1 +! +! #define FBIOSPLASH_SETCFG _IOWR('F', 0x19, struct fb_splash_iowrapper) +! #define FBIOSPLASH_GETCFG _IOR('F', 0x1A, struct fb_splash_iowrapper) +! #define FBIOSPLASH_SETSTATE _IOWR('F', 0x1B, struct fb_splash_iowrapper) +! #define FBIOSPLASH_GETSTATE _IOR('F', 0x1C, struct fb_splash_iowrapper) +! #define FBIOSPLASH_SETPIC _IOWR('F', 0x1D, struct fb_splash_iowrapper) +! +! #define FB_SPLASH_THEME_LEN 128 /* Maximum lenght of a theme name */ +! +! struct fb_splash_iowrapper +! { +! unsigned short vc; /* Virtual console */ +! unsigned char origin; /* Point of origin of the request */ +! void *data; +! }; +! +! /* A structure used by the framebuffer splash code (drivers/video/fbsplash.c) */ +! struct vc_splash { +! __u8 bg_color; /* The color that is to be treated as transparent */ +! __u8 state; /* Current splash state: 0 = off, 1 = on */ +! __u16 tx, ty; /* Top left corner coordinates of the text field */ +! __u16 twidth, theight; /* Width and height of the text field */ +! char* theme; +! }; + + /* + * Adjustable settings +Only in splashutils-1.3/: splash.h~ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8df2807e02d..412c201a522 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6213,7 +6213,7 @@ let "# CONFIG_PROC_MM_DUMPABLE is not set\n"; } { name = "fbsplash-0.9.2-r5-2.6.21"; - patch = fetchurl { + patch = fetchurl { # !!! missing! url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.21/4200_fbsplash-0.9.2-r5.patch; sha256 = "00s8074fzsly2zpir885zqkvq267qyzg6vhsn7n1z2v1z78avxd8"; }; @@ -6227,7 +6227,7 @@ let kernelPatches = [ { name = "fbsplash-0.9.2-r5-2.6.21"; patch = fetchurl { - url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.22/4200_fbsplash-0.9.2-r5.patch; + url = http://nixos.org/tarballs/4200_fbsplash-0.9.2-r5.patch; sha256 = "0822wwlf2dqsap5qslnnp0yl1nbvvvb76l73w2dd8zsyn0bqg3px"; }; extraConfig = "CONFIG_FB_SPLASH=y"; @@ -6261,7 +6261,7 @@ let */ { name = "fbsplash-0.9.2-r5-2.6.21"; patch = fetchurl { - url = http://dev.gentoo.org/~dsd/genpatches/trunk/2.6.22/4200_fbsplash-0.9.2-r5.patch; + url = http://nixos.org/tarballs/4200_fbsplash-0.9.2-r5.patch; sha256 = "0822wwlf2dqsap5qslnnp0yl1nbvvvb76l73w2dd8zsyn0bqg3px"; }; extraConfig = "CONFIG_FB_SPLASH=y"; @@ -6415,16 +6415,6 @@ let inherit kernel; }; - # Actually, klibc builds fine with the static kernelHeaders, but - # splashutils expects a klibc with patched headers... - klibc = composedArgsAndFun (import ../os-specific/linux/klibc) { - inherit fetchurl stdenv perl bison mktemp kernel; - }; - - klibcShrunk = composedArgsAndFun (import ../os-specific/linux/klibc/shrunk.nix) { - inherit stdenv klibc; - }; - splashutils = if kernel.features ? fbSplash then splashutils_13 else if kernel.features ? fbConDecor && system != "x86_64-linux" then splashutils_15 else @@ -6530,6 +6520,15 @@ let inherit fetchurl stdenv bison flex perl; }; + klibc = composedArgsAndFun (import ../os-specific/linux/klibc) { + inherit fetchurl stdenv perl bison mktemp; + kernelHeaders = glibc.kernelHeaders; + }; + + klibcShrunk = composedArgsAndFun (import ../os-specific/linux/klibc/shrunk.nix) { + inherit stdenv klibc; + }; + kvm = kvm76; kvm57 = import ../os-specific/linux/kvm/57.nix {