You've already forked slimbootloader.github.io
mirror of
https://github.com/Dasharo/slimbootloader.github.io.git
synced 2026-03-06 15:26:36 -08:00
284 lines
17 KiB
HTML
284 lines
17 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" >
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Boot Zephyr — Slim Bootloader 1.0 documentation</title>
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||
<link rel="shortcut icon" href="../_static/sbl_logo_blue_32x32_icon.ico"/>
|
||
<!--[if lt IE 9]>
|
||
<script src="../_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
<script src="../_static/jquery.js"></script>
|
||
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
||
<script src="../_static/doctools.js"></script>
|
||
<script src="../_static/sphinx_highlight.js"></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="Boot MicroPython" href="boot-micropython.html" />
|
||
<link rel="prev" title="Boot VxWorks" href="boot-vxworks.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">
|
||
Slim Bootloader
|
||
<img src="../_static/sbl_logo_white_200x200.png" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div class="version">
|
||
1.0
|
||
</div>
|
||
<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">
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="../introduction/index.html">Introduction</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../getting-started/index.html">Getting Started</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../supported-hardware/index.html">Supported Hardware</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../developer-guides/index.html">Developer’s Guide</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../security/index.html">Security Features</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">How-Tos</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="customize-build.html">Customize Build</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="change-boot-option.html">Change Boot Options</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="enable-verified-boot.html">Enable Verified Boot</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="enable-intel-tcc.html">Intel® TCC enable</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="enable-intel-tsn.html">TSN</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="enable-tsn-gbe-sgmii.html">Enable TSN GbE SGMII</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="enable-pre-os-payload.html">Enable Pre-OS Payload Support</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="reduce-debug-message.html">Reduce debug messages</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="add-new-library.html">Add New Library</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="add-new-payload.html">Create New Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="add-new-payload.html#helloworld-payload">HelloWorld Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="integrate-multiple-payloads.html">Integrate Multiple Payloads</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="create-container-boot-image.html">Create Container Boot Image</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="create-ias-boot-image.html">Create IAS Boot Image</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-windows.html">Boot Windows with UEFI Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-netboot.html">Netboot / PXE boot with UEFI Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-ubuntu.html">Boot Ubuntu</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-ubuntu.html#setup-spn-os-container-boot">Setup SBL OS Container Boot</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-vxworks.html">Boot VxWorks</a></li>
|
||
<li class="toctree-l2 current"><a class="current reference internal" href="#">Boot Zephyr</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#up2-board">UP<sup>2</sup> Board</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#qemu">QEMU</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-micropython.html">Boot MicroPython</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-with-linux-payload.html">Boot Linux as a Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-with-u-boot-payload.html">Boot Linux with U-Boot Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-pxe-uboot.html">PXE Boot Through U-Boot Payload</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="configure-memory-down.html">Configure Memory Down</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="collect-time-logs.html">Capture Boot Time Data</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="configure_gpio.html">GPIO / CFIO Configuration</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="configure_gpio.html#run-gengpiodata-tool">Run GenGpioData Tool</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="add-fastboot.html">Add Fastboot Support</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="boot-acrn.html">Boot ACRN Hypervisor</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Tools</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../specs/index.html">Specifications</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../references/references.html">References and Links</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../references/terminology.html">Terminology and Acronyms</a></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">Slim Bootloader</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="index.html">How-Tos</a></li>
|
||
<li class="breadcrumb-item active">Boot Zephyr</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<section id="boot-zephyr">
|
||
<span id="id1"></span><h1>Boot Zephyr<a class="headerlink" href="#boot-zephyr" title="Permalink to this heading"></a></h1>
|
||
<p>We may follow below steps to setup Zephyr with SBL on UP<sup>2</sup> maker board and QEMU.</p>
|
||
<section id="up2-board">
|
||
<h2>UP<sup>2</sup> Board<a class="headerlink" href="#up2-board" title="Permalink to this heading"></a></h2>
|
||
<ol class="arabic simple">
|
||
<li><p>Follow <a href="https://docs.zephyrproject.org/latest/getting_started/getting_started.html" target="_blank">Getting Started Guide</a> to setup <strong>Zephyr</strong> build/dev environment</p></li>
|
||
</ol>
|
||
<ol class="arabic simple" start="2">
|
||
<li><p>Build an application uses synchronization sample application:</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><ol class="arabic">
|
||
<li><p>setup zephyr environment:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="n">zephyr</span><span class="o">-</span><span class="n">env</span><span class="o">.</span><span class="n">sh</span>
|
||
|
||
<span class="ow">or</span>
|
||
|
||
<span class="n">zephyr</span><span class="o">-</span><span class="n">env</span><span class="o">.</span><span class="n">cmd</span>
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>Build sample application for UP<sup>2</sup> board:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">samples</span><span class="o">/</span><span class="n">synchronization</span>
|
||
<span class="n">mkdir</span> <span class="n">build_up2</span> <span class="o">&&</span> <span class="n">cd</span> <span class="n">build_up2</span>
|
||
<span class="n">cmake</span> <span class="o">-</span><span class="n">GNinja</span> <span class="o">-</span><span class="n">DBOARD</span><span class="o">=</span><span class="n">up_squared_sbl</span> <span class="o">..</span>
|
||
<span class="n">ninja</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Output file: <code class="docutils literal notranslate"><span class="pre">samples/synchronization/build_up2/zephyr/zephyr.elf</span></code></p>
|
||
</li>
|
||
</ol>
|
||
</div></blockquote>
|
||
<ol class="arabic simple" start="3">
|
||
<li><p>Build SBL image with zephyr.elf as a direct payload for simple test.</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><ul>
|
||
<li><p>build Slim Bootloader for UP<sup>2</sup> board with the built zephyr.elf:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">BuildLoader</span><span class="o">.</span><span class="n">py</span> <span class="n">build</span> <span class="n">apl</span> <span class="o">-</span><span class="n">p</span> <span class="o"><</span><span class="n">zephyr_root</span><span class="o">>/</span><span class="n">samples</span><span class="o">/</span><span class="n">synchronization</span><span class="o">/</span><span class="n">build_up2</span><span class="o">/</span><span class="n">zephyr</span><span class="o">/</span><span class="n">zephyr</span><span class="o">.</span><span class="n">elf</span>
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div></blockquote>
|
||
<ol class="arabic simple" start="4">
|
||
<li><p>Create a IFWI for UP<sup>2</sup>, follow the steps <a href="https://slimbootloader.github.io/supported-hardware/up2.html#stitching" target="_blank">here</a>.</p></li>
|
||
</ol>
|
||
<ol class="arabic" start="5">
|
||
<li><p>Flash IFWI and check the zephyr up & running thru serial console:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>......
|
||
Stage2 heap: 0xB4C000 (0x10C000 used, 0xA40000 free)
|
||
Payload ent***** Booting Zephyr OS zephyr-v1.13.0-1689-g4a7c422182 *****
|
||
threadA: Hello World from up_squared!
|
||
threadB: Hello World from up_squared!
|
||
threadA: Hello World from up_squared!
|
||
threadB: Hello World from up_squared!
|
||
threadA: Hello World from up_squared!
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
</ol>
|
||
</section>
|
||
<section id="qemu">
|
||
<h2>QEMU<a class="headerlink" href="#qemu" title="Permalink to this heading"></a></h2>
|
||
<ol class="arabic simple">
|
||
<li><p>Build an application uses synchronization sample application:</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><ol class="arabic">
|
||
<li><p>setup zephyr environment:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="n">zephyr</span><span class="o">-</span><span class="n">env</span><span class="o">.</span><span class="n">sh</span>
|
||
|
||
<span class="ow">or</span>
|
||
|
||
<span class="n">zephyr</span><span class="o">-</span><span class="n">env</span><span class="o">.</span><span class="n">cmd</span>
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>Build sample application for QEMU:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">samples</span><span class="o">/</span><span class="n">synchronization</span>
|
||
<span class="n">mkdir</span> <span class="n">build_qemu</span> <span class="o">&&</span> <span class="n">cd</span> <span class="n">build_qemu</span>
|
||
<span class="n">cmake</span> <span class="o">-</span><span class="n">GNinja</span> <span class="o">-</span><span class="n">DBOARD</span><span class="o">=</span><span class="n">qemu_x86</span> <span class="o">..</span>
|
||
<span class="n">ninja</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Output file: <code class="docutils literal notranslate"><span class="pre">samples/synchronization/build_qemu/zephyr/zephyr.elf</span></code></p>
|
||
</li>
|
||
</ol>
|
||
</div></blockquote>
|
||
<ol class="arabic simple" start="2">
|
||
<li><p>Build SBL image with zephyr.elf as as payload for simple test.</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><p>Build SBL to include zephyr.elf:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">BuildLoader</span><span class="o">.</span><span class="n">py</span> <span class="n">build</span> <span class="n">qemu</span> <span class="o">-</span><span class="n">p</span> <span class="o"><</span><span class="n">zephyr_root</span><span class="o">>/</span><span class="n">samples</span><span class="o">/</span><span class="n">synchronization</span><span class="o">/</span><span class="n">build_qemu</span><span class="o">/</span><span class="n">zephyr</span><span class="o">/</span><span class="n">zephyr</span><span class="o">.</span><span class="n">elf</span>
|
||
</pre></div>
|
||
</div>
|
||
</div></blockquote>
|
||
<ol class="arabic simple" start="3">
|
||
<li><p>Run QEMU and check the zephyr up & running thru serial console :</p></li>
|
||
</ol>
|
||
<blockquote>
|
||
<div><ol class="arabic">
|
||
<li><p>Execute QEMU:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">qemu</span><span class="o">-</span><span class="n">system</span><span class="o">-</span><span class="n">x86_64</span> <span class="o">-</span><span class="n">m</span> <span class="mi">256</span><span class="n">M</span> <span class="o">-</span><span class="n">machine</span> <span class="n">q35</span> <span class="o">-</span><span class="n">nographic</span> <span class="o">-</span><span class="n">pflash</span> <span class="n">Outputs</span><span class="o">/</span><span class="n">qemu</span><span class="o">/</span><span class="n">SlimBootloader</span><span class="o">.</span><span class="n">bin</span>
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
<li><p>Check result thru serial console:</p>
|
||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>......
|
||
Payload entry: 0x00001000
|
||
Jump to payload
|
||
***** Booting Zephyr OS zephyr-v1.13.0-1689-gbc34b1aa09 *****
|
||
threadA: Hello World from qemu_x86!
|
||
threadB: Hello World from qemu_x86!
|
||
threadA: Hello World from qemu_x86!
|
||
</pre></div>
|
||
</div>
|
||
</li>
|
||
</ol>
|
||
</div></blockquote>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="boot-vxworks.html" class="btn btn-neutral float-left" title="Boot VxWorks" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="boot-micropython.html" class="btn btn-neutral float-right" title="Boot MicroPython" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2018 - 2025, Intel Corporation.
|
||
<span class="lastupdated">Last updated on Jun 27, 2025.
|
||
</span></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> |