mirror of
https://github.com/Dasharo/Openness-Score.git
synced 2026-06-13 19:16:16 -07:00
1247 lines
112 KiB
HTML
1247 lines
112 KiB
HTML
|
||
|
||
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en">
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>coreboot module — Dasharo Openness Score v0.1.0 documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b86133f3" />
|
||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=9edc463e" />
|
||
|
||
|
||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=82621e7c"></script>
|
||
<script src="_static/doctools.js?v=888ff710"></script>
|
||
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
|
||
<script src="_static/js/theme.js"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="UEFI module" href="uefi.html" />
|
||
<link rel="prev" title="openness_score module" href="openness_score.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="index.html" class="icon icon-home">
|
||
Dasharo Openness Score
|
||
</a>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="methodology.html">Dasharo Openness Score methodology</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="design.html">Dasharo Openness Score design</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">Dasharo Openness Score modules documentation</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="openness_score.html">openness_score module</a></li>
|
||
<li class="toctree-l2 current"><a class="current reference internal" href="#">coreboot module</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#coreboot.DasharoCorebootImage"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage</span></code></a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.region_patterns"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.region_patterns</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.region_regexp"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.region_regexp</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.DATA_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.DATA_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.IFD_DATA_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.IFD_DATA_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.CODE_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.CODE_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.BLOB_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.BLOB_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.IFD_BLOB_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.IFD_BLOB_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.SKIP_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.SKIP_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.IFD_SKIP_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.IFD_SKIP_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.EMPTY_REGIONS"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.EMPTY_REGIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.__init__"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.__init__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.image_path"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.image_path</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.microarch"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.microarch</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.image_size"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.image_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.fmap_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.fmap_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.ifdtool_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.ifdtool_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.cbfs_images"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.cbfs_images</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.num_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.num_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.num_ifdtool_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.num_ifdtool_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.num_cbfses"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.num_cbfses</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.open_code_size"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.open_code_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_size"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.closed_code_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.data_size"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.data_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_size"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.empty_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.open_code_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.open_code_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.closed_code_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.data_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.data_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.empty_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_regions_ifdtool"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.closed_code_regions_ifdtool</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.data_regions_ifdtool"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.data_regions_ifdtool</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_regions_ifdtool"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.empty_regions_ifdtool</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.uncategorized_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.uncategorized_regions</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.uncategorized_regions_ifdtool"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.uncategorized_regions_ifdtool</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.debug"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.debug</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.ifd_found"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.ifd_found</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.__len__"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.__len__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.__repr__"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.__repr__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.__str__"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.__str__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._region_is_cbfs"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._region_is_cbfs()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._parse_cb_fmap_layout"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._parse_cb_fmap_layout()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._parse_ifdtool_regions"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._parse_ifdtool_regions()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._classify_ifdtool_region"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._classify_ifdtool_region()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._is_empty"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._is_empty()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._classify_region"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._classify_region()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._calculate_metrics"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._calculate_metrics()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._sum_sizes"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._sum_sizes()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._normalize_sizes"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._normalize_sizes()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._get_percentage"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._get_percentage()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._export_regions_md"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._export_regions_md()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage._export_ifdtool_regions_md"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage._export_ifdtool_regions_md()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.export_markdown"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.export_markdown()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.DasharoCorebootImage.export_charts"><code class="docutils literal notranslate"><span class="pre">DasharoCorebootImage.export_charts()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#coreboot.CBFSImage"><code class="docutils literal notranslate"><span class="pre">CBFSImage</span></code></a><ul>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.CBFS_FILETYPES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.CBFS_FILETYPES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.OPEN_SOURCE_FILETYPES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.OPEN_SOURCE_FILETYPES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.CLOSED_SOURCE_FILETYPES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.CLOSED_SOURCE_FILETYPES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.DATA_FILETYPES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.DATA_FILETYPES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS"><code class="docutils literal notranslate"><span class="pre">CBFSImage.CLOSED_SOURCE_EXCEPTIONS</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.RAW_DATA_FILES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.RAW_DATA_FILES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.RAW_OPEN_SOURCE_FILES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.RAW_OPEN_SOURCE_FILES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.RAW_CLOSED_SOURCE_FILES"><code class="docutils literal notranslate"><span class="pre">CBFSImage.RAW_CLOSED_SOURCE_FILES</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.REGIONS_WITH_CONFIG"><code class="docutils literal notranslate"><span class="pre">CBFSImage.REGIONS_WITH_CONFIG</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.DASHARO_LAN_ROM_GUID"><code class="docutils literal notranslate"><span class="pre">CBFSImage.DASHARO_LAN_ROM_GUID</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.file_patterns"><code class="docutils literal notranslate"><span class="pre">CBFSImage.file_patterns</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.file_regexp"><code class="docutils literal notranslate"><span class="pre">CBFSImage.file_regexp</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.__init__"><code class="docutils literal notranslate"><span class="pre">CBFSImage.__init__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.image_path"><code class="docutils literal notranslate"><span class="pre">CBFSImage.image_path</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.region_name"><code class="docutils literal notranslate"><span class="pre">CBFSImage.region_name</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.cbfs_size"><code class="docutils literal notranslate"><span class="pre">CBFSImage.cbfs_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.cbfs_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.cbfs_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.kconfig_opts"><code class="docutils literal notranslate"><span class="pre">CBFSImage.kconfig_opts</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.num_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.num_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.num_opts"><code class="docutils literal notranslate"><span class="pre">CBFSImage.num_opts</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.open_code_size"><code class="docutils literal notranslate"><span class="pre">CBFSImage.open_code_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.closed_code_size"><code class="docutils literal notranslate"><span class="pre">CBFSImage.closed_code_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.data_size"><code class="docutils literal notranslate"><span class="pre">CBFSImage.data_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.empty_size"><code class="docutils literal notranslate"><span class="pre">CBFSImage.empty_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.open_code_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.open_code_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.closed_code_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.closed_code_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.data_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.data_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.empty_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.empty_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.uncategorized_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage.uncategorized_files</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.edk2_ipxe"><code class="docutils literal notranslate"><span class="pre">CBFSImage.edk2_ipxe</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.ipxe_present"><code class="docutils literal notranslate"><span class="pre">CBFSImage.ipxe_present</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.ipxe_rom_id"><code class="docutils literal notranslate"><span class="pre">CBFSImage.ipxe_rom_id</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.lan_rom_size"><code class="docutils literal notranslate"><span class="pre">CBFSImage.lan_rom_size</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.debug"><code class="docutils literal notranslate"><span class="pre">CBFSImage.debug</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.__len__"><code class="docutils literal notranslate"><span class="pre">CBFSImage.__len__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.__repr__"><code class="docutils literal notranslate"><span class="pre">CBFSImage.__repr__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.__str__"><code class="docutils literal notranslate"><span class="pre">CBFSImage.__str__()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._parse_cbfs_files"><code class="docutils literal notranslate"><span class="pre">CBFSImage._parse_cbfs_files()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._calculate_metrics"><code class="docutils literal notranslate"><span class="pre">CBFSImage._calculate_metrics()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._classify_file"><code class="docutils literal notranslate"><span class="pre">CBFSImage._classify_file()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._normalize_sizes"><code class="docutils literal notranslate"><span class="pre">CBFSImage._normalize_sizes()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._sum_sizes"><code class="docutils literal notranslate"><span class="pre">CBFSImage._sum_sizes()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._get_kconfig_value"><code class="docutils literal notranslate"><span class="pre">CBFSImage._get_kconfig_value()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._parse_cb_config"><code class="docutils literal notranslate"><span class="pre">CBFSImage._parse_cb_config()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._check_for_ipxe"><code class="docutils literal notranslate"><span class="pre">CBFSImage._check_for_ipxe()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._check_for_lanrom"><code class="docutils literal notranslate"><span class="pre">CBFSImage._check_for_lanrom()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage._export_files_md"><code class="docutils literal notranslate"><span class="pre">CBFSImage._export_files_md()</span></code></a></li>
|
||
<li class="toctree-l4"><a class="reference internal" href="#coreboot.CBFSImage.export_markdown"><code class="docutils literal notranslate"><span class="pre">CBFSImage.export_markdown()</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="uefi.html">UEFI module</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="index.html">Dasharo Openness Score</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item"><a href="modules.html">Dasharo Openness Score modules documentation</a></li>
|
||
<li class="breadcrumb-item active">coreboot module</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<a href="_sources/coreboot.rst.txt" rel="nofollow"> View page source</a>
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<section id="module-coreboot">
|
||
<span id="coreboot-module"></span><h1>coreboot module<a class="headerlink" href="#module-coreboot" title="Permalink to this heading"></a></h1>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">coreboot.</span></span><span class="sig-name descname"><span class="pre">DasharoCorebootImage</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">microarch</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>DasharoCorebootImage class</p>
|
||
<p>The main class representing a coreboot-based firmware image</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.region_patterns">
|
||
<span class="sig-name descname"><span class="pre">region_patterns</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.region_patterns" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Set of regular expressions used to extract the flashmap regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.region_regexp">
|
||
<span class="sig-name descname"><span class="pre">region_regexp</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.region_regexp" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Regular expression variable used to extract the flashmap regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.DATA_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">DATA_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.DATA_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of region names known to contain data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.IFD_DATA_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">IFD_DATA_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.IFD_DATA_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of IFD regions known to contain data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.CODE_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">CODE_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.CODE_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of region names known to contain open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.BLOB_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">BLOB_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.BLOB_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of region names known to contain closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.IFD_BLOB_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">IFD_BLOB_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.IFD_BLOB_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of closed-source code IFD regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.SKIP_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">SKIP_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.SKIP_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of region names known to be containers or aliases of other
|
||
regions. These regions are skipped from classification.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.IFD_SKIP_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">IFD_SKIP_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.IFD_SKIP_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of region names to be skipped when ifdtool is used.
|
||
These regions willbe classified by IFD region purpose.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.EMPTY_REGIONS">
|
||
<span class="sig-name descname"><span class="pre">EMPTY_REGIONS</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.EMPTY_REGIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of region names known to be empty spaces, e.g. between IFD
|
||
regions.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.__init__">
|
||
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">microarch</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage.__init__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>DasharoCorebootImage class init method</p>
|
||
<p>Initializes the class fields for storing the firmware image components
|
||
classified to specific groups. Also calls
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage._parse_cb_fmap_layout" title="coreboot.DasharoCorebootImage._parse_cb_fmap_layout"><code class="xref py py-meth docutils literal notranslate"><span class="pre">_parse_cb_fmap_layout()</span></code></a> and
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage._calculate_metrics" title="coreboot.DasharoCorebootImage._calculate_metrics"><code class="xref py py-meth docutils literal notranslate"><span class="pre">_calculate_metrics()</span></code></a> methods to
|
||
parse the image and calculate the metrics.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>image_path</strong> (<em>str</em>) – Path the the firmware image file being parsed.</p></li>
|
||
<li><p><strong>verbose</strong> (<em>bool</em><em>, </em><em>optional</em>) – Optional parameter to turn on debug information during
|
||
the image parsing, defaults to False</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.image_path">
|
||
<span class="sig-name descname"><span class="pre">image_path</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.image_path" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Path to the image represented by DasharoCorebootImage class</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.microarch">
|
||
<span class="sig-name descname"><span class="pre">microarch</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.microarch" title="Permalink to this definition"></a></dt>
|
||
<dd><p>CPU michroarchitecture supported by the firmware binary to be passed to ifdtool.
|
||
For a complete list of supported microarchitectures, use ‘ifdtool -h’.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.image_size">
|
||
<span class="sig-name descname"><span class="pre">image_size</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.image_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Image size in bytes</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.fmap_regions">
|
||
<span class="sig-name descname"><span class="pre">fmap_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.fmap_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A dictionary holding the coreboot image flashmap regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.ifdtool_regions">
|
||
<span class="sig-name descname"><span class="pre">ifdtool_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.ifdtool_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A dictionary holding regions found by ifdtool</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.cbfs_images">
|
||
<span class="sig-name descname"><span class="pre">cbfs_images</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.cbfs_images" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding the regions with CBFS</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.num_regions">
|
||
<span class="sig-name descname"><span class="pre">num_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.num_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of flashmap regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.num_ifdtool_regions">
|
||
<span class="sig-name descname"><span class="pre">num_ifdtool_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.num_ifdtool_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of regions found by ifdtool</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.num_cbfses">
|
||
<span class="sig-name descname"><span class="pre">num_cbfses</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.num_cbfses" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of flashmap regions containing CBFSes</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.open_code_size">
|
||
<span class="sig-name descname"><span class="pre">open_code_size</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.open_code_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.closed_code_size">
|
||
<span class="sig-name descname"><span class="pre">closed_code_size</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.closed_code_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.data_size">
|
||
<span class="sig-name descname"><span class="pre">data_size</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.data_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.empty_size">
|
||
<span class="sig-name descname"><span class="pre">empty_size</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.empty_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as empty</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.open_code_regions">
|
||
<span class="sig-name descname"><span class="pre">open_code_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.open_code_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding flashmap regions filled with open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.closed_code_regions">
|
||
<span class="sig-name descname"><span class="pre">closed_code_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.closed_code_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding flashmap regions filled with closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.data_regions">
|
||
<span class="sig-name descname"><span class="pre">data_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.data_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding flashmap regions filled with data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.empty_regions">
|
||
<span class="sig-name descname"><span class="pre">empty_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.empty_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding empty flashmap regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.closed_code_regions_ifdtool">
|
||
<span class="sig-name descname"><span class="pre">closed_code_regions_ifdtool</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.closed_code_regions_ifdtool" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding ifdtool regions filled with closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.data_regions_ifdtool">
|
||
<span class="sig-name descname"><span class="pre">data_regions_ifdtool</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.data_regions_ifdtool" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding ifdtool regions filled with data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.empty_regions_ifdtool">
|
||
<span class="sig-name descname"><span class="pre">empty_regions_ifdtool</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.empty_regions_ifdtool" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding empty ifdtool regions</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.uncategorized_regions">
|
||
<span class="sig-name descname"><span class="pre">uncategorized_regions</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.uncategorized_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding flashmap regions that could not be classified.
|
||
Counted as closed-source code at the end of calculation process.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.uncategorized_regions_ifdtool">
|
||
<span class="sig-name descname"><span class="pre">uncategorized_regions_ifdtool</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.uncategorized_regions_ifdtool" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding ifdtool regions that could not be classified.
|
||
Counted as closed-source code at the end of calculation process.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.debug">
|
||
<span class="sig-name descname"><span class="pre">debug</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.debug" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Used to enable verbose debug output from the parsing process</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.ifd_found">
|
||
<span class="sig-name descname"><span class="pre">ifd_found</span></span><a class="headerlink" href="#coreboot.DasharoCorebootImage.ifd_found" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Boolean vlaue if Intel Flash Descriptor has been detected in
|
||
the image by ifdtool</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.__len__">
|
||
<span class="sig-name descname"><span class="pre">__len__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage.__len__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage.__len__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Returns the length of the coreboot firmware image</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>Length of the firmware binary file</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.__repr__">
|
||
<span class="sig-name descname"><span class="pre">__repr__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage.__repr__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage.__repr__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>DasharoCorebootImage class representation</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>class representation</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>str</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.__str__">
|
||
<span class="sig-name descname"><span class="pre">__str__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage.__str__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage.__str__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Returns string representation of the firmware image</p>
|
||
<p>Prints the firmware image statistics.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>DasharoCorebootImage string representation</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>str</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._region_is_cbfs">
|
||
<span class="sig-name descname"><span class="pre">_region_is_cbfs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">region</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._region_is_cbfs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._region_is_cbfs" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Checks if given region has a CBFS attribute</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>region</strong> (<em>dict</em>) – Flashmap region entry from dictionary</p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>True if regions contains CBFS attribute, false otherwise.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>bool</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._parse_cb_fmap_layout">
|
||
<span class="sig-name descname"><span class="pre">_parse_cb_fmap_layout</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._parse_cb_fmap_layout"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._parse_cb_fmap_layout" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Parses the cbfstool flashmap layout output</p>
|
||
<p>Parses the output of ‘cbfstool self.image_path layout -w’ and extract
|
||
the flashmap regions to a self.fmap_regions dictionary using the
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.region_regexp" title="coreboot.DasharoCorebootImage.region_regexp"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.region_regexp</span></code></a> regular
|
||
expression.</p>
|
||
<p>If a flashmap region has a CBFS attribute, the self.cbfs_images list
|
||
is appended with a new instance of <a class="reference internal" href="#coreboot.CBFSImage" title="coreboot.CBFSImage"><code class="xref py py-class docutils literal notranslate"><span class="pre">coreboot.CBFSImage</span></code></a>.</p>
|
||
<p>If <a class="reference internal" href="#coreboot.DasharoCorebootImage.debug" title="coreboot.DasharoCorebootImage.debug"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.debug</span></code></a> is True, all flashmap
|
||
regions with their attributes are printed on the console at the end.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._parse_ifdtool_regions">
|
||
<span class="sig-name descname"><span class="pre">_parse_ifdtool_regions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">microarch</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._parse_ifdtool_regions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._parse_ifdtool_regions" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Parses <cite>ifdtool –dump</cite> output
|
||
Extracts IFD regions to the <cite>self.ifdtool_regions</cite> dictionary
|
||
using the <cite>coreboot.DasharoCorebootImage.ifdtool_regexp</cite> regular expression.
|
||
If <cite>coreboot.DasharoCorebootImage.debug</cite> is True, all IFD regions with their
|
||
attributes are printed on the console at the end.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._classify_ifdtool_region">
|
||
<span class="sig-name descname"><span class="pre">_classify_ifdtool_region</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">region</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._classify_ifdtool_region"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._classify_ifdtool_region" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Classifies the IFD regions into basic categories</p>
|
||
<p>Each region is being classified into 3 basic categories and appended
|
||
to respective lists.</p>
|
||
<p><cite>coreboot.DasharoCorebootImage.closed_code_regions_ifdtool</cite> are appended
|
||
with regions found in <cite>coreboot.DasharoCorebootImage.IFD_BLOB_REGIONS</cite></p>
|
||
<p><cite>coreboot.DasharoCorebootImage.data_regions_ifdtool</cite> are appended
|
||
with regions found in <cite>coreboot.DasharoCorebootImage.IFD_DATA_REGIONS</cite></p>
|
||
<p><cite>coreboot.DasharoCorebootImage.empty_regions_ifdtool</cite> are appended
|
||
with regions that are detected to be empty using
|
||
<cite>coreboot.DasharoCorebootImage._is_empty</cite></p>
|
||
<p>Any other unrecognized region falls into
|
||
<cite>coreboot.DasharoCorebootImage.uncategorized_regions_ifdtool</cite> list which
|
||
will be counted as closed-source code region because we were unable to
|
||
identify what can be inside.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>region</strong> (<em>dict</em>) – IFD region entry from dictionary</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._is_empty">
|
||
<span class="sig-name descname"><span class="pre">_is_empty</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">start</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._is_empty"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._is_empty" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Checks if a flash region is empty, where empty is defined as filled with 0x00 or 0xFF bytes.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Param<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>start: Start address of the region</p>
|
||
</dd>
|
||
<dt class="field-even">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p><strong>end</strong> (<em>int</em>) – End address of the region</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>bool</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._classify_region">
|
||
<span class="sig-name descname"><span class="pre">_classify_region</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">region</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._classify_region"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._classify_region" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Classifies the flashmap regions into basic categories</p>
|
||
<p>Each detected flashmap region is being classified into 4 basic
|
||
categories and appended to respective lists. CBFS regions are
|
||
processed separately and not included here.</p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.open_code_regions" title="coreboot.DasharoCorebootImage.open_code_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.open_code_regions</span></code></a> are appended
|
||
with flashmap regions which name is found in
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.CODE_REGIONS" title="coreboot.DasharoCorebootImage.CODE_REGIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.CODE_REGIONS</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_regions" title="coreboot.DasharoCorebootImage.closed_code_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.closed_code_regions</span></code></a> are appended
|
||
with flashmap regions which name is found in
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.BLOB_REGIONS" title="coreboot.DasharoCorebootImage.BLOB_REGIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.BLOB_REGIONS</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_regions" title="coreboot.DasharoCorebootImage.empty_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.empty_regions</span></code></a> are appended with
|
||
flashmap regions which name is found in
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.EMPTY_REGIONS" title="coreboot.DasharoCorebootImage.EMPTY_REGIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.EMPTY_REGIONS</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.data_regions" title="coreboot.DasharoCorebootImage.data_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.data_regions</span></code></a> are appended with
|
||
flashmap regions which name is found in
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.DATA_REGIONS" title="coreboot.DasharoCorebootImage.DATA_REGIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.DATA_REGIONS</span></code></a></p>
|
||
<p>Flashmap regions which names is found in
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.SKIP_REGIONS" title="coreboot.DasharoCorebootImage.SKIP_REGIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.SKIP_REGIONS</span></code></a> are not classified
|
||
due to being cotnainers or aliases to other regions. Counting them
|
||
would result in duplication of the sizes when calculating metrics.</p>
|
||
<p>Any other unrecognized flashmap region falls into
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.data_regions" title="coreboot.DasharoCorebootImage.data_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.data_regions</span></code></a> list which will be
|
||
counted as closed-source code region because we were unable to
|
||
identify what can be inside.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>region</strong> (<em>dict</em>) – Flashmap region entry from dictionary</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._calculate_metrics">
|
||
<span class="sig-name descname"><span class="pre">_calculate_metrics</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._calculate_metrics"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._calculate_metrics" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Calculates the sizes of the four basic firmware components
|
||
categories</p>
|
||
<p>Calls <a class="reference internal" href="#coreboot.DasharoCorebootImage._classify_region" title="coreboot.DasharoCorebootImage._classify_region"><code class="xref py py-meth docutils literal notranslate"><span class="pre">_classify_region()</span></code></a> for each
|
||
detected region. The sums the regions sizes from all 5 lists</p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.open_code_regions" title="coreboot.DasharoCorebootImage.open_code_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.open_code_regions</span></code></a> sizes sum is
|
||
added to <a class="reference internal" href="#coreboot.DasharoCorebootImage.open_code_size" title="coreboot.DasharoCorebootImage.open_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.open_code_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_regions" title="coreboot.DasharoCorebootImage.closed_code_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.closed_code_regions</span></code></a> sizes sum is
|
||
added to <a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_size" title="coreboot.DasharoCorebootImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.closed_code_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.data_regions" title="coreboot.DasharoCorebootImage.data_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.data_regions</span></code></a> sizes sum is added
|
||
to <a class="reference internal" href="#coreboot.DasharoCorebootImage.data_size" title="coreboot.DasharoCorebootImage.data_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.data_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_regions" title="coreboot.DasharoCorebootImage.empty_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.empty_regions</span></code></a> sizes sum is added
|
||
to <a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_size" title="coreboot.DasharoCorebootImage.empty_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.empty_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.DasharoCorebootImage.uncategorized_regions" title="coreboot.DasharoCorebootImage.uncategorized_regions"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.uncategorized_regions</span></code></a> sizes sum
|
||
is added to <a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_size" title="coreboot.DasharoCorebootImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.closed_code_size</span></code></a></p>
|
||
<p>Additionally for each detected CBFS region their four basic
|
||
component’s categories are also added to the total metrics.</p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.open_code_size" title="coreboot.CBFSImage.open_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.open_code_size</span></code></a> is added to
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.open_code_size" title="coreboot.DasharoCorebootImage.open_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.open_code_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.closed_code_size" title="coreboot.CBFSImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.closed_code_size</span></code></a> is added to
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_size" title="coreboot.DasharoCorebootImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.closed_code_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.data_size" title="coreboot.CBFSImage.data_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.data_size</span></code></a> is added to
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.data_size" title="coreboot.DasharoCorebootImage.data_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.data_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.empty_size" title="coreboot.CBFSImage.empty_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.empty_size</span></code></a> is added to
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.empty_size" title="coreboot.DasharoCorebootImage.empty_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.empty_size</span></code></a></p>
|
||
<p>At the end the method calls
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage._normalize_sizes" title="coreboot.DasharoCorebootImage._normalize_sizes"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage._normalize_sizes()</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._sum_sizes">
|
||
<span class="sig-name descname"><span class="pre">_sum_sizes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">regions</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._sum_sizes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._sum_sizes" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Sums the size of the regions</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>regions</strong> (<em>dict</em>) – Dictionary of regions to sum</p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>Sum of the region sizes</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._normalize_sizes">
|
||
<span class="sig-name descname"><span class="pre">_normalize_sizes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._normalize_sizes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._normalize_sizes" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Checks if all firmware image components sizes sum up to whole image
|
||
size</p>
|
||
<p>This method acts as a safety check if there was no error during
|
||
parsing and classification. Additionally it verifies whether the
|
||
flashmap starts right at offset zero. It may happen that the flashmap
|
||
does not start at offset zero, which is possible for Intel board
|
||
coreboot images without IFD and ME regions specified. In such case the
|
||
missing regions are counted as closed-source and added to
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.closed_code_size" title="coreboot.DasharoCorebootImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.closed_code_size</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._get_percentage">
|
||
<span class="sig-name descname"><span class="pre">_get_percentage</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">metric</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._get_percentage"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._get_percentage" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Helper function to generate code share percentage</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>metric</strong> (<em>int</em>) – The size of open-source or closed-source code</p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>Percentage share of given metric compared to the sum of
|
||
open-source and closed-source code size.</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._export_regions_md">
|
||
<span class="sig-name descname"><span class="pre">_export_regions_md</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">regions</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">category</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._export_regions_md"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._export_regions_md" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Write flashmap regions for given category to the markdown file</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>file</strong> (<em>file</em>) – Markdown file handle to write the regions’s info to</p></li>
|
||
<li><p><strong>regions</strong> (<em>dict</em>) – Dictionary containing regions to be written to the
|
||
markdown file.</p></li>
|
||
<li><p><strong>category</strong> (<em>str</em>) – Category of the regions to be written to the markdown
|
||
file. Should be one of: open-source, closed-source,
|
||
data, empty.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage._export_ifdtool_regions_md">
|
||
<span class="sig-name descname"><span class="pre">_export_ifdtool_regions_md</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">regions</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">category</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage._export_ifdtool_regions_md"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage._export_ifdtool_regions_md" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Write IFD regions for given category to the markdown file</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>file</strong> (<em>file</em>) – Markdown file handle to write the regions’s info to</p></li>
|
||
<li><p><strong>regions</strong> (<em>dict</em>) – Dictionary containing regions to be written to the
|
||
markdown file.</p></li>
|
||
<li><p><strong>category</strong> (<em>str</em>) – Category of the regions to be written to the markdown
|
||
file. Should be one of: open-source, closed-source,
|
||
data, empty.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.export_markdown">
|
||
<span class="sig-name descname"><span class="pre">export_markdown</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mkdocs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">version</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage.export_markdown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage.export_markdown" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Opens a file and saves the openness report in markdown format</p>
|
||
<p>Saves the parsed information and classified image components into a
|
||
markdown file. Also for each CBFS in
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage.cbfs_images" title="coreboot.DasharoCorebootImage.cbfs_images"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.DasharoCorebootImage.cbfs_images</span></code></a> it calls
|
||
<a class="reference internal" href="#coreboot.CBFSImage.export_markdown" title="coreboot.CBFSImage.export_markdown"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coreboot.CBFSImage.export_markdown()</span></code></a> to save the CBFS region
|
||
statistics.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>file</strong> (<em>str</em>) – Path to markdown file</p></li>
|
||
<li><p><strong>mkdocs</strong> (<em>bool</em>) – Switch to export the report for mkdocs</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.DasharoCorebootImage.export_charts">
|
||
<span class="sig-name descname"><span class="pre">export_charts</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dir</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#DasharoCorebootImage.export_charts"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.DasharoCorebootImage.export_charts" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Plots the pie charts with firmware image statistics</p>
|
||
<p>Method plots two pie charts. One containing only the closed-source to
|
||
open-source code ratio. Second the share percentage of all four image
|
||
components categories: closed-source, open-source, data and empty
|
||
space.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>dir</strong> (<em>str</em>) – Path to the directory where the charts will be saved.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">coreboot.</span></span><span class="sig-name descname"><span class="pre">CBFSImage</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
|
||
<p>CBFSImage class</p>
|
||
<p>The main class representing a coreboot’s CBFS</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.CBFS_FILETYPES">
|
||
<span class="sig-name descname"><span class="pre">CBFS_FILETYPES</span></span><a class="headerlink" href="#coreboot.CBFSImage.CBFS_FILETYPES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of all known CBFS filetypes for regexp matching</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.OPEN_SOURCE_FILETYPES">
|
||
<span class="sig-name descname"><span class="pre">OPEN_SOURCE_FILETYPES</span></span><a class="headerlink" href="#coreboot.CBFSImage.OPEN_SOURCE_FILETYPES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filetypes known to be open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.CLOSED_SOURCE_FILETYPES">
|
||
<span class="sig-name descname"><span class="pre">CLOSED_SOURCE_FILETYPES</span></span><a class="headerlink" href="#coreboot.CBFSImage.CLOSED_SOURCE_FILETYPES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filetypes known to be closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.DATA_FILETYPES">
|
||
<span class="sig-name descname"><span class="pre">DATA_FILETYPES</span></span><a class="headerlink" href="#coreboot.CBFSImage.DATA_FILETYPES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filetypes known to be data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS">
|
||
<span class="sig-name descname"><span class="pre">CLOSED_SOURCE_EXCEPTIONS</span></span><a class="headerlink" href="#coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filenames exceptions known to be closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.RAW_DATA_FILES">
|
||
<span class="sig-name descname"><span class="pre">RAW_DATA_FILES</span></span><a class="headerlink" href="#coreboot.CBFSImage.RAW_DATA_FILES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filenames known to be data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.RAW_OPEN_SOURCE_FILES">
|
||
<span class="sig-name descname"><span class="pre">RAW_OPEN_SOURCE_FILES</span></span><a class="headerlink" href="#coreboot.CBFSImage.RAW_OPEN_SOURCE_FILES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filenames known to be created from open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.RAW_CLOSED_SOURCE_FILES">
|
||
<span class="sig-name descname"><span class="pre">RAW_CLOSED_SOURCE_FILES</span></span><a class="headerlink" href="#coreboot.CBFSImage.RAW_CLOSED_SOURCE_FILES" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS filenames known to be closed-source</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.REGIONS_WITH_CONFIG">
|
||
<span class="sig-name descname"><span class="pre">REGIONS_WITH_CONFIG</span></span><a class="headerlink" href="#coreboot.CBFSImage.REGIONS_WITH_CONFIG" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list of CBFS regions that should contain a config file</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.DASHARO_LAN_ROM_GUID">
|
||
<span class="sig-name descname"><span class="pre">DASHARO_LAN_ROM_GUID</span></span><a class="headerlink" href="#coreboot.CBFSImage.DASHARO_LAN_ROM_GUID" title="Permalink to this definition"></a></dt>
|
||
<dd><p>GUID of the Dasharo UEFI Paylaod file that contains closed-source
|
||
EFI driver for LAN NIC</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.file_patterns">
|
||
<span class="sig-name descname"><span class="pre">file_patterns</span></span><a class="headerlink" href="#coreboot.CBFSImage.file_patterns" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Set of regular expressions used to parse the cbfstool output</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.file_regexp">
|
||
<span class="sig-name descname"><span class="pre">file_regexp</span></span><a class="headerlink" href="#coreboot.CBFSImage.file_regexp" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Regular expression variable used to parse the cbfstool output</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.__init__">
|
||
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">image_path</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">region</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage.__init__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage.__init__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>CBFSImage class init method</p>
|
||
<p>Initializes the class fields for storing the CBFS region components
|
||
classified to specific groups. Also calls
|
||
<code class="xref py py-meth docutils literal notranslate"><span class="pre">_parse_cbfs_files()</span></code>,
|
||
<code class="xref py py-meth docutils literal notranslate"><span class="pre">_parse_cb_config()</span></code> and
|
||
<a class="reference internal" href="#coreboot.DasharoCorebootImage._calculate_metrics" title="coreboot.DasharoCorebootImage._calculate_metrics"><code class="xref py py-meth docutils literal notranslate"><span class="pre">_calculate_metrics()</span></code></a> methods to
|
||
parse the CBFS and calculate the metrics.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>region</strong> – Path the the firmware image file being parsed.</p></li>
|
||
<li><p><strong>region</strong> – The flashmap region where the CBFS resides.</p></li>
|
||
<li><p><strong>verbose</strong> (<em>bool</em><em>, </em><em>optional</em>) – Optional parameter to turn on debug information during
|
||
the image parsing, defaults to False</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.image_path">
|
||
<span class="sig-name descname"><span class="pre">image_path</span></span><a class="headerlink" href="#coreboot.CBFSImage.image_path" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Path to the image represented by DasharoCorebootImage class</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.region_name">
|
||
<span class="sig-name descname"><span class="pre">region_name</span></span><a class="headerlink" href="#coreboot.CBFSImage.region_name" title="Permalink to this definition"></a></dt>
|
||
<dd><p>The region name where the CBFS is located</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.cbfs_size">
|
||
<span class="sig-name descname"><span class="pre">cbfs_size</span></span><a class="headerlink" href="#coreboot.CBFSImage.cbfs_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>The region size where the CBFS is located</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.cbfs_files">
|
||
<span class="sig-name descname"><span class="pre">cbfs_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.cbfs_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A dictionary holding the CBFS files and their attributes</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.kconfig_opts">
|
||
<span class="sig-name descname"><span class="pre">kconfig_opts</span></span><a class="headerlink" href="#coreboot.CBFSImage.kconfig_opts" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A dictionary holding the coreboot config used to produce the
|
||
CBFS</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.num_files">
|
||
<span class="sig-name descname"><span class="pre">num_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.num_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Number of files in the CBFS</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.num_opts">
|
||
<span class="sig-name descname"><span class="pre">num_opts</span></span><a class="headerlink" href="#coreboot.CBFSImage.num_opts" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Number of options coreboot config file found in CBFS</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.open_code_size">
|
||
<span class="sig-name descname"><span class="pre">open_code_size</span></span><a class="headerlink" href="#coreboot.CBFSImage.open_code_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.closed_code_size">
|
||
<span class="sig-name descname"><span class="pre">closed_code_size</span></span><a class="headerlink" href="#coreboot.CBFSImage.closed_code_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.data_size">
|
||
<span class="sig-name descname"><span class="pre">data_size</span></span><a class="headerlink" href="#coreboot.CBFSImage.data_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.empty_size">
|
||
<span class="sig-name descname"><span class="pre">empty_size</span></span><a class="headerlink" href="#coreboot.CBFSImage.empty_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Total number of bytes classified as empty</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.open_code_files">
|
||
<span class="sig-name descname"><span class="pre">open_code_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.open_code_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding CBFS files classified as open-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.closed_code_files">
|
||
<span class="sig-name descname"><span class="pre">closed_code_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.closed_code_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding CBFS files classified as closed-source code</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.data_files">
|
||
<span class="sig-name descname"><span class="pre">data_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.data_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding CBFS files classified as data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.empty_files">
|
||
<span class="sig-name descname"><span class="pre">empty_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.empty_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding CBFS empty spaces</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.uncategorized_files">
|
||
<span class="sig-name descname"><span class="pre">uncategorized_files</span></span><a class="headerlink" href="#coreboot.CBFSImage.uncategorized_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>A list holding CBFS files that could not be classified. Counted
|
||
as closed-source code at the end of calculation process.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.edk2_ipxe">
|
||
<span class="sig-name descname"><span class="pre">edk2_ipxe</span></span><a class="headerlink" href="#coreboot.CBFSImage.edk2_ipxe" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Variable to hold the status whether iPXE was built for EDK2</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.ipxe_present">
|
||
<span class="sig-name descname"><span class="pre">ipxe_present</span></span><a class="headerlink" href="#coreboot.CBFSImage.ipxe_present" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Variable to hold the status of iPXE presence in the CBFS</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.ipxe_rom_id">
|
||
<span class="sig-name descname"><span class="pre">ipxe_rom_id</span></span><a class="headerlink" href="#coreboot.CBFSImage.ipxe_rom_id" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Variable to hold the PCI ID used for iPXE build</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.lan_rom_size">
|
||
<span class="sig-name descname"><span class="pre">lan_rom_size</span></span><a class="headerlink" href="#coreboot.CBFSImage.lan_rom_size" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Variable to hold the size of optional LAN EFI driver used in
|
||
Dasharo builds. If such driver is detected based on coreboot config,
|
||
the driver’s size is subtracted from open-source code and added to
|
||
closed-source code.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.debug">
|
||
<span class="sig-name descname"><span class="pre">debug</span></span><a class="headerlink" href="#coreboot.CBFSImage.debug" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Used to enable verbose debug output from the parsing process</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.__len__">
|
||
<span class="sig-name descname"><span class="pre">__len__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage.__len__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage.__len__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Returns the length of the CBFS region</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>Length of the CBFS</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.__repr__">
|
||
<span class="sig-name descname"><span class="pre">__repr__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage.__repr__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage.__repr__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>CBFSImage class representation</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>class representation</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>str</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.__str__">
|
||
<span class="sig-name descname"><span class="pre">__str__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage.__str__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage.__str__" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Returns string representation of the CBFS</p>
|
||
<p>Prints the firmware image statistics.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>CBFSImage string representation</p>
|
||
</dd>
|
||
<dt class="field-even">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>str</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._parse_cbfs_files">
|
||
<span class="sig-name descname"><span class="pre">_parse_cbfs_files</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._parse_cbfs_files"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._parse_cbfs_files" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Parses the CBFS contents from cbfstool output</p>
|
||
<p>Parses the output of ‘cbfstool <a class="reference internal" href="#coreboot.CBFSImage.image_path" title="coreboot.CBFSImage.image_path"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.image_path</span></code></a>
|
||
print -r <a class="reference internal" href="#coreboot.CBFSImage.region_name" title="coreboot.CBFSImage.region_name"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.region_name</span></code></a>’ and extracts the CBFS
|
||
files information to the <a class="reference internal" href="#coreboot.CBFSImage.cbfs_files" title="coreboot.CBFSImage.cbfs_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.cbfs_files</span></code></a>
|
||
dictionary using the <a class="reference internal" href="#coreboot.CBFSImage.file_regexp" title="coreboot.CBFSImage.file_regexp"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.file_regexp</span></code></a> regular
|
||
expression.</p>
|
||
<p>If <a class="reference internal" href="#coreboot.CBFSImage.debug" title="coreboot.CBFSImage.debug"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.debug</span></code></a> is True, all CBFS contents with
|
||
their attributes are printed on the console at the end.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._calculate_metrics">
|
||
<span class="sig-name descname"><span class="pre">_calculate_metrics</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._calculate_metrics"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._calculate_metrics" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Calculates the sizes of the four basic firmware components
|
||
categories</p>
|
||
<p>Calls <a class="reference internal" href="#coreboot.CBFSImage._classify_file" title="coreboot.CBFSImage._classify_file"><code class="xref py py-meth docutils literal notranslate"><span class="pre">_classify_file()</span></code></a> for each detected
|
||
CBFS file. Then sums the files’ sizes from all 5 lists:</p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.open_code_files" title="coreboot.CBFSImage.open_code_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.open_code_files</span></code></a> sizes sum is added to
|
||
<a class="reference internal" href="#coreboot.CBFSImage.open_code_size" title="coreboot.CBFSImage.open_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.open_code_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.closed_code_files" title="coreboot.CBFSImage.closed_code_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.closed_code_files</span></code></a> sizes sum is added to
|
||
<a class="reference internal" href="#coreboot.CBFSImage.closed_code_size" title="coreboot.CBFSImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.closed_code_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.data_files" title="coreboot.CBFSImage.data_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.data_files</span></code></a> sizes sum is added to
|
||
<a class="reference internal" href="#coreboot.CBFSImage.data_size" title="coreboot.CBFSImage.data_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.data_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.empty_files" title="coreboot.CBFSImage.empty_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.empty_files</span></code></a> sizes sum is added to
|
||
<a class="reference internal" href="#coreboot.CBFSImage.empty_size" title="coreboot.CBFSImage.empty_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.empty_size</span></code></a></p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.uncategorized_files" title="coreboot.CBFSImage.uncategorized_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.uncategorized_files</span></code></a> sizes sum is added to
|
||
<a class="reference internal" href="#coreboot.CBFSImage.closed_code_size" title="coreboot.CBFSImage.closed_code_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.closed_code_size</span></code></a></p>
|
||
<p>Additionally if a LAN EFI driver has been detected, it is subtracted
|
||
from open-source code size (normally the driver is part ofthe payload
|
||
considered to be open-source) and added to the closed-source size.</p>
|
||
<p>At the end the method calls
|
||
<a class="reference internal" href="#coreboot.CBFSImage._normalize_sizes" title="coreboot.CBFSImage._normalize_sizes"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coreboot.CBFSImage._normalize_sizes()</span></code></a></p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._classify_file">
|
||
<span class="sig-name descname"><span class="pre">_classify_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._classify_file"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._classify_file" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Classifies the CBFS file into basic categories.</p>
|
||
<p>Each detected CBFS file is being classified into 4 basic categories
|
||
and appended to respective lists.</p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.open_code_files" title="coreboot.CBFSImage.open_code_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.open_code_files</span></code></a> are appended with CBFS
|
||
files which type is found in
|
||
<a class="reference internal" href="#coreboot.CBFSImage.OPEN_SOURCE_FILETYPES" title="coreboot.CBFSImage.OPEN_SOURCE_FILETYPES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.OPEN_SOURCE_FILETYPES</span></code></a> and names are not
|
||
found in <a class="reference internal" href="#coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS" title="coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS</span></code></a>. CBFS
|
||
files of type ‘raw’ are also classified as open-source code if its
|
||
name is found in <a class="reference internal" href="#coreboot.CBFSImage.RAW_OPEN_SOURCE_FILES" title="coreboot.CBFSImage.RAW_OPEN_SOURCE_FILES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.RAW_OPEN_SOURCE_FILES</span></code></a> or
|
||
if it is an iPXE legacy ROM (based on the PCI ID detected from
|
||
coreboot’s config).</p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.closed_code_files" title="coreboot.CBFSImage.closed_code_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.closed_code_files</span></code></a> are appended with CBFS
|
||
files which name is found in
|
||
<a class="reference internal" href="#coreboot.CBFSImage.CLOSED_SOURCE_FILETYPES" title="coreboot.CBFSImage.CLOSED_SOURCE_FILETYPES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.CLOSED_SOURCE_FILETYPES</span></code></a> or with CBFS
|
||
file’s type found in <a class="reference internal" href="#coreboot.CBFSImage.OPEN_SOURCE_FILETYPES" title="coreboot.CBFSImage.OPEN_SOURCE_FILETYPES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.OPEN_SOURCE_FILETYPES</span></code></a>
|
||
and name found in <a class="reference internal" href="#coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS" title="coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.CLOSED_SOURCE_EXCEPTIONS</span></code></a>
|
||
or with CBFS files of type ‘raw’ which names are found in
|
||
<a class="reference internal" href="#coreboot.CBFSImage.RAW_CLOSED_SOURCE_FILES" title="coreboot.CBFSImage.RAW_CLOSED_SOURCE_FILES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.RAW_CLOSED_SOURCE_FILES</span></code></a>.</p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.empty_files" title="coreboot.CBFSImage.empty_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.empty_files</span></code></a> are appended with CBFS files
|
||
with type ‘null’.</p>
|
||
<p><a class="reference internal" href="#coreboot.CBFSImage.data_files" title="coreboot.CBFSImage.data_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.data_files</span></code></a> are appended with CBFS files
|
||
which type is found in <a class="reference internal" href="#coreboot.CBFSImage.DATA_FILETYPES" title="coreboot.CBFSImage.DATA_FILETYPES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.DATA_FILETYPES</span></code></a> or
|
||
with CBFS file of type ‘raw’ and names found in
|
||
<a class="reference internal" href="#coreboot.CBFSImage.RAW_DATA_FILES" title="coreboot.CBFSImage.RAW_DATA_FILES"><code class="xref py py-const docutils literal notranslate"><span class="pre">coreboot.CBFSImage.RAW_DATA_FILES</span></code></a>.</p>
|
||
<p>Any other unrecognized CBFS files fall into
|
||
<a class="reference internal" href="#coreboot.CBFSImage.uncategorized_files" title="coreboot.CBFSImage.uncategorized_files"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.uncategorized_files</span></code></a> list which will be
|
||
counted as closed-source code because we were unable to identify what
|
||
can be inside.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>file</strong> – CBFS file entry from dictionary</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._normalize_sizes">
|
||
<span class="sig-name descname"><span class="pre">_normalize_sizes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._normalize_sizes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._normalize_sizes" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Ensures that all CBFS components sizes sum up to whole image size</p>
|
||
<p>This function takes into account a situation when the CBFS is
|
||
truncated (e.g. vboot RW CBFS regions). In such case we calculate the
|
||
byte offset of the end of last file in CBFS and calculate the
|
||
truncated size by subtracting the offset from the CBFS region size.
|
||
The truncated size is then added to the
|
||
<a class="reference internal" href="#coreboot.CBFSImage.empty_size" title="coreboot.CBFSImage.empty_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.empty_size</span></code></a>.</p>
|
||
<p>cbfstool prints only the sizes of files and does not account for the
|
||
metadata surrounding the file. It is necessary to calculate the
|
||
metadata size by subtarcting all file’s sizes from the whole CBFS
|
||
region size. The metadata size is then added to the
|
||
<a class="reference internal" href="#coreboot.CBFSImage.data_size" title="coreboot.CBFSImage.data_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.data_size</span></code></a>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._sum_sizes">
|
||
<span class="sig-name descname"><span class="pre">_sum_sizes</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">files</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._sum_sizes"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._sum_sizes" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Sums the size of the CBFS files</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>files</strong> (<em>dict</em>) – Dictionary of files to sum</p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>Sum of the files’ sizes</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>int</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._get_kconfig_value">
|
||
<span class="sig-name descname"><span class="pre">_get_kconfig_value</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">option</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._get_kconfig_value"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._get_kconfig_value" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Returns a value of given coreboot’s Kconfig option</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>option</strong> (<em>str</em>) – Name of the Kconfig option without ‘<a href="#id1"><span class="problematic" id="id2">CONFIG_</span></a>’ prefix.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>The value of Kconfig option</p>
|
||
</dd>
|
||
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p>str</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._parse_cb_config">
|
||
<span class="sig-name descname"><span class="pre">_parse_cb_config</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._parse_cb_config"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._parse_cb_config" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Extracts and parses the CBFS config file</p>
|
||
<p>The function uses the cbfstool to extract the coreboot’s config and a
|
||
regexp to extract the Kconfig names and values to
|
||
<a class="reference internal" href="#coreboot.CBFSImage.kconfig_opts" title="coreboot.CBFSImage.kconfig_opts"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.kconfig_opts</span></code></a>.</p>
|
||
<p>Additionally the function calls
|
||
<a class="reference internal" href="#coreboot.CBFSImage._check_for_ipxe" title="coreboot.CBFSImage._check_for_ipxe"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coreboot.CBFSImage._check_for_ipxe()</span></code></a> and
|
||
<a class="reference internal" href="#coreboot.CBFSImage._check_for_lanrom" title="coreboot.CBFSImage._check_for_lanrom"><code class="xref py py-meth docutils literal notranslate"><span class="pre">coreboot.CBFSImage._check_for_lanrom()</span></code></a>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._check_for_ipxe">
|
||
<span class="sig-name descname"><span class="pre">_check_for_ipxe</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._check_for_ipxe"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._check_for_ipxe" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Checks whether iPXE was built int othe CBFS image and in what form</p>
|
||
<p>The function checks for iPXE specific Kconfig options and sets the
|
||
<a class="reference internal" href="#coreboot.CBFSImage.edk2_ipxe" title="coreboot.CBFSImage.edk2_ipxe"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.edk2_ipxe</span></code></a>,
|
||
<a class="reference internal" href="#coreboot.CBFSImage.ipxe_present" title="coreboot.CBFSImage.ipxe_present"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.ipxe_present</span></code></a> and
|
||
<a class="reference internal" href="#coreboot.CBFSImage.ipxe_rom_id" title="coreboot.CBFSImage.ipxe_rom_id"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.ipxe_rom_id</span></code></a> based on the detected Kconfig
|
||
values.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._check_for_lanrom">
|
||
<span class="sig-name descname"><span class="pre">_check_for_lanrom</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._check_for_lanrom"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._check_for_lanrom" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Checks whether external LAN EFI driver has been included in UEFI
|
||
Payload and calculates its estimated compressed size</p>
|
||
<p>The function check for the LAn driver Kcofngi option. If it is
|
||
present, then the cbfstool is called to extract the payload binary.
|
||
Then UEFIExtract tries to extract the LAN EFI driver by the file GUID
|
||
<a class="reference internal" href="#coreboot.CBFSImage.DASHARO_LAN_ROM_GUID" title="coreboot.CBFSImage.DASHARO_LAN_ROM_GUID"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.DASHARO_LAN_ROM_GUID</span></code></a> from the payload
|
||
binary. At the ned the extracted LAN EFI driver is compressed with
|
||
lzma to estimate the driver’s size occupying the UEFI Payload. The
|
||
result is saved to <a class="reference internal" href="#coreboot.CBFSImage.lan_rom_size" title="coreboot.CBFSImage.lan_rom_size"><code class="xref py py-attr docutils literal notranslate"><span class="pre">coreboot.CBFSImage.lan_rom_size</span></code></a>.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage._export_files_md">
|
||
<span class="sig-name descname"><span class="pre">_export_files_md</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cbfs_files</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">category</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage._export_files_md"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage._export_files_md" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Writes the CBFS files for given category to the markdown file</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>file</strong> (<em>file</em>) – Markdown file handle to write the CBFS files’ info to</p></li>
|
||
<li><p><strong>cbfs_files</strong> – Dictionary containing CBFS files to be written to
|
||
the markdown file.</p></li>
|
||
<li><p><strong>category</strong> (<em>str</em>) – Category of the CBFS files to be written to the
|
||
markdown file. Should be one of: open-source,
|
||
closed-source, data, empty.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="coreboot.CBFSImage.export_markdown">
|
||
<span class="sig-name descname"><span class="pre">export_markdown</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mkdocs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/coreboot.html#CBFSImage.export_markdown"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#coreboot.CBFSImage.export_markdown" title="Permalink to this definition"></a></dt>
|
||
<dd><p>Saves the openness report in markdown format for given CBFS region</p>
|
||
<p>Saves the parsed information and classified CBFS components into a
|
||
markdown file.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>file</strong> (<em>str</em>) – Markdown file handle</p></li>
|
||
<li><p><strong>mkdocs</strong> (<em>bool</em>) – Switch to export the report for mkdocs</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="openness_score.html" class="btn btn-neutral float-left" title="openness_score module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="uefi.html" class="btn btn-neutral float-right" title="UEFI module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2023, Dasharo Team.</p>
|
||
</div>
|
||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |