Skip to content

Commit b2cc141

Browse files
committed
overlaycheck: Add bcm2712 support
Recognise bcm2712 as an architecture name and look for bcm2712-* dts files. Signed-off-by: Phil Elwell <[email protected]>
1 parent ac56297 commit b2cc141

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

overlaycheck/overlaycheck

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ my @base_files = (
2525
"bcm2710-rpi-3-b-plus",
2626
"bcm2710-rpi-cm3",
2727
"bcm2710-rpi-zero-2",
28+
"bcm2712-rpi-5-b",
2829
);
2930

3031
$ENV{'LD_LIBRARY_PATH'} = "$ENV{'HOME'}/lib";
@@ -240,9 +241,10 @@ if ($try_all)
240241
my $overlay_props = $source->{$overlay}[0];
241242
foreach my $base (@base_files)
242243
{
243-
next if (!-f "../$base.dts");
244-
next if (($overlay =~ /(wifi|bt)/) && ($base !~ /^(bcm2708-rpi-zero-w|bcm2709-rpi-zero-2|bcm2710-rpi-3-|bcm2711-rpi-4-)/));
244+
next if (!-f "$TMPDIR/$base.dtb");
245+
next if (($overlay =~ /(wifi|bt)/) && ($base !~ /^(bcm2708-rpi-zero-w|bcm2709-rpi-zero-2|bcm2710-rpi-3-|bcm2711-rpi-(4|cm4$)|bcm2712-rpi-5)/));
245246
next if ($overlay_props->{'bcm2711'} && $base !~ /^bcm2711/);
247+
next if ($overlay_props->{'bcm2712'} && $base !~ /^bcm2712/);
246248
next if (system("$DTMERGE $TMPDIR/$base.dtb $MERGED_DTB $TMPDIR/$overlay.dtbo >/dev/null 2>&1") == ((-2 & 0xff) << 8));
247249
error("Failed to merge $overlay with $base") if (system($DTMERGE, $verbose ? ('-d') : (), "$TMPDIR/$base.dtb", $MERGED_DTB, "$TMPDIR/$overlay.dtbo") != 0);
248250
}
@@ -327,7 +329,7 @@ sub parse_source_files
327329

328330
chdir($dtssubdir);
329331

330-
foreach my $file (glob("bcm2708*.dts bcm2709*.dts bcm2710*.dts bcm2711*.dts"))
332+
foreach my $file (glob("bcm2708*.dts bcm2709*.dts bcm2710*.dts bcm2711*.dts bcm2712*.dts"))
331333
{
332334
foreach my $param (get_params($file))
333335
{
@@ -700,6 +702,7 @@ sub get_params
700702
error("Invalid overlay compatible string '$comp' in '$file'");
701703
}
702704
$props->{'bcm2711'} = 1 if ($comp eq 'brcm,bcm2711');
705+
$props->{'bcm2712'} = 1 if ($comp eq 'brcm,bcm2712');
703706
}
704707
}
705708
elsif ($line =~ /^\s+(?:__symbols__|__fixups__|__local_fixups__)/)

0 commit comments

Comments
 (0)