I am trying to run the roon bridge installer in a container using balena…however when running either the roonbridge-installer-armv7hf.sh or -armv8.sh installer scripts it fails complaining that the arch is not armv7hf / armv8.
When I run uname -m it reports aarch64, so I guess it should work looking at the script. But perhaps there is something I am missing?
I can override the check by just changing line 14 to read MACHINE_ARCH=aarch64 and then it builds successfully, but would prefer to use the native script ideally.
Not sure why you’re using Docker for Bridge, but anyway, it would be useful if you shared some information about the host machine, i.e. Pi version, OS etc.
uname -m confirms that the kernel architecture is 64-bit. If you’re using Rasbian it’s 32-bit even though the architecture is 64-bit. I suspect Roon Bridge is compiled for 32-bit too, but you’ve compiled a 64-bit kernel.
I am not using raspbian as the core OS - I am using balenaOS which is yocto based. And the container image is 64bit debian buster. The docker builders on balena are running natively on arm aarch64 hardware.
Reason for running it in a container is to run it as a plugin for balenaSound
Running those commands on the builder gives me the following for cpuinfo (there are 64 identical armv8 cores on this builder, I have just copied the first two here):
[roon] Step 5/14 : RUN cat /proc/cpuinfo
[roon] ---> Running in fc473de97f22
[roon] processor : 0
[roon] model name : ARMv8 Processor rev 2 (v8l)
[roon] BogoMIPS : 100.00
[roon] Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
[roon] CPU implementer : 0x41
[roon] CPU architecture: 8
[roon] CPU variant : 0x0
[roon] CPU part : 0xd08
[roon] CPU revision : 2
[roon] processor : 1
[roon] model name : ARMv8 Processor rev 2 (v8l)
[roon] BogoMIPS : 100.00
[roon] Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
[roon] CPU implementer : 0x41
[roon] CPU architecture: 8
[roon] CPU variant : 0x0
[roon] CPU part : 0xd08
[roon] CPU revision : 2
So I presume the arm native builder is doing something funny to trick the system into thinking it is armv6l instead of aarch64 (presumably to allow it to build armv6 stuff natively)
uname -m confirms that you are running a 64-bit ARM kernel. As mentioned earlier, common Raspberry Pi OS used with Roon typically runs a 32-bit kernel on 64-bit architecture; armv8 still runs 32-bit. With this in mind it may be that Bridge is a 32-bit application. Thus the output from the script. Maybe @support can advise if this is the case? However, this is a non-standard configutation so you may want to move this thread to #tinkering.
As far as I am aware, the raspberry pi now officially supports a 64bit kernel using the kernel8.img
In any case, this isn’t the reason why it is failing as the install script includes a check for 64bit kernels from line 91 to 108:
#
# Check for proper architecture
#
case "$MACHINE_ARCH" in
armv7*)
if [ x$ARCH = xarmv7hf ]; then OK=1; fi
;;
aarch64*)
if [ x$ARCH = xarmv8 ]; then OK=1; fi
if [ x$ARCH = xarmv7hf ]; then OK=1; fi
;;
x86_64*)
if [ x$ARCH = xx64 ]; then OK=1; fi
;;
i686*)
if [ x$ARCH = xx86 ]; then OK=1; fi
;;
esac
And it runs fine if I override the check or run the build on the QEMU builder.
I think it is probably an issue in the balena builder that needs addressing rather than anything on the roon side. For now I have a workaround - just running this install script when the container loads rather than during the build process.