Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvements to ADT dumper #413

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mildsunrise
Copy link

improves the output from adt.py in several ways.
some are needed to make diffs possible (most importantly, phandles are formatted as the path to the target node) and some are just for better legibility. see the individual commit messages for details.

(draft since the last commit is dirty code...)

@mildsunrise
Copy link
Author

mildsunrise commented Oct 27, 2024

I also put this in my .git/config:

[diff "adt"]
    textconv = "python -m proxyclient.m1n1.adt --sort-keys --sort-nodes"
    xfuncname = "^ *[a-zA-Z0-9_-]+ \\{$"

and this in .gitattributes:

*.adt   diff=adt

so that I am able to diff blobs directly, e.g. git diff --no-index DeviceTree.j51{6,4}map.adt
example diff, for reference

@mildsunrise mildsunrise force-pushed the adt-dump branch 2 times, most recently from f1edac4 to b3cb925 Compare October 27, 2024 21:05
Signed-off-by: Alba Mendez <[email protected]>
- remove empty line after props if there are no children
- quote/escape string values
- escape key names / function names
- indent property value representations
- special format for regs
- format multiline lists better

Signed-off-by: Alba Mendez <[email protected]>
Signed-off-by: Alba Mendez <[email protected]>
Signed-off-by: Alba Mendez <[email protected]>
- treat function_ptd_read_mult as a function too
- handle parent attributes with multiple phandles
- strip "/device-tree/" from phandle paths

Signed-off-by: Alba Mendez <[email protected]>
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.

1 participant