Using SkiffOS on a Raspberry Pi

U

I use a Raspberry Pi to run Octoprint in order to control/manage my 3D printer(s). There are many Linux distributions that run on a Raspberry Pi. Typically these days I’m using Docker containers to deploy applications. On x64 hardware, I’ve been running Fedora CoreOS and on Raspberry Pi (ARM32/ARM64) I used to run Hypriot. However, Hypriot looks to be (mostly?) dead. Enter SkiffOS.

SkiffOS out of the box includes almost everything I need for it to be usable. One thing that’s missing is Python which is needed for Ansible to configure the host and deploy/update containers via a playbook. SkiffOS uses Buildroot to generate the embedded Linux distribution. The way to affect changes to Buildroot in SkiffOS is to make use of the override system. Since I am only using SkiffOS for the singular purpose of a Linux distribution to run Octoprint, I am putting in my overrides at the root level rather for a particular workspace (see the SkiffOS documentation for overrides). For Python, I create an override file at overrides/buildroot/python:

BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON3_ZLIB=y
BR2_PACKAGE_PYTHON_DOCKER=y
BR2_PACKAGE_PYTHON_PACKAGING=y

Additionally, I (aspirationally) want to maybe have a web camera so I can remotely check on prints so I add another override file for libv4l at overrides/buildroot/libv4l:

BR2_PACKAGE_LIBV4L=y
BR2_PACKAGE_LIBV4L_UTILS=y

To build the Linux image the process is pretty straightforward. You set a few environment variables to assign your workspace (if you want something different than the default) and set some config variables to specify the hardware platform and enable features. Then you use make to invoke various build rules. In the case of building an image for a Raspberry Pi 2 with docker, I do the following:

export SKIFF_WORKSPACE=pi2
export SKIFF_CONFIG=pi/2,apps/docker
make configure
make compile

Once the build is complete, you have an image that you can write to an MicroSD card (in the case of a Raspberry Pi) and boot the OS. This MicroSD card then becomes your embedded Linux distribution. You can also upgrade (or downgrade) “in place” with an included script:

./scripts/push_image.bash root@192.168.97.5

The image will be uploaded and will take effect upon reboot.

I’ve found SkiffOS to be a well-supported and easy to use stripped down Linux environment that lends itself well to the resource constrained Raspberry Pi hardware. If you’re looking for a Linux distribution for running small, specialized containerized workloads, consider using SkiffOS on a Raspberry Pi.

About the author

Patrick Lawrence

Add comment

Recent Posts

Recent Comments

Archives

Categories

Meta