Open orangecms opened 3 years ago
The code of https://github.com/LongSoft/IFRExtractor-RS looks cleaner and would probably be easier to modify to output JSON.
I wonder if IFR loses information compared to VFR or if it's only a human-readable to binary conversion. If it's the same amount of information we can convert back and forth and possible use the result of this issue to visualize VFR as well.
Original work: https://github.com/WilliamLeara/LangAppUEFIBIOS
Nice info on HII: https://github.com/lzeng14/tianocore/wiki/HII
The code of https://github.com/LongSoft/IFRExtractor-RS looks cleaner and would probably be easier to modify to output JSON.
I wonder if IFR loses information compared to VFR or if it's only a human-readable to binary conversion. If it's the same amount of information we can convert back and forth and possible use the result of this issue to visualize VFR as well.
forked and WIP to get JSON output: https://github.com/orangecms/IFRExtractor-RS/tree/json
Lenovo has put a renderer for all their devices' menus on the web: https://download.lenovo.com/bsco/index.html
UEFI defines a protocol for data to render the menu that allows for changing settings from, named HII, or Human Interface Infrastructure. The binary format is called IFR, Intermediate Forms Representation, while the source format is called VFR, Visual Forms Representation, and can be compiled with https://edk2-docs.gitbook.io/edk-ii-basetools-user-guides/vfrcompiler. Tools like https://github.com/LongSoft/Universal-IFR-Extractor and https://github.com/topeterk/IfrViewer allow for parsing and viewing it already, but the output is not JSON. See if we can hack on something to get JSON output that we can load as a fixture into utk-web again. The web browser is a neat environment for rendering, so it can simulate a firmware image's menu.
Short script for UEFITool + Universal-IFR-Extractor:
Excerpts as examples: