Build GolemOS ============= In this section you will learn how to properly build Datalogger OS. The main two steps are to satisfy dependencies and choose proper image type. All of the steps are described bellow. Clone main repository with poky distribution -------------------------------------------- .. code-block:: git clone --single-branch -b hardknott git://git.yoctoproject.org/poky.git cd poky Clone all necessary layers -------------------------- The fist two layers to clone are from dependencies. Clone them with two simple commands. .. code-block:: git clone --single-branch -b hardknott git://git.yoctoproject.org/meta-raspberrypi git clone --single-branch -b hardknott git://git.openembedded.org/meta-openembedded In this step you can also clone ``meta-golemos`` layer. .. code-block:: text git clone ssh://git@gitlab.sclabs.io:10122/golemos/meta-golemos.git Source environment ------------------ To source environment you have to write .. code-block:: TEMPLATECONF=meta-golemos/conf source oe-init-build-env .. note:: This script will automatically change your location to ``build/`` folder. Build proper image ------------------ Datalogger OS has prepared special image types to build. You can choose between: - production image - ``datalogger-image``, - extended version of the production image - ``datalogger-extended-image``, - development image - ``datalogger-dev-image``. If you used template files from ``meta-golemos`` the default machine will be ``raspberrypi0-wifi``, which is meant to be compiled for the Raspberry Pi Zero. You can also overwrite this variable while compiling image with .. code-block:: MACHINE=raspberrypi0-wifi bitbake datalogger-image Burn image file to SD card -------------------------- Built images are stored under ``tmp/deploy/images/raspberrypi0-wifi/``. Go to this directory and burn your image with .. code-block:: sudo bmaptool copy --nobmap datalogger*-image-raspberrypi0-wifi-*.rootfs.wic.bz2 /dev/${your_device} .. warning:: Be careful to choose proper device because it will erase files before copying.