Difficulty to build balena-fsl-arm

Hi,

I’m starting in the world of Balena OS and try to build this repository :

I set the first condition that have an OS that boot with cgroup v1 enable.

See the log :

> stat -fc %T /sys/fs/cgroup
tmpfs

I double check by running this command in an Alpine container :

> docker run --rm alpine stat -fc %T /sys/fs/cgroup
tmpfs

And I third check by checking the Docker configuration :

> docker info | grep -i cgroup
WARNING: Running in rootless-mode without cgroups. To enable cgroups in rootless-mode, you need to boot the system in cgroup v2 mode.
WARNING: Support for cgroup v1 is deprecated and planned to be removed by no later than May 2029 (
)
Cgroup Driver: none
Cgroup Version: 1

In the README, they don’t ask to launch Docker in root mode so I run it rootless :

> ./balena-yocto-scripts/build/balena-build.sh -d imx8mm-lpddr4-evk -s /home/maxime/balena/balena-fsl-arm/build

I get this error :

> ./balena-yocto-scripts/build/balena-build.sh -d imx8mm-lpddr4-evk -s /home/maxime/balena/balena-fsl-arm/build
[balena_lib_environment]: Defaulting to balena-cloud.com
[balena_lib_environment]: Defaulting to balena-cloud.com
~/balena/balena-fsl-arm ~/balena/balena-fsl-arm
Submodule details:
Submodule details: /home/maxime/balena/balena-fsl-arm
9f18bf21add2a8a3ffa0b96aba7416ba2d752e27 balena-yocto-scripts (v1.39.12)
fc76558c384c10bf228b10909eca346ee9d6b564 contracts (v2.0.137)
5fdbeb1984d50a9f7c9a5e5404771838c2670d67 layers/meta-balena (v6.10.17)
0c405be0b905b239b96dc6f65a2eebc27a7e21c7 layers/meta-boundary (remotes/origin/kirkstone)
175bc45b40ea2da00baefb5b532176694d70596d layers/meta-cyclonedx (remotes/origin/kirkstone)
7286bef07802fc493894c5917a315d53c8fe2191 layers/meta-freescale (2.1-3999-g7286bef0)
9e94b64bdfebcf7bfdf2af6447cec866a4efa814 layers/meta-freescale-3rdparty (2.2-540-g9e94b64)
7d4507f226bd2af939d4482fb14a809867ece939 layers/meta-openembedded (remotes/origin/kirkstone-next-599-g7d4507f226)
ab676955a0909ed436c22c7a7e73605de1dc364a layers/meta-solidrun-arm-imx6 (remotes/origin/kirkstone)
fab6dc2fbc5229f04ae8bd34a35c301dd697c993 layers/meta-solidrun-solidsense (heads/main)
c942cdb0572ab065a13424aa7482404269ff9554 layers/poky (yocto-4.0.32-14-gc942cdb057)
~/balena/balena-fsl-arm
1.39.12-yocto-build-env: Pulling from balena-os/balena-yocto-scripts
Digest: sha256:4e21054eb70015b0593821a2b99de5f840be1194f7e812d2f46722a199b5d213
Status: Downloaded newer image for 

[INFO] Creating and setting builder user 1000:1000.
unix:///var/run/docker.sock /var/run/docker.pid
[INFO] The configured git credentials for user builder are:
Resin Builder
[INFO] Running build as builder user…
Building JSON manifest…
npm ERR! code EACCES
npm ERR! syscall open
npm ERR! path /work/balena-yocto-scripts/build/package-lock.json
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, open ‘/work/balena-yocto-scripts/build/package-lock.json’
npm ERR!  [Error: EACCES: permission denied, open ‘/work/balena-yocto-scripts/build/package-lock.json’] {
npm ERR!   errno: -13,
npm ERR!   code: ‘EACCES’,
npm ERR!   syscall: ‘open’,
npm ERR!   path: ‘/work/balena-yocto-scripts/build/package-lock.json’
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/builder/.npm/_logs/2026-01-28T12_10_47_344Z-debug-0.log
/work/balena-yocto-scripts/build/build-device-type-json.sh: ERROR - Please make sure the ‘npm’ package is installed and working before running this script.
[000000000][ERROR]Could not generate .json file(s).
Untagged: 

Deleted: sha256:4e21054eb70015b0593821a2b99de5f840be1194f7e812d2f46722a199b5d213

I read the script that find this /work folder and it’s our current working directory. So “work/balena-yocto-scripts/build/package-lock.json” is technically “./balena-yocto-scripts/build/package-lock.json”.
The folder is own by me but the file doesn’t exist.

Am I doing something wrong ?

Context, my config :

> uname -a
Linux maxime-NucBox-K10 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Hi Support team.

I just re-up this message.

I continue trying to build Balena OS without success. I want to be sure about the configuration I have.

I’m using Ubuntu 24.04. The machine I have it pretty new and doesn’t support a lot of Linux distribution version. For example, I try a Debian 10 which use by default cgroup v1 but if failed to boot.

The build still fail with problem about gid uid and file access.

My first question is how should Docker been launch ? It’s better to launch it rootless or in root mode ?

Maxime.

I try to build a different board from another repository.
Following this video : https://www.youtube.com/watch?v=NpMC2WWSpNI

So I checkout this repo : GitHub - balena-os/balena-allwinner

And check this build command : ./balena-yocto-scripts/build/balena-build.sh -d orangepi-plus2 -s /home/maxime/balena/balena-allwinner/build

Same error :

maxime@maxime-NucBox-K10:~/balena/balena-allwinner$ ./balena-yocto-scripts/build/balena-build.sh -d orangepi-plus2 -s /home/maxime/balena/balena-allwinner/build

[balena_lib_environment]: Defaulting to

[balena_lib_environment]: Defaulting to

~/balena/balena-allwinner ~/balena/balena-allwinner

Submodule details:

cc83969226e96a3d22652ba5340135b697e366bb balena-yocto-scripts (v1.39.21)

fc76558c384c10bf228b10909eca346ee9d6b564 contracts (v2.0.137)

5ceed2308a1ce8a2e453f0f2890039106c1ee7b0 layers/meta-balena (v6.10.24)

01358b6d705071cc0ac5aefa7670ab235709729a layers/meta-openembedded (remotes/origin/dunfell)

d42984ff9a9fad9ced37d95a89af1b2b84f957e9 layers/meta-rust (remotes/origin/dunfell)

06091fa58f24c375fe68c97ad77af38ef3ff4078 layers/meta-sunxi (remotes/origin/dunfell)

63d05fc061006bf1a88630d6d91cdc76ea33fbf2 layers/poky (yocto-3.1.33)

~/balena/balena-allwinner

1.39.21-yocto-build-env: Pulling from balena-os/balena-yocto-scripts

cfb906bccf15: Pull complete

581447921cda: Pull complete

8dd648a54f4d: Pull complete

dfc847f626f8: Pull complete

1118be9ae823: Pull complete

e9dd4fd9423d: Pull complete

56f2ad6702c3: Pull complete

07c0a22aee41: Pull complete

e41427dad884: Pull complete

0d153a5bede3: Pull complete

48b4a69b2060: Pull complete

a9e9ff5c9ac9: Pull complete

241ad87d3dd7: Pull complete

54a239e084d0: Pull complete

Digest: sha256:cbf39067b2634321c6d398447913a9961b8970bb12c3c74549507ed382eb6066

Status: Downloaded newer image for

[INFO] Creating and setting builder user 1000:1000.

unix:///var/run/docker.sock /var/run/docker.pid

[INFO] The configured git credentials for user builder are:

Resin Builder

[INFO] Running build as builder user…

Building JSON manifest…

npm ERR! code EACCES

npm ERR! syscall mkdir

npm ERR! path /work/balena-yocto-scripts/build/node_modules

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, mkdir ‘/work/balena-yocto-scripts/build/node_modules’

npm ERR! [Error: EACCES: permission denied, mkdir ‘/work/balena-yocto-scripts/build/node_modules’] {

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! syscall: ‘mkdir’,

npm ERR! path: ‘/work/balena-yocto-scripts/build/node_modules’

npm ERR! }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It is likely you do not have the permissions to access this file as the current user

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:

npm ERR! /home/builder/.npm/_logs/2026-02-02T05_17_59_505Z-debug-0.log

/work/balena-yocto-scripts/build/build-device-type-json.sh: ERROR - Please make sure the ‘npm’ package is installed and working before running this script.

[000000006][ERROR]Could not generate .json file(s).

Untagged:

Deleted: sha256:cbf39067b2634321c6d398447913a9961b8970bb12c3c74549507ed382eb6066

So I really think there are a problem with my Ubuntu.

This is my config :

maxime@maxime-NucBox-K10:~/balena/balena-allwinner$ uname -a

Linux maxime-NucBox-K10 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Does my kernel is too recent ?

My Docker post installation was wrong. I rootless the Docker daemon instead of only add my user into the docker group.

So everything make sense now with my initial error that was a problem about user id.

Sorry for the inconvenience.