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

fdtput does not seem to support to add a new node as a children #49

Open
MagicMuscleMan opened this issue May 1, 2021 · 3 comments
Open

Comments

@MagicMuscleMan
Copy link

Either it's not documented or it's not supported to add a new node as a children using fdtput. This limits the use of fdtput.

@dgibson
Copy link
Owner

dgibson commented May 4, 2021

I'm not sure exactly what you're asking for here. Do you mean you want fdtput to create a new node (and any necessary parent nodes) if asked to add a property to one that doesn't exist?

I think that case just wasn't considered when writing it. Patches welcome?

@MagicMuscleMan
Copy link
Author

Yes, the problem is you can use fdtput to extend the device tree entry by entry when calling it multiple times. However, I was not able to create a new node (which is per default a child node to another node if I understood the device tree specification correctly). Therefore I couldn't use fdtput to solve my problem.

I can think of two interfaces:

  • Add a new type to the -t parameter (n=node) to explicitly create a new node in a separate fdtput call
  • Create the new node implicitly when a property is set for a node that does not exist (recursively, as you described)

However, realistically, I won't create a patch to provide this functionality, as it was only a side problem and I basically stopped using fdtput directly after starting to use it. So please feel free to close this bug, if you think this is the best way to handle it in this situation.

@dgibson
Copy link
Owner

dgibson commented May 13, 2021

Right, those are the two obvious interfaces, or alternatively adding a new fdtsubnode command.

It's a reasonable thing to want, and it shouldn't be that complicated but I don't have the spare time to work on it, so I don't expect it to happen until/unless someone volunteers to do it.

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

No branches or pull requests

2 participants