From 7769ad11bdb1ac871d08c6ef9cc47321c53c053f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 8 Nov 2009 17:19:46 +0000 Subject: [PATCH] Updating the logic to put the resulting kernel image into its store path. svn path=/nixpkgs/branches/stdenv-updates/; revision=18289 --- pkgs/os-specific/linux/kernel/builder.sh | 16 ++++++++++------ pkgs/os-specific/linux/kernel/generic.nix | 11 ++++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/builder.sh b/pkgs/os-specific/linux/kernel/builder.sh index 88946b4a18f4..a910f0b9b5b3 100644 --- a/pkgs/os-specific/linux/kernel/builder.sh +++ b/pkgs/os-specific/linux/kernel/builder.sh @@ -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 diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 31af236ffae6..0536b562612a 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -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