Author: stordeur
Date: Mon Jul 11 13:59:37 2011
New Revision: 27708
URL: https://svn.nixos.org/websvn/nix/?rev=27708&sc=1
Log:
Improved the Linux kernel building framework
Moved the hardcoded postBuild hook from the builder to generic.nix:
Some old kernel (such as 2.6.15) did not yet support the unifdef target.
As a result, compiling them with the current Linux builder leads to a
failure.
Fixed by moving this hook as argument of the top-level function of
generic.nix. This allows some kernel nix codes to overrides its default
value.
Modified:
nixpkgs/trunk/pkgs/os-specific/linux/kernel/builder.sh
nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix
Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/builder.sh
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/builder.sh Mon Jul 11
13:48:26 2011 (r27707)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/builder.sh Mon Jul 11
13:59:37 2011 (r27708)
@@ -16,8 +16,8 @@
}
configurePhase() {
- if test -n "$preConfigure"; then
- eval "$preConfigure";
+ if test -n "$preConfigure"; then
+ eval "$preConfigure";
fi
export INSTALL_PATH=$out
@@ -46,13 +46,6 @@
}
-postBuild() {
- # After the builder did a 'make all' (kernel + modules)
- # we force building the target asked: bzImage/zImage/uImage/...
- make $makeFlags $kernelTarget
- make $makeFlags -C scripts unifdef
-}
-
installPhase() {
ensureDir $out
@@ -149,8 +142,8 @@
fi
fi
- if test -n "$postInstall"; then
- eval "$postInstall";
+ if test -n "$postInstall"; then
+ eval "$postInstall";
fi
}
Modified: nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix Mon Jul 11
13:48:26 2011 (r27707)
+++ nixpkgs/trunk/pkgs/os-specific/linux/kernel/generic.nix Mon Jul 11
13:59:37 2011 (r27708)
@@ -35,6 +35,10 @@
, extraMeta ? {}
, ubootChooser ? null
, postInstall ? ""
+
+, # After the builder did a 'make all' (kernel + modules)
+ # we force building the target asked: bzImage/zImage/uImage/...
+ postBuild ? "make $makeFlags $kernelTarget; make $makeFlags -C scripts
unifdef"
, ...
}:
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits