about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/generic-extlinux-compatible
diff options
context:
space:
mode:
authorKai Wohlfahrt <kai@prodo.ai>2019-04-24 18:24:16 +0100
committerKai Wohlfahrt <kai@prodo.ai>2019-08-07 13:51:22 +0100
commitdd0a9512797faa83bd1f974b10ef4d620200a79a (patch)
tree5b97f95445c6e3724520f184cdedd6d4d25d9827 /nixos/modules/system/boot/loader/generic-extlinux-compatible
parent0a477846af2837752687ced588b71108ff010bb2 (diff)
downloadnixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.tar
nixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.tar.gz
nixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.tar.bz2
nixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.tar.lz
nixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.tar.xz
nixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.tar.zst
nixlib-dd0a9512797faa83bd1f974b10ef4d620200a79a.zip
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.
Diffstat (limited to 'nixos/modules/system/boot/loader/generic-extlinux-compatible')
-rw-r--r--nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh
index c780a89b102c..0092ee92b62f 100644
--- a/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh
+++ b/nixos/modules/system/boot/loader/generic-extlinux-compatible/extlinux-conf-builder.sh
@@ -75,9 +75,8 @@ addEntry() {
 
     copyToKernelsDir "$path/kernel"; kernel=$result
     copyToKernelsDir "$path/initrd"; initrd=$result
-    # XXX UGLY: maybe the system config should have a top-level "dtbs" entry?
-    dtbDir=$(readlink -m "$path/kernel/../dtbs")
-    if [ -d "$dtbDir" ]; then
+    dtbDir=$(readlink -m "$path/dtbs")
+    if [ -e "$dtbDir" ]; then
         copyToKernelsDir "$dtbDir"; dtbs=$result
     fi