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

View file

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