Skip to content

Commit 4de394b

Browse files
committed
Migrate docs to mkdocs
Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com>
1 parent 3824bbb commit 4de394b

19 files changed

Lines changed: 310 additions & 435 deletions

Makefile

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,11 @@ to generate detailed code documentation automatically.
110110
To generate the documentation run the following:
111111
112112
```bash
113-
(venv) make html
113+
(venv) mkdocs serve
114114
python -m http.server 8000
115115
```
116116
117-
For live preview run:
118-
119-
```bash
120-
(venv) make livehtml
121-
```
122-
123-
Open the web browser and type `localhost:8000` as address. Or alternatively
124-
open `build/html/index.html` file in the web browser directly.
117+
Open the web browser and type `localhost:8000` as address.
125118
126119
## Checking Python style
127120

docs/coreboot.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
::: openness_score.coreboot
2+
handler: python
3+
options:
4+
filters: []
5+
docstring_style: sphinx
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
Dasharo Openness Score design
2-
=============================
1+
# Dasharo Openness Score design
32

43
Dasharo Openness Score is designed following a few patterns and design rules.
54

6-
7-
Dasharo Openness Score general rules
8-
------------------------------------
5+
## Dasharo Openness Score general rules
96

107
1. The utility should not leave any intermediate files during the firmware
118
image processing.
@@ -23,29 +20,28 @@ Dasharo Openness Score general rules
2320

2421
3. The utility must be sa precise as possible to avoid falsified results.
2522

26-
Dasharo Openness Score module design rules
27-
------------------------------------------
23+
## Dasharo Openness Score module design rules
2824

2925
Each class representing a firmware image (or its integral part):
3026

3127
1. Must calculate the 4 basic metrics (empty, data, closed-source and
3228
open-source) on the class instance creation.
33-
2. Should have a string method ``__str__`` which returns a set of 4 basic
29+
2. Should have a string method `__str__` which returns a set of 4 basic
3430
metrics and general attributes of the entity
35-
3. Should have a length method ``__len__`` which returns the size of the
31+
3. Should have a length method `__len__` which returns the size of the
3632
firmware image (or its integral part)
3733
4. Must contain attributes for the basic metrics using the following names:
38-
``self.open_code_size``, ``self.closed_code_size``, ``self.data_size`` and
39-
``self.empty_size``
40-
5. Must implement ``export_markdown`` method that will produce a markdown
34+
`self.open_code_size`, `self.closed_code_size`, `self.data_size` and
35+
`self.empty_size`
36+
5. Must implement `export_markdown` method that will produce a markdown
4137
report of the firmware image (or its integral part) statistics
42-
6. Must implement ``_calculate_metrics`` method which will perform the image
38+
6. Must implement `_calculate_metrics` method which will perform the image
4339
component classification and do the calculations
4440
7. Should implement a parse method which will perform the extraction of the
4541
image components and its attributes
46-
8. Must call the parse method and ``_calculate_metrics`` inside the class'
47-
``__init__`` method
48-
9. Must implement ``export_charts`` method to generate pie charts (only for
42+
8. Must call the parse method and `_calculate_metrics` inside the class'
43+
`__init__` method
44+
9. Must implement `export_charts` method to generate pie charts (only for
4945
classes representing the whole firmware image)
5046
10. Must assume a component as closed-source if unable to classify to any
5147
category.

docs/index.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Dasharo Openness Score
2+
3+
## What is Dasharo Openness Score
4+
5+
Have you ever wondered how open is your open-source firmware? How much
6+
closed-source and binary blobs is still there? Dasharo Openness Score utility
7+
answers those questions.
8+
9+
Dasharo Openness is a report showing the open-source code to closed-source
10+
code ratio in the Dasharo firmware images. The results are also presented as a
11+
pie chart for better visual representation of the firmware image components
12+
and their share percentage.
13+
14+
Dasharo Openness Score utility is capable of parsing Dasharo coreboot-based
15+
images as well as vendor UEFI images. Thanks to that one can easily compare
16+
how many bytes of the firmware have been liberated as well as by how much the
17+
Trusted Computing Base (TCB) has been reduced.
18+
19+
Dasharo Openness Score utility not only support Dasharo coreboot-based images,
20+
but also many more coreboot distributions like heads.
21+
22+
## How does it work?
23+
24+
The utility leverages various tools like [coreboot's cbfstool][cbfstool] or
25+
[LongSoft's UEFIExtract][uefiextract] to decompose and parse the firmware
26+
images. The output from the utilities is used to detect the image type and then
27+
to calculate the openness metrics.
28+
29+
For more details please refer to the [methodology document](./methodology.md)
30+
31+
[cbfstool]: https://github.com/coreboot/coreboot/tree/master/util/cbfstool
32+
[uefiextract]: https://github.com/LongSoft/UEFITool

0 commit comments

Comments
 (0)