Tyr: rework the firmware parsing code
The code in fw/parse.rs is working, but it would benefit from some refactoring.
The actual logic can be improved at some places, and some features still remain unimplemented. This is specially the case for functions like read_build_info()
, which is simply not used yet.
This file also has a few warnings about unused variables, dead code and a few other Clippy ones. These can be ironed out pretty easily.
The code isolate the shared section from the others is also a bit convoluted. This is compounded by the fact that there is no Vec::remove() in the kernel yet. Streamlining that part will possibly involve adding a patch to introduce Vec::remove() to the kernel crate as well.