summary refs log tree commit diff
path: root/pkgs/build-support/kernel
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2017-11-05 16:58:14 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2017-11-05 17:06:59 +0200
commit0d9f2f0bb497020af31c93706cdf970a3db4bdfc (patch)
treeb0c7e8ec53c54f93c1b1bb00c0a98d0bb909f1e7 /pkgs/build-support/kernel
parent14f232d812e94a9de4fdb5693c362b8660d2c272 (diff)
downloadnixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.tar
nixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.tar.gz
nixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.tar.bz2
nixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.tar.lz
nixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.tar.xz
nixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.tar.zst
nixpkgs-0d9f2f0bb497020af31c93706cdf970a3db4bdfc.zip
platforms.nix: Clean up more 'uboot' legacy
For a while now, the only thing the 'uboot' attribute does is to tell
whether to add ubootTools to kernel/initrd builds. That can be
determined with platform.kernelTarget == "uImage" just as well.
Diffstat (limited to 'pkgs/build-support/kernel')
-rw-r--r--pkgs/build-support/kernel/make-initrd.nix13
1 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix
index 6fcdc93b104..5353ae82841 100644
--- a/pkgs/build-support/kernel/make-initrd.nix
+++ b/pkgs/build-support/kernel/make-initrd.nix
@@ -16,17 +16,14 @@
 , hostPlatform
 }:
 
-let
-  inputsFun = ubootName : [ perl cpio ]
-    ++ stdenv.lib.optional (ubootName != null) ubootTools;
-  makeUInitrdFun = ubootName : (ubootName != null);
-in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "initrd";
   builder = ./make-initrd.sh;
-  nativeBuildInputs = inputsFun hostPlatform.platform.uboot;
 
-  makeUInitrd = makeUInitrdFun hostPlatform.platform.uboot;
+  makeUInitrd = hostPlatform.platform.kernelTarget == "uImage";
+
+  nativeBuildInputs = [ perl cpio ]
+    ++ stdenv.lib.optional makeUInitrd ubootTools;
 
   # !!! should use XML.
   objects = map (x: x.object) contents;