indygreg / indygreg/apple-platform-rs
Add a crate for working with apple device trees (no-std)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 854
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
I would like to be able to create apple device trees in Rust. After finding out that there is a apfs crate here with no-std support I figured this would be the best place to implement this kind of thing.
Use case: I could create apple device trees from a Rust program. These device trees could be loaded into u-boot to then boot the XNU kernel on various platforms. Apple device trees seem to be slightly different from Linux device trees but I'm not sure what the specific changes are.
There seems to be a device tree for the Raspberry Pi floating around somewhere but it is hard to modify it and to create a new one at the moment. See [NSG650's blog post on booting XNU on a Raspberry Pi for more information](https://nsg650.github.io/blogs/20-12-2023.html).
I also found these repositories that might be useful. I am willing to make a attempt at a PR for this.
- https://github.com/bazad/devicetree-parse/blob/master/devicetree-parse.c
- https://github.com/darwin-on-arm/dtc-AppleDeviceTree.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing apfs crate's no-std structure and the linked devicetree-parse.c and dtc-AppleDeviceTree repositories. Compare their Apple device-tree formats with the Raspberry Pi and u-boot/XNU use case, then define the crate scope and validation needed for creating compatible trees.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100