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

allow using labels with fdtget/fdtput #150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Villemoes
Copy link

It can be convenient and more readable to use &label syntax with fdtget and fdtput, rather than having to know the full path. This small series adds that support by hooking into fdt_path_offset_namelen() in the same place where we already allow the first component to be an alias. Of course this only works for blobs that have been built with -@, but it shouldn't affect existing use cases.

[This is a re-opening of #89 which I managed to implicitly close in the process of rebasing the branch to current main.]

When using the CLI tools fdtget and fdtput, it can be convenient to
refer to a node by a label rather than having to know the full path
from the root.

Signed-off-by: Rasmus Villemoes <[email protected]>
We obviously need to build some dtbs with -@ to do these tests. In
order to still test all the old functionality on blobs built without
-@, simply run all fdtget/fdtput tests twice, with/without -@, and for
the few new test cases that rely on -@, check that they fail when the
blob is not built with -@.

Signed-off-by: Rasmus Villemoes <[email protected]>
@ukleinek
Copy link
Contributor

nice
Acked-by: Uwe Kleine-König [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.

3 participants