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

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.

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.

git clone ssh://git@gitlab.sclabs.io:10122/golemos/meta-golemos.git

Source environment

To source environment you have to write

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

MACHINE=raspberrypi0-wifi bitbake datalogger<VERSION>-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

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.