nixos/hardware.deviceTree: new module

Add support for custom device-tree files, and applying overlays to them.
This is useful for supporting non-discoverable hardware, such as sensors
attached to GPIO pins on a Raspberry Pi.
This commit is contained in:
Kai Wohlfahrt
2019-08-07 13:51:22 +01:00
parent 0a477846af
commit dd0a951279
6 changed files with 91 additions and 5 deletions
@@ -46,8 +46,8 @@ let
ln -s ${kernelPath} $out/kernel
ln -s ${config.system.modulesTree} $out/kernel-modules
${optionalString (pkgs.stdenv.hostPlatform.platform.kernelDTB or false) ''
ln -s ${config.boot.kernelPackages.kernel}/dtbs $out/dtbs
${optionalString (config.hardware.deviceTree.package != null) ''
ln -s ${config.hardware.deviceTree.package} $out/dtbs
''}
echo -n "$kernelParams" > $out/kernel-params