Bringup of balena on new Snapdragon board

Hi, not sure if this is the correct place for this. We are trying to get balena running on our Qualcomm Snapdragon 820 based development board. Not BalenaOS, just ability to run balena containers. We already have docker running on the target. I have a tini-balena and a balena package that I install on the board. After that I can see these processes running:

bash-4.3# ps aux | grep balena
 2264 root       1:07 /usr/bin/balenad -H fd://
 2400 root       0:39 balena-containerd --config /var/run/balena/containerd/containerd.toml

Here is the version information:

bash-4.3# balena --version
balena version 17.12.0-dev, build 2a85458593353c9a25372b8b2aad7dbdb9bc8c55

On my host computer I cannot balena ssh to the device:

$ balena ssh 192.168.1.53
[debug] original argv0="balena" argv=[/home/ekatzfey/development/balena/balena-cli/balena,/snapshot/versioned-source/bin/balena,ssh,192.168.1.53] length=4
ssh: connect to host 192.168.1.53 port 22222: Connection refused

Nor can I push my balena project:

$ balena push 192.168.1.53
[debug] original argv0="balena" argv=[/home/ekatzfey/development/balena/balena-cli/balena,/snapshot/versioned-source/bin/balena,push,192.168.1.53] length=4
[debug] Using . as build source
[Debug]   Checking we can access device
[Debug]   Sending request to http://192.168.1.53:48484/ping
Could not communicate with local mode device at address 192.168.1.53

If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io

For bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/

If I just try to build a container on target I get this:

bash-4.3# balena build example/
Sending build context to Docker daemon  4.608kB
Step 1/7 : FROM resin/aarch64-debian:jessie
jessie: Pulling from resin/aarch64-debian
6ab1b2f5bb07: Pull complete 
20e576de7406: Pull complete 
86113b948bd9: Pull complete 
c7045637fa77: Pull complete 
0fc20bb9c8cc: Pull complete 
4caa8114bddb: Pull complete 
8932f05f17ce: Pull complete 
0f56dcbf3e75: Pull complete 
e98577514ca1: Pull complete 
a137c858e31e: Pull complete 
80609c6f7f2d: Pull complete 
e7a5b13f47f4: Pull complete 
d5fbf9afa7c9: Pull complete 
2e96397a9d11: Pull complete 
Total:   35.51MB/35.51MB
Digest: sha256:d830b7287ec34ab7202bb7a263b2734d135d0eb9956587b9a2e57f0649989f64
Status: Downloaded newer image for resin/aarch64-debian:jessie
# Executing 1 build trigger
 ---> Running in 87a1090c68ef
OCI runtime create failed: container_linux.go:296: starting container process caused "process_linux.go:279: applying cgroup configuration for process caused \"failed to write 0-7\\n to cpuset.cpus: write /sys/fs/cgroup/cpuset/docker/cpuset.cpus: invalid argument\"": unknown
bash-4.3# echo 0-1 > /sys/fs/cgroup/cpuset/docker/cpuset.cpus
bash-4.3# balena build example/
Sending build context to Docker daemon  4.608kB
Step 1/7 : FROM resin/aarch64-debian:jessie
# Executing 1 build trigger
 ---> Running in b16f68a44f41
OCI runtime create failed: container_linux.go:296: starting container process caused "process_linux.go:398: container init caused \"could not create session key: function not implemented\"": unknown

How do I go about debugging all of this? Is there some sort of bringup guide that explains how to get a new implementation working?

Thanks!

Hey,

I just wanted to check if you’re planning to use this device with balenaCloud to manage the containers, or if this is just a case of running the balena-engine instead of Docker?

The tool balena-cli you mentioned using is aimed at managing software/devices on balenaCloud, which would in turn talk to and manage your device. This is done using a few components like a VPN and Supervisor.

Eventually we want to be able to use balenaCloud, but I’m guessing that getting balena-engine working is a pre-requisite so I’d like to focus on getting that working first.

I think there is some confusion here.

  • balena-cli is a tool to interact with balena services and devices;
  • balena-engine is a docker fork that runs the containers on balena devices;
  • balena-os is the os running on balena devices;

balena-cli's command is named balena.
But the balena command on Balena devices is a different thing, it is only a client for balena-engine, it is what docker is to dockerd.

Having balena-engine running on a device won’t create an ssh server, connect to the balena api servers or anything other than being able to run containers.

A balena device runs several things including balena-engine, balena-supervisor, please check https://www.balena.io/docs/reference/OS/overview/2.x/#balenaos-components .
Supporting a new device type is a complicated task, see for example this repository that builds balena os for raspberry pi devices.

Okay, thanks for the explanation and pointers. Perhaps we will just stick with Docker for now.

@ekatzfey, I thought of mentioning as well that balena offers a paid “custom device support” service for new boards/devices:

You can use the contact information on the pages above to find out more. Our sales team will be pleased to discuss your requirements and offer suggestions.

Excellent, thanks, we may need that.