Comments (5)
@repnop -, Any comments?
from fdt.
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.
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 customstruct
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.
Hello @repnop -, I raise a PR to demo what I want to do. We can discuss this issue there.
from fdt.
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)
- Panic in `find_all_nodes()` HOT 3
- panic in fdt-0.1.1/src/standard_nodes.rs line 188 HOT 1
- expowose de owiginaw powointew
- No usable `Debug` impl.
- helper function to get interupt IDs from the `interrupts-extended` property
- make `FDT.find_compatible` return a itterator
- `FdtNode::interrupts()` can not handle ARM interrupt properties HOT 1
- Add way to pretty-print individual nodes
- Pretty-print using the `Display` implementation instead of `Debug` HOT 1
- Remove `unwrap`'s/`expect`'s in favor of propagating up errors HOT 4
- Leading 0 cell removed when pretty printing HOT 1
- `interrupts-extended` helper is completely wrong HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fdt.