/LithOS

OS Image for Microfabricator

LithOS

Build LithOS Image

Pre-requisites

Refer to docker instruction guide: Add Reference Link

  • Install Python
sudo apt install python3 python3-pip
sudo pip3 install distro jsonschema kconfiglib PyYAML
  • Install Docker
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo   "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

apt-cache madison docker-ce
  • Install a specific version using version string from second column
  • sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io docker-compose-plugin
sudo apt-get install docker-ce= 5:20.10.17~3-0~ubuntu-focal docker-ce-cli= 5:20.10.17~3-0~ubuntu-focal containerd.io docker-compose-plugin
  • Check if docker installation successfull
sudo docker run hello-world

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
  • Verify if we can run docker command without sudo
docker run hello-world

Screenshot from 2022-08-31 15-46-22

sudo systemctl enable docker.service
sudo systemctl enable containerd.service

echo $USER
sudo usermod -aG docker $USER
sudo systemctl restart docker

docker ps
  • Cargo
sudo apt-get -y install cargo
cargo install cargo-bitbake

cargo install cargo-bitbake --force
sudo apt-get install build-essential gcc bv bison flex libssl-dev libncurses5-dev libelf-dev

sudo apt-get install build-essential libncurses5-dev

Clone kas

git clone https://github.com/siemens/kas

This repository contains the script that we will be using to build images, sdk and access the yocto development environment. The key script we will be using is kas-container.

Build Instructions

Build Image

Use this command from LithOS repo to build the image.

$PATH_TO_KAS_DIR/kas-container build kirkstone.yaml

Access development environment shell

$PATH_TO_KAS_DIR/kas-container shell kirkstone.yaml
  • Build file can be found at /build/tmp/deploy/images/raspberrypi4

Refer the documentation for more info. This approach comes from this blog by Embedded Use.


⚠️ OTA Procedure