Giter Club home page Giter Club logo

Comments (5)

jongwu avatar jongwu commented on July 21, 2024

@repnop -, Any comments?

from fdt.

repnop avatar repnop commented on July 21, 2024

Hi! I'm not 100% I understand what you mean, but this crate only supports a read-only view into the given flattened devicetree, as such its not possible to store that information anywhere, so even if it was possible to create your own Chosen, you would still need to store it separately. Having an API for creating a new devicetree based on an existing one is something that would make that possible and something I plan to create at some point, but would be probably be pretty heavy handed for simply inserting some information into a single node. My recommendation is to copy the contents that you want out of the Chosen node and use a custom struct to store the rest of the information you need. Hope that helps!

from fdt.

jongwu avatar jongwu commented on July 21, 2024

Hi! I'm not 100% I understand what you mean,

Sorry to have not made it clear.

but this crate only supports a read-only view into the given flattened devicetree, as such its not possible to store that information anywhere, so even if it was possible to create your own Chosen, you would still need to store it separately.

My case is for virtualization scenario. For example, store kernel image into memory and store its location address and size into FDT throught Chosen node in VMM, as the initramfs does. Then we can get those kernel information in guest firmware/kernel.

Having an API for creating a new devicetree based on an existing one is something that would make that possible and something I plan to create at some point,

I prefer this way,

but would be probably be pretty heavy handed for simply inserting some information into a single node. My recommendation is to copy the contents that you want out of the Chosen node and use a custom struct to store the rest of the information you need. Hope that helps!

You mean create a new node in "fdt" (I mean in this repo) to carry what I want?

from fdt.

jongwu avatar jongwu commented on July 21, 2024

Hello @repnop -, I raise a PR to demo what I want to do. We can discuss this issue there.

from fdt.

repnop avatar repnop commented on July 21, 2024

Co-opting this issue and reusing it for tracking a trait to better define custom nodes so users can more easily access things

from fdt.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.