diff --git a/README.md b/README.md index 8998b80..2e199c4 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ but also many more coreboot distributions like heads. ## Usage ```bash -usage: openness_score.py [-o OUTPUT] [-v] [-V] [file] +usage: openness_score.py [-c proprietary_file] [-p PLATFORM] [-o OUTPUT] [-v] [-m [-V] [file] Calculate Dasharo Openness Score for firmware images @@ -32,6 +32,10 @@ positional arguments: file Firmware binary file to be parsed options: + -c proprietary_file, --compare proprietary_file + Compare Dasharo and proprietary firmware scores and store result in a Markdown table. file should be the Dasharo binary and proprietary_file should be the proprietary firmware binary. + -p PLATFORM, --platform PLATFORM + Platform model to provide to the table when --compare is set. -o OUTPUT, --output OUTPUT Specifies the directory where to store the results -a MICROARCH, --microarch MICROARCH @@ -75,6 +79,33 @@ The utility will produce 3 files: precise numbers and detailed classification of firmware image components to closed-source, open-source, data and empty categories +Example with `--compare` flag: + +```bash +./openness_score/openness_score.py msi_ms7d25_v1.1.4_ddr4.rom -c E7D25IMS.1M1 -p "MS-7D25" +``` + +Aside from the 3 files mentioned above, this will also produce `compare.md` - A +Markdown table containing the score comparison between the two binaries. If the +file already exists, the result will be appended as a single row. + +The table contains the following metrics: + +- `closed-source diff` +- `data size diff` +- `empty space diff` + +Each metric is calculated using the formula: + +```txt +(Dasharo size - Proprietary size) * 100 / Proprietary size +``` + +`` is replaced by `closed-source`, `data` or `empty space` accordingly. + +You can use `scripts/compare.sh` to generate a comparison table for common +Dasharo platforms. For more information, see the script's help. + **The utility currently supports coreboot and pure UEFI images only.** ### Examples