mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-06 18:08:38 +08:00
Merge pull request #543 from ipetkov/fix-device-tree-overlays
raspberry-pi/4/dtmerge: fix application of overlays
This commit is contained in:
@@ -24,15 +24,12 @@ with lib; (base: overlays': stdenvNoCC.mkDerivation {
|
|||||||
# skip incompatible and non-matching overlays
|
# skip incompatible and non-matching overlays
|
||||||
if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then
|
if [[ ! "$dtbCompat" =~ "$overlayCompat" ]]; then
|
||||||
echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")"
|
echo "Skipping overlay ${o.name}: incompatible with $(basename "$dtb")"
|
||||||
continue
|
elif ${if ((o.filter or null) == null) then "false" else ''
|
||||||
fi
|
[[ "''${dtb//${o.filter}/}" == "$dtb" ]]
|
||||||
${optionalString ((o.filter or null) != null) ''
|
|
||||||
if [[ "''${dtb//${o.filter}/}" == "$dtb" ]]; then
|
|
||||||
echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
''}
|
''}
|
||||||
|
then
|
||||||
|
echo "Skipping overlay ${o.name}: filter does not match $(basename "$dtb")"
|
||||||
|
else
|
||||||
echo -n "Applying overlay ${o.name} to $(basename "$dtb")... "
|
echo -n "Applying overlay ${o.name} to $(basename "$dtb")... "
|
||||||
mv "$dtb"{,.in}
|
mv "$dtb"{,.in}
|
||||||
|
|
||||||
@@ -44,6 +41,7 @@ with lib; (base: overlays': stdenvNoCC.mkDerivation {
|
|||||||
|
|
||||||
echo "ok"
|
echo "ok"
|
||||||
rm "$dtb.in" "$dtboWithExt"
|
rm "$dtb.in" "$dtboWithExt"
|
||||||
|
fi
|
||||||
'')}
|
'')}
|
||||||
|
|
||||||
done'';
|
done'';
|
||||||
|
|||||||
Reference in New Issue
Block a user