* Updated the kernel to 2.6.17.13.
* Run `make oldconfig' before building. * Split buildPhase into configure/build/installPhase. * Strip the kernel modules for a huge space savings. svn path=/nixpkgs/trunk/; revision=6555
This commit is contained in:
parent
5bfc14d14c
commit
f772de22a1
@ -1,21 +1,43 @@
|
|||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
|
|
||||||
buildPhase() {
|
|
||||||
|
configurePhase=configurePhase
|
||||||
|
configurePhase() {
|
||||||
cp $config .config
|
cp $config .config
|
||||||
#mkdir $out
|
#mkdir $out
|
||||||
hashname=$(basename $out)
|
hashname=$(basename $out)
|
||||||
echo $hashname
|
|
||||||
if echo "$hashname" | grep -q '^[a-z0-9]\{32\}-'; then
|
if echo "$hashname" | grep -q '^[a-z0-9]\{32\}-'; then
|
||||||
hashname=$(echo "$hashname" | cut -c -32)
|
hashname=$(echo "$hashname" | cut -c -32)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
extraname=$(grep ^EXTRAVERSION Makefile)
|
extraname=$(grep ^EXTRAVERSION Makefile)
|
||||||
perl -p -i -e "s/^EXTRAVERSION.*/$extraname-$hashname/" Makefile
|
perl -p -i -e "s/^EXTRAVERSION.*/$extraname-$hashname/" Makefile
|
||||||
echo "export INSTALL_PATH=$out" >> Makefile
|
export INSTALL_PATH=$out
|
||||||
export INSTALL_MOD_PATH=$out
|
export INSTALL_MOD_PATH=$out
|
||||||
|
|
||||||
|
make oldconfig
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
buildPhase=buildPhase
|
||||||
|
buildPhase() {
|
||||||
make
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
installPhase=installPhase
|
||||||
|
installPhase() {
|
||||||
|
|
||||||
|
ensureDir $out
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
make modules_install
|
make modules_install
|
||||||
|
|
||||||
|
# Strip the kernel modules.
|
||||||
|
echo "Stripping kernel modules..."
|
||||||
|
find $out -name "*.ko" -print0 | xargs -0 strip -S
|
||||||
|
|
||||||
# move this to install later on
|
# move this to install later on
|
||||||
# largely copied from early FC3 kernel spec files
|
# largely copied from early FC3 kernel spec files
|
||||||
stripHash $out
|
stripHash $out
|
||||||
@ -65,6 +87,5 @@ buildPhase() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildPhase=buildPhase
|
|
||||||
|
|
||||||
genericBuild
|
genericBuild
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
assert stdenv.system == "i686-linux";
|
assert stdenv.system == "i686-linux";
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "linux-2.6.17.6";
|
name = "linux-2.6.17.13";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.6.tar.bz2;
|
url = http://ftp.nl.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.13.tar.bz2;
|
||||||
md5 = "5013fbe6049e32675187c203aef92218";
|
md5 = "834885b3ad9988b966570bee92459572";
|
||||||
};
|
};
|
||||||
config = ./config-2.6.17.1;
|
config = ./config-2.6.17.1;
|
||||||
inherit perl;
|
inherit perl;
|
||||||
|
@ -2000,6 +2000,10 @@ rec {
|
|||||||
stdenv = overrideGCC stdenv gcc34;
|
stdenv = overrideGCC stdenv gcc34;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
kernel_2_6_17 = (import ../os-specific/linux/kernel/linux-2.6.17.nix) {
|
||||||
|
inherit fetchurl stdenv perl mktemp;
|
||||||
|
};
|
||||||
|
|
||||||
kernelHeaders = (import ../os-specific/linux/kernel-headers) {
|
kernelHeaders = (import ../os-specific/linux/kernel-headers) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user