Updating the logic to put the resulting kernel image into its store path.

svn path=/nixpkgs/branches/stdenv-updates/; revision=18289
This commit is contained in:
Lluís Batlle i Rossell 2009-11-08 17:19:46 +00:00
parent 5eeac0d52a
commit 7769ad11bd
2 changed files with 18 additions and 9 deletions

View File

@ -55,7 +55,7 @@ configurePhase() {
} }
postBuild() { postBuild() {
if [ -n "$makeUImage" ]; then if [ "$platformName" == "sheevaplug" ]; then
make uImage make uImage
fi fi
} }
@ -77,13 +77,17 @@ installPhase() {
ensureDir $out/bin ensureDir $out/bin
cp linux $out/bin cp linux $out/bin
else else
if [ -n "$makeUImage" ]; then case $platformName in
image=arch/$archDir/boot/uImage sheevaplug)
cp arch/$archDir/boot/uImage $out cp arch/$archDir/boot/uImage $out
else ;;
versatileARM)
cp arch/$archDir/boot/zImage $out
;;
*)
cp arch/$archDir/boot/bzImage $out/vmlinuz cp arch/$archDir/boot/bzImage $out/vmlinuz
fi ;;
esac
fi fi
cp vmlinux $out cp vmlinux $out

View File

@ -37,13 +37,17 @@
, preConfigure ? "" , preConfigure ? ""
, extraMeta ? {} , extraMeta ? {}
, platform ? { uboot = null; } , platform ? { name = "pc"; uboot = null; }
, ... , ...
}: }:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
|| stdenv.system == "armv5tel-linux"; || stdenv.system == "armv5tel-linux";
assert platform.name == "sheevaplug" -> platform.uboot != null;
assert (platform.name == "sheevaplug" || platform.name == "versatileARM") ->
stdenv.system == "armv5tel-linux";
let let
lib = stdenv.lib; lib = stdenv.lib;
@ -76,6 +80,9 @@ stdenv.mkDerivation {
buildInputs = [perl mktemp] buildInputs = [perl mktemp]
++ lib.optional (platform.uboot != null) [platform.uboot]; ++ lib.optional (platform.uboot != null) [platform.uboot];
platformName = platform.name;
arch = arch =
if xen then "xen" else if xen then "xen" else
if userModeLinux then "um" else if userModeLinux then "um" else
@ -91,8 +98,6 @@ stdenv.mkDerivation {
allowLocalVersion = false; # don't allow patches to set a suffix allowLocalVersion = false; # don't allow patches to set a suffix
inherit localVersion; # but do allow the user to set one. inherit localVersion; # but do allow the user to set one.
makeUImage = if (platform.uboot != null) then true else false;
meta = { meta = {
description = description =
(if userModeLinux then (if userModeLinux then