mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-11-30 13:03:30 +01:00
Merge pull request #2044 from hatch01/fix-vendor-overlays
raspberry-pi/firmware: stage vendor overlays independent of dtbSrc
This commit is contained in:
1 file changed
+20
-2
@@ -70,14 +70,32 @@ let
|
||||
kept[$dst]=1
|
||||
done
|
||||
|
||||
if [ -d "$dtbSrc/overlays" ]; then
|
||||
for ovr in "$dtbSrc"/overlays/*; do
|
||||
# hardware.raspberry-pi.configtxt.deviceTreeOverlays entries are
|
||||
# matched by filename against the vendor .dtbo set the Raspberry Pi
|
||||
# firmware ships, regardless of whether the *base* dtb above came
|
||||
# from the generation or from firmwareBoot. Stage those
|
||||
# unconditionally so config.txt's "dtoverlay=" lines have a target
|
||||
# to apply, even when useGenerationDeviceTree = true.
|
||||
if [ -d "$firmwareBoot/overlays" ]; then
|
||||
for ovr in "$firmwareBoot"/overlays/*; do
|
||||
dst="$target/overlays/$(basename "$ovr")"
|
||||
copyForced "$ovr" "$dst"
|
||||
kept[$dst]=1
|
||||
done
|
||||
fi
|
||||
|
||||
# When useGenerationDeviceTree also produced its own overlays
|
||||
# (built via hardware.deviceTree.overlays), stage those too,
|
||||
# letting them take precedence over same-named vendor overlays.
|
||||
if [ "$dtbSrc" != "$firmwareBoot" ] && [ -d "$dtbSrc/overlays" ]; then
|
||||
for ovr in "$dtbSrc"/overlays/*; do
|
||||
dst="$target/overlays/$(basename "$ovr")"
|
||||
copyForced "$ovr" "$dst"
|
||||
kept[$dst]=1
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Prune stale device trees / overlays.
|
||||
for fn in "$target"/*.dtb "$target"/overlays/*; do
|
||||
if [ "''${kept[$fn]:-}" != 1 ]; then
|
||||
|
||||
Reference in new issue
Block a user