I guess the script expects balena-beaglebone to be the work-dir, however it further seems to desire for it to contain a .git directory. In my case, it is a submodule and therefore .git is a file and not a directory.
Wow, That was a headache. I couldn’t find any way to specify with git to move the metainformation under balena-beaglebone/.git, rather than having .git be a file with gitdir defined. I manually moved the information then massaged all of the .git files to point to the new path for metainformation (git-dir) and all of the config files to point to the new paths for all the work-directories. Ugh.
Anyway, all seems to be building now. Because only balena-beaglebone is exported as a workdir and the git metainformation is used, I don’t see a way around having real git metainformation in balena-beaglebone/.git. It would be nice if someone could find out how to get it there if balena-beaglebone itself is a submodule of another project.
ERROR: mkfs-hostapp-native-1.0-r0 do_compile: Execution of '/work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.790731' failed with exit code 1:
cgroups: cgroup mountpoint does not exist: unknown
Error response from daemon: No such image: e665ae2b1d2d
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/log.do_compile.790731
Log data follows:
| DEBUG: Executing shell function do_compile
| cgroups: cgroup mountpoint does not exist: unknown
| Error response from daemon: No such image: e665ae2b1d2d
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.790731' failed with exit code 1:
| cgroups: cgroup mountpoint does not exist: unknown
| Error response from daemon: No such image: e665ae2b1d2d
| WARNING: exit code 1 from a shell command.
|
NOTE: recipe mkfs-hostapp-native-1.0-r0: task do_compile: Failed
ERROR: Task (/work/build/../layers/meta-balena/meta-balena-common/recipes-containers/mkfs-hostapp-native/mkfs-hostapp-native.bb:do_compile) failed with exit code '1'
$ cat balena-beaglebone/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/log.do_compile.790731
DEBUG: Executing shell function do_compile
cgroups: cgroup mountpoint does not exist: unknown
Error response from daemon: No such image: e665ae2b1d2d
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/work/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do_compile.790731' failed with exit code 1:
cgroups: cgroup mountpoint does not exist: unknown
Error response from daemon: No such image: e665ae2b1d2d
WARNING: exit code 1 from a shell command.
Hi Jason, I am afraid that the scripts in balena-yocto-scripts are conditioned to balena-yocto-scripts being a submodule in a git project. So the device project must be created with:
git clone --recursive <URL>
About the build errors, is your Linux distribution using cgroups v2? If so, could you try to revert to v1 with the following kernel command line arguments see if the issue persists:
To revert back to using cgroups v1, you need to add kernel command line parameters to the host system (the workstation you are using to build balenaOS). You can can find instructions for example in https://linuxconfig.org/how-to-set-kernel-boot-parameters-on-linux.
I suggest you initially edit the grub boot entry to append those settings so they apply only to the next boot. As a reminder, the arguments to add for a systemd enabled Linux distribution are systemd.unified_cgroup_hierarchy=0 systemd.legacy_systemd_cgroup_controller.