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

I did some updates to the root Raspbian image on my system and now I’m seeing similar problems to the OP here:

image

And my Navigator doesn’t seem to be responding, although its 3.3v and 5v lights are on. Did I kill something? I made these updates so I could update pip3 and load some hardware drivers for some sensors I’m using and they didn’t seem to work until I did an apt-get update and upgrade.

2 Likes

As an update to this problem, I reverted to an unmodified blueos installation and confirmed that the Navigator is fine, but after trying to install the needed drivers with minimal changes to the system the same thing happened again with the uname -a being changed and the Navigator then refusing to work.

1 Like

Hi Richard!
We are experiencing the same symptoms but are unable to revert to an untouched version. How did you accomplish this? Also, did you find any solution where your modifications worked?

Hi Michael,
@williangalvani did provide a solution:
“You can add arm_64bit=0 to /boot/config.txt in order to make the firmware load the 32 bits”
I did this and everything worked fine.

2 Likes

So you were able to run BlueOS ok after doing an update to the root raspi image (after red-pill)? Just by editing the /boot/config? When I tried to do updates in the root I ended up having to flash my SD card again. It would be nice if I could make persistent modifications, mostly adding dependencies. I am currently trying to figure out how to do that. I think it relates to this post.

Hi Marcus
Yes, things ran just fine for me after I added the line that Willian suggested to my config.txt file. I too needed to make some persistent changes to the Raspbian system underlying the Docker and BlueOS layers to deal with the particular hardware and its necessary software that I have to use, and this has all worked well.