Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First Draft of Implementing PCFS (#20)
* temporary checkin to handle rebase 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. * add in mion commands for fw investigations 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. * fix cli bridge targeting, legacy booting support - 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 * PCFS implementation parts, Giant Error Rework 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. * pcfs one step closer, mostly booting now - 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). * new packet types to allow pcfs, and minor fixes - 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). * fixup windows, and identify errors in mac * slightly more info for debugging osx * properly check for parent directory, canonicalize for mac * fix formatting * fix ppc_boot test for dlf on windows * fix windows tests
- Loading branch information