Navigator firmware for aarch64

Hi there,

I need to compile the firmware for a Raspberry Pi running RaspOS 64bit.

I did install the toolchain aarch64-linux-gnu. I did change it in the boards.py file:

class navigator(linux):
    toolchain = 'aarch64-linux-gnu'

    def configure_env(self, cfg, env):
        super(navigator, self).configure_env(cfg, env)

        env.DEFINES.update(
            CONFIG_HAL_BOARD_SUBTYPE='HAL_BOARD_SUBTYPE_LINUX_NAVIGATOR',
        )

and the final binary has the following information:

$ file build/navigator/bin/ardusub
build/navigator/bin/ardusub: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=8f763e68a0f2111560df5df47c68b86efaa4104c, for GNU/Linux 3.7.0, not stripped

But when I try to upload the firmware, I get the following message:

Could not install firmware. Firmware's architecture (ARM) does not match system's (aarch64).

Am I missing something? Do you have instructions to compile the firmware for aarch64?

Note: I’m compiling on Ubuntu 20.04

Hi @gecastro,

I expect this is a bug in how BlueOS or the firmware uploader checks for firmware validity, but am not certain so have asked the software team to take a look :slight_smile:

I had a bit more play around and it has to do with the way that python retrieves the machine architecture in the docker container.

The host system is detected as aarch64 and uname inside docker returns the same architecture, so the validations fail.

As a temporary fix, I managed to run the armhf firmware by disabling the firmware checks in the FirmwareInstall.py file.

1 Like

Hi @gecastro,

It appears that you are running BlueOS on a custom operating system and not the Raspberry Image that we provide in our releases. Is that correct ?
If you access the terminal page and un uname -a, you’ll see that both BlueOS and the Raspbian that comes with our BlueOS image answers: Linux blueos 5.10.92-v7l+ #1514 SMP Mon Jan 17 17:38:03 GMT 2022 armv7l GNU/Linux when running on a Raspberry Pi 4.
We deploy our images with armv7 since it makes it compatible with both Raspberry Pi 3 and Raspberry Pi 4, a single image.
If you want to collaborate with BlueOS and add support for aarch64, the only thing necessary is to update this lines:

Contributions are much appreciated!

1 Like