* 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
3 changed files with 32 additions and 7 deletions
|
@ -1,21 +1,43 @@
|
|||
source $stdenv/setup
|
||||
|
||||
buildPhase() {
|
||||
|
||||
configurePhase=configurePhase
|
||||
configurePhase() {
|
||||
cp $config .config
|
||||
#mkdir $out
|
||||
hashname=$(basename $out)
|
||||
echo $hashname
|
||||
if echo "$hashname" | grep -q '^[a-z0-9]\{32\}-'; then
|
||||
hashname=$(echo "$hashname" | cut -c -32)
|
||||
fi
|
||||
|
||||
extraname=$(grep ^EXTRAVERSION 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
|
||||
|
||||
make oldconfig
|
||||
}
|
||||
|
||||
|
||||
buildPhase=buildPhase
|
||||
buildPhase() {
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
installPhase=installPhase
|
||||
installPhase() {
|
||||
|
||||
ensureDir $out
|
||||
|
||||
make 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
|
||||
# largely copied from early FC3 kernel spec files
|
||||
stripHash $out
|
||||
|
@ -65,6 +87,5 @@ buildPhase() {
|
|||
|
||||
}
|
||||
|
||||
buildPhase=buildPhase
|
||||
|
||||
genericBuild
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
assert stdenv.system == "i686-linux";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "linux-2.6.17.6";
|
||||
name = "linux-2.6.17.13";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.6.tar.bz2;
|
||||
md5 = "5013fbe6049e32675187c203aef92218";
|
||||
url = http://ftp.nl.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.13.tar.bz2;
|
||||
md5 = "834885b3ad9988b966570bee92459572";
|
||||
};
|
||||
config = ./config-2.6.17.1;
|
||||
inherit perl;
|
||||
|
|
|
@ -2000,6 +2000,10 @@ rec {
|
|||
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) {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue