README: Add score comparison instructions

Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
This commit is contained in:
Pawel Langowski
2025-07-03 13:40:01 +02:00
parent 32db306f42
commit 8e8d1b325c
+32 -1
View File
@@ -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 <type> size - Proprietary <type> size) * 100 / Proprietary <type> size
```
`<type>` 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