Skip to content

assists: xlnx_overlay_pl_dt: auto-discover *.dtso files from SDT input directory#777

Merged
zeddii merged 2 commits into
devicetree-org:masterfrom
arthokal:overlay_auto_discover
Jun 24, 2026
Merged

assists: xlnx_overlay_pl_dt: auto-discover *.dtso files from SDT input directory#777
zeddii merged 2 commits into
devicetree-org:masterfrom
arthokal:overlay_auto_discover

Conversation

@arthokal

Copy link
Copy Markdown
Contributor

Instead of requiring -i flags for every lopper invocation to include custom overlay properties for PS nodes, auto-discover *.dtso files co-located with system-top.dts and register them through the same compilation path used by the -i flag.

discover_overlay_files() scans the directory containing the input SDT file for *.dtso files, skips any already registered via -i to avoid duplicates, and calls _compile_overlay_subtrees() to compile and register them. fragment_add_for_refs() then emits them as &label overlay fragments in pl.dtsi automatically.

directory

Instead of requiring -i flags for every lopper invocation to include
custom overlay properties for PS nodes, auto-discover *.dtso files
co-located with system-top.dts and register them through the
same compilation path used by the -i flag.

discover_overlay_files() scans the directory containing the input SDT
file for *.dtso files, skips any already registered via -i to avoid
duplicates, and calls _compile_overlay_subtrees() to compile and
register them. fragment_add_for_refs() then emits them as &label
overlay fragments in pl.dtsi automatically.

Signed-off-by: Aravind Thokala <aravind.thokala@amd.com>
@arthokal

Copy link
Copy Markdown
Contributor Author

@onkarharsh , please review.

@onkarharsh onkarharsh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@zeddii

zeddii commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

I'd strongly suggest that you have a way to disable this. In case the user has files that they actually don't want processed (they could be large, they could have errors, etc).

So just a simple flag to the assist to opt-out (or make an opt-in flag, you choice) would give an escape hatch.

auto-discovery

Add --exclude-overlays option to selectively exclude *.dtso files from
auto-discovery. Accepts a comma-separated list of filenames with glob
pattern support via Path.match().

Examples:
--exclude-overlays=debug.dtso          skip a specific file
--exclude-overlays=a.dtso,b.dtso       skip multiple files
--exclude-overlays=*.dtso              skip all (disable auto-discovery)

Signed-off-by: Aravind Thokala <aravind.thokala@amd.com>
@arthokal

arthokal commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Hi @zeddii ,

Added --exclude-overlays option to selectively skip .dtso files from auto-discovery. It accepts a comma-separated list of filenames with glob support:

skip a specific file:
--exclude-overlays=debug.dtso
skip multiple files:
--exclude-overlays=a.dtso,b.dtso
skip all (disable auto-discovery):
--exclude-overlays=*.dtso

Please review.

@zeddii zeddii merged commit 0675e61 into devicetree-org:master Jun 24, 2026
3 checks passed
@zeddii

zeddii commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

looks good to me. this is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants