Yio Remote Community

Testers and feedback needed for Docker based remote-os build

I’ve been working on an easy to use build system for the Buildroot based YIO-remote OS. The initial Docker based build image is now available in the dev branch: https://github.com/YIO-Remote/remote-os/tree/dev/docker

Feedback and testers are welcomed!

It’s by no means finished, but the RPi SD card image can already be built with a single command.
Next steps are building the remote-software and integration plugins for the RPi.

Available build commands:

info     Print Git information of the available projects
bash     Start a shell for manual operations inside the container
clean    Clean all projects
build    Build all projects
update   Update all projects on the current branch

<project> git [options] <command> [<args>]
                Perform Git command on given project
<project> clean   Clean the given project
<project> build   Build the given project

Available projects are: remote-os - the other projects will follow…

Get the Docker Image

You can either build the image yourself according to the information in the README, or just pull it from my temporary accessible Google Cloud registry for the initial tests.
Simply prefix the yio-remote/build image name in the README with gcr.io/ and the image is automatically pulled from the cloud :smiley:

docker pull gcr.io/yio-remote/build

How to use it:

a) Docker Compose

If you have Docker Compose setup then it’s a simple command in the remote-os/docker directory:

docker-compose up

This will automatically build the SD card image and store it in the subdirectory build-output.
For other build commands the docker-compose.yml file needs to be edited…

b) Plain Docker

With plain Docker a few more steps are involved and it’s more flexible:

  1. Create Docker Volumes to persist projects and build artefacts:

     docker volume create yio-projects
     docker volume create yio-buildroot
  2. Create a directory on the host to store the final build artefacts (SD card image for now)

     mkdir -p ~/projects/yio-remote/build
  3. Run build:

     docker run --rm -it \
         -v ~/projects/yio-remote/build:/yio-remote/target \
         -v yio-projects:/yio-remote/src \
         -v yio-buildroot:/yio-remote/buildroot \
         gcr.io/yio-remote/build \

    build-command: one of the above commands

Example: clean the remote-os project

    docker run --rm -it \
        -v ~/projects/yio-remote/build:/yio-remote/target \
        -v yio-projects:/yio-remote/src \
        -v yio-buildroot:/yio-remote/buildroot \
        gcr.io/yio-remote/build \
        remote-os clean

I’m definitely going to test and report back. Hopefully this weekend

I gave the default build a shot and it seemed to work without issue.
Haven’t loaded onto a device to see if it works as expected.

One note for folks who haven’t used docker in the past. After installing docker.io you will need to add your username to the docker group in order to avoid a permission error:
sudo usermod -aG docker $USER

Good to hear! Thanks for testing.

I’m already working on the next revision with cross compile support of all Qt projects. Should be ready later today. Unfortunately my day job needs me first.

A new version of the build image is available in GitHub dev branch and the pullable gcr.io/yio-remote/build image is updated.

  • Image size is down to 466 MB
  • Projects, Buildroot and source packages are downloaded during the first build and are no longer stored in the image.
  • All Qt projects are cross compiled for RPi zero with the toolchain in remote-os. I.e. remote-os must be built first. Simply execute the build command and everything is taken care for you :slight_smile:
  • First initial build will take a long time (1.5 h +). This depends on internet speed, mirror state and on how powerfull your PC is.
  • After the initial build the remote-software or even the complete remote-os projects can be built within seconds!
  • Tested on macOS and Ubuntu Linux. Windows 10 will follow this weekend.

The built SD card image seems to work, I haven’t had time yet to thoroughly test it.
The next step is to improve the build process in regards to binary file handling (not storing them with the sources) and test if the project source directories can be bind mounted from the host.

1 Like

Updated 26.10: included Windows wrapper command & environment variable.

Just pushed a small update with some fixes and additional build commands. It’s still in the remote-os dev branch.

Small how-to for building the master branches on macOS / Linux:

  1. Get the wrapper script.

  2. Define an environment variable YIO_BUILD_OUTPUT which defines your output directory on the host.
    macOS & Windows: Make sure this directory is configured in Docker Desktop to be shareable.

  3. Copy the script somewhere in your path (or extend your PATH environment variable).
    Linux & macOS: /usr/local/bin

  4. Build the SD card image

     yio build
  5. Wait 1.5h or longer…

Now let’s build the dev branch:

  1. Check which branches we’re on:

     yio info
  2. Switch from master to dev:

     yio git checkout dev
  3. Build:

     yio build

I hope that’s easy enough :slight_smile:

1 Like

I’m not sure but i think the build ended prematurely. Last lines where:

make[1]: Leaving directory ‘/yio-remote/src/remote-os/buildroot/output/build/qt5base-5.12.4/qmake’
Could not find qmake spec ‘’.
Error processing project file: /yio-remote/src/remote-os/buildroot/output/build/qt5base-5.12.4
make: *** [package/pkg-generic.mk:231: /yio-remote/src/remote-os/buildroot/output/build/qt5base-5.12.4/.stamp_configured] Error 3

I will retest on Windows. It’s not supposed to do a Qt build in the remote-os project because it’s not a Qt project!

The issue was an incomplete build of the Buildroot toolchain which is required for the Qt builds.
I will include more checks that the toolchain was built correctly and add a troubleshooting section in the readme.
The build image has just been updated: all remote-software resources should now be included in the final image. To get the latest version: docker pull gcr.io/yio-remote/build

Status update: big changes ahead!
The remote-os project can now be built with a single make command and takes care of the buildroot Git submodule. The pull request should .be ready by the end of the week for branch: https://github.com/YIO-Remote/remote-os/tree/feature/21-Buildroot_Submodule.
Until then the old Docker image might not work anymore.