Skip to content

Building Zarhus OS

This guide will demonstrate how to build a Zarhus OS image from zero!

Prerequisites

  • Linux PC (tested on Fedora 40)
  • docker installed
  • kas-container 3.0.2 script downloaded and available in PATH.

    mkdir ~/.local/bin
    wget -O ~/.local/bin/kas-container https://raw.githubusercontent.com/siemens/kas/3.0.2/kas-container
    chmod +x ~/.local/bin/kas-container
    

Note

You may need to add ~/.local/bin into your PATH. You can do so for example by adding export PATH=$PATH:~/.local/bin to your .bashrc and source it.

  • meta-zarhus repository cloned:

    mkdir yocto
    cd yocto
    git clone https://github.com/zarhus/meta-zarhus.git
    
  • bmaptool installed:

    sudo dnf install bmap-tools
    

Note

You can also use bmaptool from GitHub if it is not available in your distro.

Build

From yocto directory run:

$ SHELL=/bin/bash kas-container build meta-zarhus/kas-IMAGE_TYPE.yml

Note

Replace IMAGE_TYPE with either debug or prod.

Image build takes time, so be patient and after the build finishes you should see something similar to this (the exact tasks numbers may differ):

Initialising tasks: 100% |###########################################################################################| Time: 0:00:01
Sstate summary: Wanted 2 Found 0 Missed 2 Current 931 (0% match, 99% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2532 tasks of which 2524 didn't need to be rerun and all succeeded.

Verification

The build should finish without errors or warnings.

After the build has finished - feel free to explore yocto/build/tmp/deploy/images/MACHINE_NAME/ directory for built images.

Note

Replace MACHINE_NAME with the name of the machine you have built your image for.

You should find an image with filename ending with .rootfs.wic.gz and a binary map for the image in format with filename ending with .rootfs.wic.bmap. These files will be needed for flashing process.