assists: xlnx_overlay_pl_dt: auto-discover *.dtso files from SDT input directory#777
Merged
Merged
Conversation
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>
Contributor
Author
|
@onkarharsh , please review. |
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>
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: Please review. |
Collaborator
|
looks good to me. this is merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.