-
Notifications
You must be signed in to change notification settings - Fork 0
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
First Draft of Implementing PCFS #20
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while i was working on this i also managed to implement the parsing of Mion FW files. this requires a rebase, and a temporary checkin.
part of validating PCFS will be validating it across many MION FW versions (thanks to crediar i was able to get quite a few more versions to test with from SDKs they happened to have lying around). this adds in commands to decrypt those firmwares, so i can actually figure out what's going on with them. it also adds a subcommand to quickly dump the fw out of running memory incase someone new gets a cat-dev i wanna have a quick way to get their current fw out of memory, without telling them they need to CTRL-C early. also small nit, fixed the help page rendering for the MION subcommand as before it wasn't actually interacting correctly.
- this fixes arguments that _may_ not be a bridge not actually being handled in the correct order in `target_bridge`, it would always take the default over the positional argument. - boot now can boot mion fw's that don't have access to `power_on_v2`. - you can now get the targeted bridge mac easily without duplicate lookups when messing with `bridgectl`. - `boot.rs` was becoming too long, so split it into it's own series of modules, can't say they'll always live this way, but they're better than what it was. - fix status uri for getting mion status. - build in route for ejecting discs on legacy MIONs - build in route for getting MION FW versions
This commit moves us along further on the PCFS front, where SDIO, and ATAPI are now probably properly being handled? At least for the packet types that I know about. However, the big thing in this commit is completely reworking the error structure for `cat-dev`. This is due to the fact the error structures were being WAY TOOOO MESSY. A couple problems with the existing strategy: 1. So many fields being turned into the same error type, means matching almost all APIs you would have to match way more error types than could ever be returned (matching errors becoming tedious!). 2. Most of the errors are stored 'far away' from the actual source code that generates those errors (small issue, but bugged me!). 3. 'Duplicate' Errors, e.g. there were many that were "invalid size", when we already had `FieldTooShort`/`FieldTooLong`. These errors were almost always worse than the FieldTooShort/FieldTooLong. 4. Many errors didn't implement `From`/`Into` for all the errors in the "upchain", so you usually had to manually wrap error types. Now almost all errors can be changed with just `Into`, `From`, and `?`. All in all, error handling should be significantly cleaner all things considered. There is a single case which is worse: - Accepting a top level error type (e.g. `CatBridgeError`), but trying to parse out an inner error type (e.g. `mionps` & `mionparamspace`). Because error types are significantly more structured, this means more wrapping in that case, and thus uglier code. Overall I'm not too worried about this, because most APIs do return the smallest possible structured type they can. Most are not returning `CatBridgeError`. Not to mention this specific error matching isn't used very frequently at all (as evidenced by it only being in two specific CLI's that have buggy behavior anyway). Given how much simpler the `?`, `into`, and smaller error structures are.
- actually read all the fields from `FSEmul.conf` and respect them when needed. - allow ctrl-c'ing out of serial wait task when connecting to `DEBUG_OUT`. - add cli arguments for anything that can be specified in an env var/file to ensure per process overrides exist. - scope out a bit more of the `boot` command when using a "default" setup (e.g. with SATA enabled, FFIO/CSR setup). - add a load bearing sleep call between sending SDIO packets, so we don't overload the MION processing our devices (this is required to even be able to send `fw.img` because the MION is actually really terrible at it's job). - allow legacy bridges to actually detect PCFS being enabled. - i still need to figure out ways to override all the args, probably more web setup calls but we'll see. - fix latest clippy warnings - upgrade to latest rust, and latest rust package resolver - allow dlfs to recognize addresses that appear mid-way through a file. - host filesystem now resembles more of a filesystem. - implement a lot more of the PCFS Sata server, enough to complete a full MLC bootup and scan (we are now blocked on SDIO message types again).
- implement write_file for pcfs - implement change_owner for pcfs - fix up documentation - work around case-insensitivity problems for linux with title ids. - windows is case insensitive, as is macosx, ext4 common linux however is case sensitive. most of the time copying between the two will just work. EXCEPT for title ids (which are expected to be lowercase).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is absolutely massive, and I am sorry about that. PCFS requires so much work to get done (and even this still is missing a lot)! I probably should've split this up more, but would've lead to lot of churn as I couldn't really test any of this stuff without all the parts, and I wanted to keep the repo in a relatively build-able state with the same drawbacks that already existed.
So where is this at, and what's still missing?
You can now boot using PCFS IF:
What's still missing for PCFS?
%NETWORK/
, cross-os network mounts aren't really a thing, also there is likely to be more than one network mount, but PCFS doesn't support that. So we should figure out a good way to specify which network mount(s) you want to use, and how to handle that resolution.What Other Things Are In This PR?
rustup update
time if you want to build your own.bridgectl
, where it was not picking up correct arguments.DEBUG_OUT
for serial logs even if you don't have a serial port path connected.