Skip to content

Conversation

@mildsunrise
Copy link
Contributor

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
Contributor 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 <me@alba.sh>
- 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 <me@alba.sh>
Signed-off-by: Alba Mendez <me@alba.sh>
Signed-off-by: Alba Mendez <me@alba.sh>
Signed-off-by: Alba Mendez <me@alba.sh>
- 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 <me@alba.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants