From 9e04b57dde58c4db462bba8057e49eb071f5e5c0 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 12 Feb 2017 02:56:29 +0200 Subject: nixos top-level: Add 'dtbs' symlink when kernel uses device trees Currently e.g. extlinux-conf-builder.sh uses `readlink -m "$toplevel/kernel/../dtbs"` to figure out the directory. That is obscenely ugly. --- nixos/modules/system/activation/top-level.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nixos/modules/system/activation') diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 0c08375da646..84c23bed3e3b 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -45,6 +45,9 @@ let ln -s ${kernelPath} $out/kernel ln -s ${config.system.modulesTree} $out/kernel-modules + ${optionalString (pkgs.stdenv.platform.kernelDTB or false) '' + ln -s ${config.boot.kernelPackages.kernel}/dtbs $out/dtbs + ''} echo -n "$kernelParams" > $out/kernel-params -- cgit 1.4.1