diff options
author | Ludovic Stordeur <Ludovic.Stordeur@inria.fr> | 2011-07-11 13:59:37 +0000 |
---|---|---|
committer | Ludovic Stordeur <Ludovic.Stordeur@inria.fr> | 2011-07-11 13:59:37 +0000 |
commit | 8268a39690b036f9687ced0db23e9760505ec8c6 (patch) | |
tree | b5a94ec43b7de1c3c6eb4faa61f5b925b796004c /pkgs/os-specific | |
parent | eabbecd10f36e4513952c9224c0412d0b5442a05 (diff) | |
download | nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.tar nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.tar.gz nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.tar.bz2 nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.tar.lz nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.tar.xz nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.tar.zst nixlib-8268a39690b036f9687ced0db23e9760505ec8c6.zip |
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. svn path=/nixpkgs/trunk/; revision=27708
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/builder.sh | 15 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/kernel/builder.sh b/pkgs/os-specific/linux/kernel/builder.sh index 5bedebc11ec8..61cb8f280810 100644 --- a/pkgs/os-specific/linux/kernel/builder.sh +++ b/pkgs/os-specific/linux/kernel/builder.sh @@ -16,8 +16,8 @@ postPatch() { } configurePhase() { - if test -n "$preConfigure"; then - eval "$preConfigure"; + if test -n "$preConfigure"; then + eval "$preConfigure"; fi export INSTALL_PATH=$out @@ -46,13 +46,6 @@ configurePhase() { } -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 @@ installPhase() { fi fi - if test -n "$postInstall"; then - eval "$postInstall"; + if test -n "$postInstall"; then + eval "$postInstall"; fi } diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 42cefd5b584f..138c9a53d041 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -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" , ... }: |