Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (29 sloc) 2.03 KB
---
title: Building AsteroidOS
layout: documentation
---
<p>If you decide to compile AsteroidOS from source be aware that it’s a simple process but the first build might take you a lot of time. Report any problem to the <a href="https://github.com/AsteroidOS/asteroid/issues">issues tracker</a>:</p>
<video class="" id="" width="100%" height="100%" controls="" loop="" autoplay=""><source src="https://asteroidos.org/asteroid.mp4" type="video/mp4"></video>
<div class="page-header">
<h1 id="downloading">Downloading</h1>
</div>
<p>Start by installing the prerequisites:</p>
<pre><code>git build-essential cpio diffstat gawk chrpath texinfo python2.7 </code></pre>
<p>Clone the main repository using the following command:</p>
<pre><code>git clone https://github.com/AsteroidOS/asteroid.git
cd asteroid/
</code></pre>
<p>This repository only contains a shell script that populates <em>src/</em> with OpenEmbedded and the appropriate Asteroid layers. Then, it setups the environment for a bitbake build. The following command will setup a build for <em>dory</em> (the LG G Watch) but you can also build an image for other watches by using the corresponding codename.</em></p>
<pre><code>. ./prepare-build.sh dory # Be careful that this script must be sourced and not only ran
</code></pre>
<p>If the environment has been correctly setup, you should now be in the <i>build</i> subdirectory.</p>
<div class="page-header">
<h1 id="building">Building</h1>
</div>
<p>Once the environment is prepared, you can simply trigger a build with the following command:</p>
<pre><code>bitbake asteroid-image</code></pre>
<p><i>Note:</i> Bitbake is a powerful tool that can also build single packages (e.g: bitbake strace) or <a href="{{rel 'wiki/building-asteroidos'}}">the SDK</a> for example. Refer to its documentation for more details.</p>
<div class="page-header">
<h1 id="installing">Installing</h1>
</div>
<p>After a while, the generated image should be available in <em>build/tmp-glibc/deploy/images/dory/</em>.</p> Install AsteroidOS using your usual device's instructions.