Skip to content

Commit 756b5c5

Browse files
committed
overlaycheck: Handle the broadcom subdirectory
The 6.5 kernel moves the base dts files into a "broadcom" subdirectory, requiring special handling.
1 parent c52fa4b commit 756b5c5

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

overlaycheck/overlaycheck

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ my $kerndir = `git rev-parse --show-toplevel 2>/dev/null`;
8383
chomp($kerndir);
8484
fatal_error("This isn't a Linux repository") if (!-d "$kerndir/kernel");
8585

86-
chdir($kerndir."/arch/arm/boot/dts");
86+
my $dtsdir = $kerndir."/arch/arm/boot/dts";
87+
my $dtssubdir = $dtsdir;
88+
$dtssubdir .= "/broadcom" if (-d $dtsdir."/broadcom");
89+
chdir($dtssubdir);
8790

8891
my @cpp_cmd = ('arm-linux-gnueabihf-cpp',
8992
'-nostdinc',
@@ -126,11 +129,13 @@ my ($ignore_missing, $ignore_vestigial) = parse_exclusions($exclusions_file);
126129

127130
# Parse the README
128131

132+
chdir($dtsdir);
133+
129134
my $readme = parse_readme("overlays/README");
130135

131136
# Parse the base dts's and overlays
132137

133-
my $source = parse_source_files();
138+
my $source = parse_source_files($dtsdir, $dtssubdir);
134139

135140
# Parse the exclusions
136141

@@ -191,6 +196,8 @@ foreach my $overlay (@$common)
191196

192197
# Parse the Makefile
193198

199+
chdir($dtsdir);
200+
194201
my $makefile = parse_makefile("overlays/Makefile");
195202

196203
($left_only, $common, $right_only) =
@@ -203,13 +210,15 @@ $fail ||= (@$left_only || @$right_only);
203210

204211
# Now some build/runtime checks
205212

213+
chdir($dtssubdir);
214+
206215
foreach my $base (@base_files)
207216
{
208217
next if (!-f "$base.dts");
209218
dtc_cpp("$base.dts", "$TMPDIR/$base.dtb");
210219
}
211220

212-
chdir($kerndir."/arch/arm/boot/dts/overlays");
221+
chdir($dtsdir."/overlays");
213222

214223
dtc_cpp("overlay_map.dts", "$TMPDIR/overlay_map.dtb") if (-r "overlay_map.dts");
215224

@@ -311,10 +320,13 @@ sub list_print
311320

312321
sub parse_source_files
313322
{
323+
my ($dtsdir, $dtssubdir) = @_;
314324
my $overlays = {};
315325

316326
my %params;
317327

328+
chdir($dtssubdir);
329+
318330
foreach my $file (glob("bcm2708*.dts bcm2709*.dts bcm2710*.dts bcm2711*.dts"))
319331
{
320332
foreach my $param (get_params($file))
@@ -324,6 +336,8 @@ sub parse_source_files
324336
}
325337
}
326338

339+
chdir($dtsdir);
340+
327341
$overlays->{'<The base DTB>'} = [ sort(keys(%params)) ];
328342

329343
foreach my $file (glob("overlays/*-overlay.dts"))

0 commit comments

Comments
 (0)